Using DotNetDash on a Web Form
Dot Net Dash has been designed to "drop in" with very little hassle and a small project footprint. Just reference a couple of assemblies and add a couple of lines of markup.
Two steps
- Add references to both QualityData.Web.Management.dll and QualityData.DotNetDash.dll
- Add the following two lines of code in Source View of your ASPX page
<%@ Register Assembly="QualityData.DotNetDash" Namespace="QualityData.Web.Controls" TagPrefix="qd" %> <qd:DotNetDash runat="server" ID="dash" LicenseKey="{your-license-key}" Roles="{your-admin-role}" ConnectionStringName="{connection-string-name}" />
Where...
- {your-license-key} - your live or demo license. Get a demo license»
- {your-admin-role} - the membership role(s) allowed to use the control (ex. "Administrators, SuperUsers")
- {connection-string-name} - the connection string name that you use with your Asp.Net Sql Membership Provider (ex. "LocalSqlServer")
Tips
- Please ensure that your project uses Forms authentication and not Windows Authentication
- Please ensure that Roles are enabled (in web.config, roleManager enabled = "true")
Dependencies
- The Web Management API is built for the Microsoft .Net Framework Version 4.0 and has dependencies on the Microsoft MVC 3 extensions .
- The Dot Net Dash client-side application requires the Web Management API on the server and Silverlight 4 on the client.
Adding the project references
- To add the references, Click the "Project" menu in Visual Studio, then click "Add Reference..."
- When prompted, browse to folder where you installed DotNetDash and select both of the QualityData assemblies
- By default, the Setup program installs the two assemblies (QualityData.Web.Management.dll and QualityData.DotNetDash.dll) into the folder: c:\program files (x86)\Quality Data\DotNetDash
- Once the references have been added, they should appear under the "References" node of your solution in Visual Studio
Security
Before deploying DotNetDash or the Web Management API to your production server, it is important to understand various security implications.
The Web Management API provides functions that allow for retrieving passwords and changing user roles. Access to these functions within your applications should be carefully controlled. Consider using Events or even Custom Providers to intercept requests for sensitive data.
The Web Management API includes a REST interface that allows remote clients to perform various administrative functions. Consider using SSL to ensure that sensitive information is encrypted during transmission. Use one or more of the following techniques to ensure that unauthorized users cannot access sensitive server-side methods:
- When registering a route to the REST API Controller, ensure the RequiredRoles property specifies only the membership role name(s) that are allowed to call the API then ensure that only a limited set of users are members of those roles.
- As an additional layer of security, consider adding an Authorization element to Web.Config that denies all but a select few users or roles from accessing the path to your REST API.
- Consider using Events or Custom Providers to intercept some of the more sensitive requests such as accessing passwords or changing user roles.