ASP.NET SQL Server Installation Wizard
I have an asp.net web project that I am working on and found out that my roles are stored in a .mdf file. While reading while trying to connect to it through SQL Management Studio (using SQLExpress 2005) I found this article:
https://help.maximumasp.com/SmarterTicket/Customer/KBArticle.aspx?articleid=878
Now, my question is, should I do this? I am going to upload the website to the hosting provider upon completion and would like the process to be as smooth as possible.
Do you usually just move the MDF file to the server along with the website, or is it better to store the information inside SQL Server itself? I already have a database already for the site ... can I integrate the asp.net role role into my own DB so that I only have one DB to manage?
Thanks for reading, ~~ Kolten
a source to share
Using the ASP.NET Membership Provider is a valid way to manage your user accounts. Uploading an MDF file presents the risk that someone might be able to retrieve your MDF file and then retrieve all of your user data. If it is stored in a SQL database provided by your hosting environment, it will usually be more secure as long as the connection data is not compromised and you are not exposed to SQL Injection attacks and your ISP is not exposed to SQL Injection attacks either.
Membership information can be stored in the same database as the rest of your application if name conflicts do not match the membership tables. You can create the tables required to specify the database connection information on the aspnet_regsql command line.
Inside the web.config file, you will need to change the roleManager and membership providers so that you can specify the connection string to use. i.e.
<system.web>
<roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
<providers>
<remove name="AspNetSqlRoleProvider" />
<add name="AspNetSqlRoleProvider" connectionStringName="MembershipSQLConnectionString"
applicationName="/"
type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>
</system.web>
a source to share