Last post Jan 08, 2015 09:12 AM by AidyF
Jan 08, 2015 08:05 AM|fanibabu|LINK
whenever i try to login to my asp.net web application it sounds error written above
plz help me login to my app
whats the issue
my web.config file is have string as below
<add name="AMSConStr" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=AMS;Persist Security Info=True;User ID=admin;Password=admin;" providerName="System.Data.SqlClient"/>
Jan 08, 2015 08:11 AM|AidyF|LINK
The error is fairly self-explanatory, the user "admin" with password "admin" isn't valid for the AMS database. We don't have access to your database so it is impossible to say why. Google how to create logins on SQL Express and you'll find a walkthrough
of steps that you can check. It could be you have created the admin user ok but not given it access to the AMS database.
Jan 08, 2015 08:13 AM|Mikesdotnetting|LINK
The error means that the "admin" Login doesn't have permission to access the AMS database. You need to use SQL Server Management Studio to provide them with permission.
Jan 08, 2015 08:43 AM|fanibabu|LINK
Sir how can i give it a permission to login??
plz tell me
Jan 08, 2015 09:08 AM|Mikesdotnetting|LINK
If you have already created the "admin" login in SQL Server, you can use the following SQL:
CREATE USER [admin] FOR LOGIN [admin] WITH DEFAULT_SCHEMA=[dbo]
Or, in SSMS, find your database and go to the Security node then Users » New User, then find your admin login by clicking the ellipses next to "Login Name".
Jan 08, 2015 09:12 AM|AidyF|LINK
Is you're using SQL Management Studio, open the Logins section, right-click your admin user, properties, user mapping, select the databases they have access to. Google for setting up users if you're having problems, there are loads of articles and walkthroughs