View Full Version : Uploading ASPNETDB.MDF security configs
pbc83
01-05-2012, 02:40 AM
I uploaded my ASPNETDB.MDF which contains my local server's security configurations. When I went to see the results of the upload, none of my settings were in the tables. I am confused as to how to get my ASPNETDB.MDF onto the remote server. I know that your servers don't support ASPNETDB.MDF, so does this mean that all of the tables in an ASPNETDB.MDF file should be made part of my application's database? Please refer to my attached jpg for command that I used as explained in your article ID #337 (How to configure the ASP.NET Membership/Roles Provider to use SQL 2005).:(
Tasslehoff
01-05-2012, 01:58 PM
Make sure port 1433 is open and that you do not have firewall software blocking the connection. You can do this by performing a telnet test.
pbc83
01-05-2012, 02:27 PM
Thanks for the suggestion I will try that later on tonight. However, I'm still not clear as to whether all the tables in ASPNETDB.MDF become part of my web database? Please confirm.
Thanks,
Peter
Tasslehoff
01-05-2012, 02:29 PM
Yes. All the tables will be installed into your web database (i.e. added as part of the schema).
pbc83
01-06-2012, 07:24 AM
I am getting increasingly frustrated with this problem. I cannot upload my tables to my SQL2K801 DiscountASP.Net server. I've followed the instructions you sent me and it continually FAILS. There is no description of the problem, it simply says contact technical support. Can someone simply give me step-by-step instructions on how to upload my database?
One further thing I've noticed is that SQL2K801 is a version 10.0.5766 and my local SQL Server 2008 R2 is a version 10.0.1600. Could this be a problem?
My initial database was created using SQLExpress. Is a database created in SQL Express incompatible with the DiscountASP.Net database? If so, how does one convert it?
At this point I'm pulling what's left of my hair out!!!!
Peter
CrystalCMS
01-07-2012, 01:54 AM
SQL Server 2008 R2 .mdf database and .bak database backup files are not file format backward compatible with SQL Server 2008
pbc83
01-09-2012, 05:30 PM
How do I incorporate the security tables without recreating them from scratch? Do I have to consolidate them locally with my data tables first before uploading them to DASP? What's the easiest way?
Peter
pbc83
01-09-2012, 08:54 PM
I successfully combined databases and uploaded to DASP. However now I get this error message:
Server Error in '/Paragon6' Application.
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.]
System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection) +2073502
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +5064460
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning() +234
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +215
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +178
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
System.Web.Util.SecUtility.CheckSchemaVersion(Prov iderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +392
System.Web.Security.SqlRoleProvider.CheckSchemaVer sion(SqlConnection connection) +64
System.Web.Security.SqlRoleProvider.GetRolesForUse r(String username) +847
System.Web.Security.RolePrincipal.IsInRole(String role) +182
System.Web.Configuration.AuthorizationRule.IsTheUs erInAnyRole(StringCollection roles, IPrincipal principal) +132
System.Web.Configuration.AuthorizationRule.IsUserA llowed(IPrincipal user, String verb) +264
System.Web.Configuration.AuthorizationRuleCollecti on.IsUserAllowed(IPrincipal user, String verb) +201
System.Web.Security.UrlAuthorizationModule.OnEnter (Object source, EventArgs eventArgs) +9024573
System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +75
What's wrong? Any suggestions appreciated.
Peter
CrystalCMS
01-09-2012, 09:44 PM
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
This means that at least part of application services schema is missing or can't be accessed due to a permissions problem. How did you create the schema in the db?
pbc83
01-10-2012, 08:35 AM
I created the schema locally before uploading to DASP. Is it possible to change the schema once it's uploaded? Sorry for my newbieness.
Peter
CrystalCMS
01-10-2012, 12:10 PM
This is the recommended method for installing the application services schema into a database: https://support.discountasp.net/KB/a337/how-to-configure-aspnet-membershiproles-provider-to.aspx?KBSearchID=353692
The idea is you execute this command line locally but it can be directed to execute against a remote sql server db via it's command line options. More info here http://msdn.microsoft.com/en-us/library/x28wfk74.aspx
pbc83
01-10-2012, 01:23 PM
I`m sorry, but I`ve read this knowledgebase article several times and it`s not clear to me what comes first. Creation of the aspnet security tables on the remote server and then insertion of my tables or vice versa. Can you clarify?
CrystalCMS
01-10-2012, 02:31 PM
This tool installs the application services db schema to a target db and that's where it's responsibility ends. It doesn't care whether existing application level db tables / sprocs etc are present in the db or not..unless you're unlucky enough to having an object naming collision which is unlikely. In short you're free to do it in the order that suits you.
pbc83
01-10-2012, 03:39 PM
Ok, thanks I'll try that and I'll let you know if I'm successful. Thanks for your kind assistance.
Peter
pbc83
01-16-2012, 09:30 PM
I successfully uploaded the ASPNETDB.mdf using the technique you suggested. My web site works to an extent, but it still doesn't access the restricted pages, namely the two middle pages, "Edit Properties" and "View Properties". These 2 pages should open if the user enters a valid username and password. I've attached my web.config file for anyone who can tell me what I'm doing wrong. I'm stumped. I've masked my password in the file and zipped the file for upload.
Thanks,
Peter
pbc83
01-17-2012, 09:50 PM
Does anyone have any idea how to resolve this???
Need help!
vBulletin® ©Jelsoft Enterprises Ltd.