.net - ASP.NET Web Administration tool; asp.net connection string -
i have asp.net webapplication on local machine , sql server database on server. ran aspnet_regsql.exe on server. after created admin role asp.net administration tool. created 1 user admin privileges. under security section in sql server, provided user db_owner access. when m trying run application, m getting below error,
server error in '/ubcat' application. login failed user 'admin'. description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code. exception details: system.data.sqlclient.sqlexception: login failed user 'admin'. source error: line 36: line 37: context.logins.addobject(login); line 38: context.savechanges(); line 39: } line 40:
//connection string:
<customerrors mode="off"></customerrors> <authentication mode="forms"> <forms name="ubcatsqlauthcookie" loginurl="~/account/login.aspx" timeout="60" /> </authentication> <sessionstate timeout="60" /> <membership defaultprovider="ubcatsqlmembershipprovider" userisonlinetimewindow="60"> <providers> <clear /> <add name="ubcatsqlmembershipprovider" type="system.web.security.sqlmembershipprovider" connectionstringname="ubcatdb" enablepasswordretrieval="false" enablepasswordreset="true" requiresquestionandanswer="false" applicationname="ubcat" requiresuniqueemail="false" passwordformat="hashed" maxinvalidpasswordattempts="5" minrequiredpasswordlength="7" minrequirednonalphanumericcharacters="0" passwordattemptwindow="10" /> </providers> </membership> <rolemanager enabled="true" defaultprovider="ubcatsqlroleprovider" cookietimeout="60"> <providers> <clear /> <add connectionstringname="ubcatdb" applicationname="ubcat" name="ubcatsqlroleprovider" type="system.web.security.sqlroleprovider" /> </providers> </rolemanager> <compilation debug="true" targetframework="4.0"> <assemblies> <add assembly="system.security, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" /> <add assembly="system.data.entity, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" /> <add assembly="system.data.entity.design, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" /> </assemblies> <buildproviders> <add extension=".edmx" type="system.data.entity.design.aspnet.entitydesignerbuildprovider" /> </buildproviders> </compilation>
first of all, using legacy membership provider. here new asp.net universal providers which backward compatible legacy membership provider.
if want latest membership provider, want @ asp.net identity which not backward compatible legacy membership provider.
login failed user 'admin'.
according error message, login credential sql server not correct.
Comments
Post a Comment