Solution to login fail exception while making a connection to SQL Server database from ASP.net page.
You may face login fail exception while making a connection to SQL Server database.Error appears something like this
" Login failed for user 'me'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'me'.
Source Error:
Line 49: Private Sub blogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles blogin.Click
Line 50: 'Server.Transfer("m_emp_dep.aspx", True)
Line 51: conn.Open()
Line 52: cmd.Connection = conn
Line 53: '
Source File: c:\inetpub\wwwroot\WebApplication2\Home.aspx.vb Line: 51"
This exception can be result that either user 'me' doesn't exist or it doesn't have proper access rights. In order too check existence of user in your SQL server
Open 'Enterprise Manager'
Go to Microsoft SQL Servers-> SQL Server group
Expand your Server
Go to Logins
Check whether the login for user 'me' exist if it doesn't exist then right click and Select New Login and give proper access rights
If it is already there then check the access rights for that user by right clicking user and going to properties. Click on 'Database Access' tab. You can control which database can be accessed by that user by selecting that database from all databases list and assign appropriate database roles like Public, db_owner , db_accessadmin, db_securityadmin.
Start earning now, Join my network on Bukisa
.
Due to boom in the information technology field, people look for outsourcing and thereby prefer...
Choosing the best hosting company websites is the most effective way to permanently attract vis...
For looking best hosting service is the normal thing among the people in the business. Fatcow i...
Here is the tutorial to run your own web server with your computer or laptop....
One of the most crucial decisions you will make for your website is selecting your web host. It...
Images play an important role in making your website lively and are basic part of web. Images a...
his article tells how to enable disable USB port. There are various ways in which USB devices c...
simple process for registration to DND (Do Not Disturb) registry of Airtel. You can register yo...
simple process for registration to DND (Do Not Disturb) registry of Vodafone. You can register ...
simple process for registration to DND (Do Not Disturb) registry of TATA DOCOMO. You can regist...