Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

M

mark.norgate

I'm using ASP.NET 2.0 and Windows Server 2003.

A common problem it seems, and I've followed all the advice on the
world wide interweb but I still get the following message:

Cannot open database requested in login 'verfiy'. Login fails.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

I've added VERIFY\IIS_WPG to the Verify database users, as well as NT
AUTHORITY\NETWORK SERVICE, just to be on the safe side, assigned them
both the db_owner role, but still get the above error. My connection
string looks like this:

Server=localhost;Database=verfiy;Trusted_Connection=True;

What am I missing?

Ta, Mark
 
S

Sahil Malik [MVP C#]

You need to use SQL Server authentication instead of Windows authentication.
There are ways to use Windows Auth with ASP.NET, but changing over to SQL
Server auth. is the simplest quickfix to your problem.
 
M

Miha Markic [MVP C#]

Hi Mark,

Just to make sure - is your asp.net app on the same machine as database?
 
S

Sahil Malik [MVP C#]

www.connectionstrings.com <--- check that site out :)


--
- Sahil Malik [MVP]
http://blah.winsmarts.com


Oo, really? So how I modify it for SQL authentication?
That's your SQL Server - but your connection string still uses Windows.

- Sahil Malik [MVP]
http://blah.winsmarts.com




It's already set to use "SQL Server and Windows" authentication.

Mark

Sahil Malik [MVP C#] wrote:
You need to use SQL Server authentication instead of Windows
authentication.
There are ways to use Windows Auth with ASP.NET, but changing over to
SQL
Server auth. is the simplest quickfix to your problem.


--
- Sahil Malik [MVP]
http://blah.winsmarts.com


I'm using ASP.NET 2.0 and Windows Server 2003.

A common problem it seems, and I've followed all the advice on the
world wide interweb but I still get the following message:

Cannot open database requested in login 'verfiy'. Login fails.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

I've added VERIFY\IIS_WPG to the Verify database users, as well as
NT
AUTHORITY\NETWORK SERVICE, just to be on the safe side, assigned
them
both the db_owner role, but still get the above error. My connection
string looks like this:

Server=localhost;Database=verfiy;Trusted_Connection=True;

What am I missing?

Ta, Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top