SQLASPMembershipProvider 未连接到数据库
我已经使用 SQLASPMembership 提供程序创建了一个 Web 应用程序,并且在我的开发计算机上一切正常。然而,当我将其发布到网络服务器时,它无法连接到数据库(至少我认为正在发生这种情况,很难说,因为没有错误消息)。
我采用了下面列出的会员资格提供程序使用的相同连接字符串,并针对 aspnet_Membership 创建了一个行计数查询,该查询返回正确的结果,没有问题。此外,我还创建了到数据库的 ODBC 连接,因此我知道我可以看到该数据库。
<add name="connectionSQL" providerName="System.Data.SqlClient"
connectionString="Password=******;Persist Security Info=True;User ID=*******;Initial Catalog=IdentityManagement;Data Source=sql2005dev"
/>
<providers>
<add connectionStringName="connectionSQL" enablePasswordRetrieval="false"
minRequiredNonalphanumericCharacters="0"
enablePasswordReset="true" requiresQuestionAndAnswer="false"
requiresUniqueEmail="true" passwordFormat="Hashed"
maxInvalidPasswordAttempts="4"
minRequiredPasswordLength="6" passwordAttemptWindow="5"
name="SQLASPMembershipProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
我已经检查了我找到的所有其他解决方案。我用的是TCP,没有防火墙问题,有读写权限。
如何解决这个问题?
I have created a web app using the SQLASPMembership provider and and everything works fine off my development machine. However when I publish it out to the web server it fails to connect to the database (at least that is what I think is happening, it is diffcult to tell as there is no error message).
I have taken the same connection string listed below that the Membership provider uses and created a row count query against the aspnet_Membership that returns the correct no problem. Additionally I created an ODBC connection to the database as well, so I know that I can see the database.
<add name="connectionSQL" providerName="System.Data.SqlClient"
connectionString="Password=******;Persist Security Info=True;User ID=*******;Initial Catalog=IdentityManagement;Data Source=sql2005dev"
/>
<providers>
<add connectionStringName="connectionSQL" enablePasswordRetrieval="false"
minRequiredNonalphanumericCharacters="0"
enablePasswordReset="true" requiresQuestionAndAnswer="false"
requiresUniqueEmail="true" passwordFormat="Hashed"
maxInvalidPasswordAttempts="4"
minRequiredPasswordLength="6" passwordAttemptWindow="5"
name="SQLASPMembershipProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
I have checked out every other solution I have found. I use TCP, there is no firewall issue, read write permissions are granted.
How can this be fixed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论