ASP.NET membership db using integrated security problem

Posted by rem on Stack Overflow See other posts from Stack Overflow or by rem
Published on 2010-05-16T17:15:19Z Indexed on 2010/05/16 17:20 UTC
Read the original article Hit count: 299

I published ASP.NET MVC web site to a server on a virtual machine (Hyper-V). SQL Server Express installed on the same server.

The problem is that ASP.Net Membership system doesn't work in integrated mode. When Web.config file contains records as follows:

   <connectionStrings>
    <remove name="LocalSqlServer" />
    <add name="MyDBConnectionString" connectionString="data source=vm-1\SQLEXPRESS;Initial Catalog=testdb;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>
   </connectionStrings>

I get an error when trying to register and login to the site.

If I change connection string this way:

   <connectionStrings>
    <remove name="LocalSqlServer" />
    <add name="MyDBConnectionString" connectionString="data source=vm-1\SQLEXPRESS;Initial Catalog=testdb;User ID=XX;Password=XXXXXXX;" providerName="System.Data.SqlClient"/>
   </connectionStrings>

I could register and login without any problem.

What could cause the problem with using ASP.NET membership database in integrated security mode?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-membership