Here I will explain about my database connection error in SQL Server if trying to get data by using asp.net.
Description
I have created one database in my Local SQL Server Management Studio in that I created one table and entered some data in that table.
I opened visual studio and created one sample application using asp.net to access the data from the table to achieve this functionality. I written correct code in asp.net and I run application to get data from database at that time I got error like this
Cannot open database "MySamplesDB" requested by the login. The login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
For solving this error I have searched so many sites they given variety of answers after check all websites I find common and simple solution that is
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
Subscribe by RSS
Subscribe by Email
8 comments :
hi thanks for your post it's helps me to solve my problem
hi,
could you tell, how to do the same using query and also i'm able to create user for a specific db, however, when i verify under properties, the user is not mapped to dabase
Hi Suresh,
Very Urgent...Please
How to store a login values in session and when logout the user session also closed after when browser also closed by the user session will not present on browser.
great
HAI SURESH please solve the problem in sql server
The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.
thanks:D is a small word for such a helpful post.....this post was the perfect ans to my problem
Hi I am not getting NT AUTHORITY\NETWORK SERVICE,so how i will sorted out same problem,Please help me out for this.
Thanks .
Regards,
Vivek
Hai this is Veeresh
This is My connection String
I am Getting Error
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)