Based on my searches, this problem happens a lot. I am a rookie and have attempted these solution and have gotten nowhere.
I am working (just starting) in a Visual Studio .NET environment using VB. Trying to get the ASP.NET Web App. Walkthrough to work. I can see that I am able to access the “pubs” database through via the via the VS/VB wizards. But at run time it doesn’t work.
Here’s part of the text of the message:
Login failed for user 'CSCHERL-D4500\ASPNET'.
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.SqlE
xception: Login failed for user 'CSCHERL-D4500\ASPNET'. Source Error:
Here is what I have tried with no change in the message.
1. Using the WIN XP Control panel I created a ASPNET admin user account with no password. I didn’t think that it would work as I was not setting this user up in the SQL Server.
2. I found what I thought was the solution here:
I tried building the .bat file and making the appropriate substitution to add the user to the MSDE SQL Server. Here’s what I tried
cd "C:\Program Files\Microsoft SQL Server\80\Tools\Binn"
osql -E -S CSCHERL-D4500\MSSQLServer r -Q "sp_grantlogin 'CSCHERL-D4500\ASPNET'"
osql -E -S CSCHERL-D4500\MSSQLServer -d pubs-Q "sp_grantdbaccess 'CSCHERL-D4500\ASPNET'"
osql -E -S CSCHERL-D4500\MSSQLServer -d pubs -Q "sp_addrolemember 'db_owner', 'CSCHERL-D4500\ASPNET'
Here’s what I get:
C:\Program Files\Microsoft SQL Server\80\Tools\Binn>osql -E -S CSCHERL-D4500\MSSQLServer -Q "sp_grantlogin 'CSCHERL-D4500\ASPNET'"
It seems pretty clear that I have a bad connection. I suspect that my “instance” of the SQLServer is improperly specified. The SQL Service Manager running in the task tray says the following:
At the bottom of the box [Running - \\CSCHERL-D4500 – MSSQLServer]
Am I even close to solving this problem???
Is there a possible problem in the “Component Designer generated code”???
What do I need to do and how (very clearly for this dummy) do I do it?