Silverlight membership authentication is messed up by upgrading sql express to sql standard
I have messed up my asp.net membership authentication in SL4 Business applications by upgrading my development computer from sqlexpress to sql-standard.
Here's how I did it:
Installed win 7/64 bit, installed VS2010, installed Ria services on a new development computer.
Upgraded SQL express to SQL standard (I invited problems by doing this!)
Created new Silverlight Business Application
Discovered Membership Provider needs SQLExpress to use aspnetdb.mdf (SQL Standard won’t work)
Installed SQLExpress as a new named instance.
Created second new Silverlight Business Application
Tried creating new registered user and got this error: “Unable to connect to SQL database” in UserRegistrationService.cs
The stack trace for the error is: at System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) at System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(String connectionString) at System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) at System.Web.Security.SqlRoleProvider.RoleExists(String roleName) at System.Web.Security.Roles.RoleExists(String roleName) at BusinessApplication1.Web.UserRegistrationService.CreateUser(RegistrationData user, String password) in c:\users\dev\documents\visual studio 2010\Projects\BusinessApplication1\BusinessApplication1.Web\Services\UserRegistrationService.cs:line 51 at CreateUser(DomainService , Object[] ) at System.ServiceModel.DomainServices.Server.ReflectionDomainServiceDescriptionProvider.ReflectionDomainOperationEntry.Invoke(DomainService domainService, Object[] parameters) at System.ServiceModel.DomainServices.Server.DomainService.Invoke(InvokeDescription invokeDescription, IEnumerable`1& validationE开发者_运维百科rrors)
When I run traces in SQL profiler, neither sql-express or sql-standard is being queried when attempting to create a new registered user (!!!).
Created an aspnetdb database in sql-standard using aspnet_regsql
Created third new Silverlight Business Application
Pointed to sql-standard's aspnetdb in third SL-Business-App's web.config using and
Tried creating new registered user and got the same error, the same errow stack trace and the same no-show in sql profiler
Sooooooooo...
How to I get authentication Membership working?
At this point, I don't care if "working" is through sqlExpress or through the new sql-standard aspnetdb.
Any ideas?
Thanks in advance, Mark
OK...I give up! If there is a fix, I'm thinking it's fairly deeply buried.
I solved the problem by reinstalling everything starting with Win 7 :(
精彩评论