views:

47

answers:

1

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:

  1. Installed win 7/64 bit, installed VS2010, installed Ria services on a new development computer.

  2. Upgraded SQL express to SQL standard (I invited problems by doing this!)

  3. Created new Silverlight Business Application

  4. Discovered Membership Provider needs SQLExpress to use aspnetdb.mdf (SQL Standard won’t work)

  5. Installed SQLExpress as a new named instance.

  6. Created second new Silverlight Business Application

  7. Tried creating new registered user and got this error: “Unable to connect to SQL database” in UserRegistrationService.cs

  8. 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& validationErrors)

  9. When I run traces in SQL profiler, neither sql-express or sql-standard is being queried when attempting to create a new registered user (!!!).

  10. Created an aspnetdb database in sql-standard using aspnet_regsql

  11. Created third new Silverlight Business Application

  12. Pointed to sql-standard's aspnetdb in third SL-Business-App's web.config using and

  13. 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

A: 

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 :(

markE