Monday, March 26, 2012

Login failed for user MachineName\ASPNET

I am developing ASP.NET application in VS.NET.
It gave me an error message "Login failed for user 'MachineName\ASPNET".
I tried to share the database directory but it did not work.
I look into the database connection when setting the properties. It tested
OK.
However, when I run the application, it gives me error.
When I first develop this application as Windows application, it was fine.
Now, I make it as ASP.NET application and then it does work.
I also looking the knowledge base Q316989 but it does help me much. Maybe I
miss something.
Does anyone has any suggestions? Thanks.

Paul ShiueCheck to make sure the ASP.Net user permissions are setup correctly and you may want to check the user that is in the Machine.Config file in the windows/microsoft.net/[version]/config directory under processmodel.

Alan Washington
http://www.aewnet.com

> I am developing ASP.NET application in VS.NET.
> It gave me an error message "Login failed for user 'MachineName\ASPNET".
> I tried to share the database directory but it did not work.
> I look into the database connection when setting the properties. It tested
> OK.
> However, when I run the application, it gives me error.
> When I first develop this application as Windows application, it was fine.
> Now, I make it as ASP.NET application and then it does work.
> I also looking the knowledge base Q316989 but it does help me much. Maybe I
> miss something.
> Does anyone has any suggestions? Thanks.
> Paul Shiu

User submitted from AEWNET (http://www.aewnet.com/)
What are you trying to log in? A database? SQL Server (or other DB Server)
or Access DB (you mentioned "database directory", so I guess you may talking
about Access DB). If it is Access DB, you must make MachineName\ASPNET have
writing permission to the folder where *.mdb located.

"pshiue" <pshiue@.discussions.microsoft.com> wrote in message
news:0DFB9532-0E04-4027-A6EB-797E3D5CEDEE@.microsoft.com...
> I am developing ASP.NET application in VS.NET.
> It gave me an error message "Login failed for user 'MachineName\ASPNET".
> I tried to share the database directory but it did not work.
> I look into the database connection when setting the properties. It
tested
> OK.
> However, when I run the application, it gives me error.
> When I first develop this application as Windows application, it was fine.
> Now, I make it as ASP.NET application and then it does work.
> I also looking the knowledge base Q316989 but it does help me much. Maybe
I
> miss something.
> Does anyone has any suggestions? Thanks.
> Paul Shiue
I got it to work. Here is the information:

ms-help://MS.MSDNQTR.2003FEB.1033/vbcon/html/vbtskAccessingSQLServerUsingWindowsIntegratedSecur ity.htm

Paul
"pshiue" wrote:

> I am developing ASP.NET application in VS.NET.
> It gave me an error message "Login failed for user 'MachineName\ASPNET".
> I tried to share the database directory but it did not work.
> I look into the database connection when setting the properties. It tested
> OK.
> However, when I run the application, it gives me error.
> When I first develop this application as Windows application, it was fine.
> Now, I make it as ASP.NET application and then it does work.
> I also looking the knowledge base Q316989 but it does help me much. Maybe I
> miss something.
> Does anyone has any suggestions? Thanks.
> Paul Shiue

0 comments:

Post a Comment