将 sql Express 升级到 sql standard 导致 Silverlight 会员身份验证混乱
通过将我的开发计算机从 sqlexpress 升级到 sql-standard,我搞乱了 SL4 Business 应用程序中的 asp.net 成员身份验证。
我是这样做的:
安装了win 7/64位,安装了VS2010,在新的开发计算机上安装了Ria服务。
将 SQL Express 升级到 SQL 标准(这样做会引发问题!)
创建新的 Silverlight 业务应用程序
发现的成员资格提供程序需要 SQLExpress 才能使用 aspnetdb.mdf(SQL 标准将无法工作)
已安装 SQLExpress 作为新的命名实例。
创建了第二个新的 Silverlight 业务应用程序
尝试创建新的注册用户并收到此错误:“无法连接到 UserRegistrationService.cs 中的 SQL 数据库”
错误的堆栈跟踪为: 在System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(字符串fullFileName,字符串dataDir,字符串connectionString) 在 System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(字符串连接字符串) 在System.Web.DataAccess.SqlConnectionHelper.GetConnection(字符串connectionString,布尔revertImpersonation) 在 System.Web.Security.SqlRoleProvider.RoleExists(字符串角色名称) 在 System.Web.Security.Roles.RoleExists(字符串角色名称) 在c:\ users \ dev \ documents \ Visual Studio 2010 \ Projects \ BusinessApplication1 \ BusinessApplication1.Web \ Services \ UserRegistrationService.cs中的BusinessApplication1.Web.UserRegistrationService.CreateUser(RegistrationData用户,字符串密码):第51行 在 CreateUser(DomainService , 对象[] ) 在 System.ServiceModel.DomainServices.Server.ReflectionDomainServiceDescriptionProvider.ReflectionDomainOperationEntry.Invoke(DomainService domainService,Object[] 参数) 在 System.ServiceModel.DomainServices.Server.DomainService.Invoke(InvokeDescription invokeDescription, IEnumerable`1&validationErrors)
当我在 SQL 探查器中运行跟踪时, sql-express 或 sql-standard 都没有被执行尝试创建新的注册用户时进行查询(!!!)。
使用 aspnet_regsql 在 sql 标准中创建了一个 aspnetdb 数据库
创建了第三个新的 Silverlight 业务应用程序
指向使用和指向第三个 SL-Business-App 的 web.config 中的 sql-standard 的 aspnetdb
尝试创建新的注册用户并获得相同的错误,相同的错误堆栈跟踪和 sql 探查器中相同的未显示
Sooooooooo...
如何让身份验证会员资格发挥作用?
此时,我不在乎“工作”是通过 sqlExpress 还是通过新的 sql 标准 aspnetdb。
有什么想法吗?
提前致谢, 标记
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& validationErrors)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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧……我放弃了!如果有修复的话,我想它已经被埋得很深了。
我通过从 Win 7 开始重新安装所有内容解决了这个问题:(
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 :(