Tuesday, March 27, 2012

Login failed for user computername\ASPNET

I just installed Visual Studio.Net, MSDE etc.

After several failed attempts I managed to almost completely through the ASP.NET walkthrough. Accessed the pubs database one the MSDE Server... Successful application build.

When I started the application it failed with:

==>Login failed for user 'computername\ASPNET'<==

It seems that I managed to hose something when I tried to delete some old deadwood Solutions.

What do I need to do with IIS or ? to get past the failure to login in.

I did a search here and on MSDN and couldn't come up with anything that was specific enough for me to understand.

Thanks in advance.Please check

http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=212691

http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20920388.html

HTH
I appreciate the references. Unfortunately I think I am simply to dumb to know where things are so that I can fix them. Based on what I have been reading it sounds like my system is not configured properly. It seems like I don't have users set up in the MDSE MSSQLServer or possible IIS. My understanding that these are "virtual servers". I have no idea who to administer either if these servers by adding users and giving permissions. The closest I have found is here:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20728747.html?query=Login+failed+for+user+ASPNET+&searchType=all

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'
pause

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'"
[DBMSLPCN]Invalid connection.
[DBMSLPCN]ConnectionOpen (ParseConnectParams()).

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:

Server:CSCHERL-D4500
Services:SQL Server
At the bottom of the box [Running - \\CSCHERL-D4500 – MSSQLServer]

Am I even closed to solving this problem?

Is there a possible problem in the "Component Designer generated code"?

Help.

ChuckS

0 comments:

Post a Comment