ASP.NET configuration - setting up custom membership
-
I've got SQL Express 2005 and VS 2008 team. As they specified in Pro ASP.NET 3.5 in C# 2008 1) run aspnet_regsql to generate say ProjMembership db 2) copied it into App_Data from SQLEXPRESS\data folder and attached its path in sseutil -a somepath\ProjMemebership ProjMembership 3) setup web.config as <connectionStrings> <add name="MyConnString" connectionString="Data Source=.\SQLEXPRESS; Integrated Security=SSPI;initial catalog=ProjMembership"/> </connectionStrings> <authentication mode="Forms" /> <membership defaultProvider="MyProvider"> <providers> <add name="MyProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="MyConnString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="3" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /> </providers> </membership> <roleManager enabled="true" /> But when I go to security tab in ASP.NET configuration from VS, it reports: Cannot open database "ProjMembership" requested by the login. The login failed. Login failed for user 'ACER\user'????
Чесноков
-
I've got SQL Express 2005 and VS 2008 team. As they specified in Pro ASP.NET 3.5 in C# 2008 1) run aspnet_regsql to generate say ProjMembership db 2) copied it into App_Data from SQLEXPRESS\data folder and attached its path in sseutil -a somepath\ProjMemebership ProjMembership 3) setup web.config as <connectionStrings> <add name="MyConnString" connectionString="Data Source=.\SQLEXPRESS; Integrated Security=SSPI;initial catalog=ProjMembership"/> </connectionStrings> <authentication mode="Forms" /> <membership defaultProvider="MyProvider"> <providers> <add name="MyProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="MyConnString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="3" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /> </providers> </membership> <roleManager enabled="true" /> But when I go to security tab in ASP.NET configuration from VS, it reports: Cannot open database "ProjMembership" requested by the login. The login failed. Login failed for user 'ACER\user'????
Чесноков
Connectionstring is missing Trusted User=True or say user id and password to login to sql server. Give a try by adding this.
Vijay V. Yash Softech