473,785 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"NT Authority\Netwo rk Service" in Global.asax

This is weird

On my WinXP development box, database calls made from within my GLOBAL.ASAX go to SQLServer as user "ASPNET" even though I have impersonation turned on in my web.config. That's fine

Now, when I move the whole application over to my Windows 2003 Server box, during the GLOBAL.ASAX calls to SQLServer, I get "Login failed for NT AUTHORITY\NETWO RK SERVICE." I don't understand this. "NT AUTHORITY\NETWO RK SERVICE" isn't even a user in the user-list on the Windows2003 server

What is this and can you help

Ale

Nov 18 '05 #1
4 2028
To overcome a similar issue in a recent project I had to, surprisingly, turn
ON anonymous access. In my case, I was calling a stored procedure from a
webservice that had been called by an ASP.Net page. In the ASP.Net page, I
had impersonation turned on and had to turn anonymous access off for the
webservice to get the correct identity. The strange thing was that, in the
production IIS 5.0, SQL Server, on a different machine altogether started
returning the error you describe. Only when I turned anonymous access on
did it work correctly.

So, the point is...Play with anonymous access but it may not always work
consistently between IIS 5.1 and IIS 5.0.

Dale
"Alex Maghen" <al**@maghen.co m> wrote in message
news:DE******** *************** ***********@mic rosoft.com...
This is weird!

On my WinXP development box, database calls made from within my GLOBAL.ASAX go to SQLServer as user "ASPNET" even though I have
impersonation turned on in my web.config. That's fine.
Now, when I move the whole application over to my Windows 2003 Server box, during the GLOBAL.ASAX calls to SQLServer, I get "Login failed for NT
AUTHORITY\NETWO RK SERVICE." I don't understand this. "NT AUTHORITY\NETWO RK
SERVICE" isn't even a user in the user-list on the Windows2003 server.
What is this and can you help?

Alex

Nov 18 '05 #2
I'm not sure I get this. DO you mean that I should play with the access settings in IIS's security property page? Or do you mean the "Impersonat ion" section in Web.Config? In any case, this isn't really an option in this area anyway: I'll have to eventually set the access privilages the way I need 'em, right

Doesn't anyone know exactly what this error means

Thanks

Ale

----- DalePres wrote: ----

To overcome a similar issue in a recent project I had to, surprisingly, tur
ON anonymous access. In my case, I was calling a stored procedure from
webservice that had been called by an ASP.Net page. In the ASP.Net page,
had impersonation turned on and had to turn anonymous access off for th
webservice to get the correct identity. The strange thing was that, in th
production IIS 5.0, SQL Server, on a different machine altogether starte
returning the error you describe. Only when I turned anonymous access o
did it work correctly

So, the point is...Play with anonymous access but it may not always wor
consistently between IIS 5.1 and IIS 5.0

Dal
"Alex Maghen" <al**@maghen.co m> wrote in messag
news:DE******** *************** ***********@mic rosoft.com..
This is weird
On my WinXP development box, database calls made from within m GLOBAL.ASAX go to SQLServer as user "ASPNET" even though I hav
impersonation turned on in my web.config. That's fine Now, when I move the whole application over to my Windows 2003 Server box during the GLOBAL.ASAX calls to SQLServer, I get "Login failed for N
AUTHORITY\NETWO RK SERVICE." I don't understand this. "NT AUTHORITY\NETWO R
SERVICE" isn't even a user in the user-list on the Windows2003 server What is this and can you help
Ale

Nov 18 '05 #3
NT AUTHORITY is a specific type of user account that runs in
the context of an Application Pool. There is an interesting article
[2] that discusses the use of Integrated Security when MS-SQL
is or is not on the same machine as IIS.

Since I've recently had this same introduction to NT AUTHORITY
which I previously knew nothing about I decided to try to use that
Google thingy where I am now starting to get an understanding of
the circumstances. Hint Hint ;-)

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee. com
URL http://www.metromilwaukee.com/clintongallagher/

[1]
http://msdn.microsoft.com/library/de...entitytype.asp
[2]
http://www.winnetmag.com/SQLServer/F...hreadid=119443

"Alex Maghen" <al**@maghen.co m> wrote in message
news:FF******** *************** ***********@mic rosoft.com...
I'm not sure I get this. DO you mean that I should play with the access settings in IIS's security property page? Or do you mean the
"Impersonat ion" section in Web.Config? In any case, this isn't really an
option in this area anyway: I'll have to eventually set the access
privilages the way I need 'em, right?
Doesn't anyone know exactly what this error means?

Thanks.

Alex

----- DalePres wrote: -----

To overcome a similar issue in a recent project I had to, surprisingly, turn ON anonymous access. In my case, I was calling a stored procedure from a webservice that had been called by an ASP.Net page. In the ASP.Net page, I had impersonation turned on and had to turn anonymous access off for the webservice to get the correct identity. The strange thing was that, in the production IIS 5.0, SQL Server, on a different machine altogether started returning the error you describe. Only when I turned anonymous access on did it work correctly.

So, the point is...Play with anonymous access but it may not always work consistently between IIS 5.1 and IIS 5.0.

Dale
"Alex Maghen" <al**@maghen.co m> wrote in message
news:DE******** *************** ***********@mic rosoft.com...
> This is weird!
>> On my WinXP development box, database calls made from within my
GLOBAL.ASAX go to SQLServer as user "ASPNET" even though I have
impersonation turned on in my web.config. That's fine.
>> Now, when I move the whole application over to my Windows 2003
Server box, during the GLOBAL.ASAX calls to SQLServer, I get "Login failed for NT AUTHORITY\NETWO RK SERVICE." I don't understand this. "NT AUTHORITY\NETWO RK SERVICE" isn't even a user in the user-list on the Windows2003

server. >> What is this and can you help?
>> Alex

>

Nov 18 '05 #4
Its probablly because the event from your global.asax does not have a user
to impersonate. If that's the issue, then you are impersonating the user
that visits the site instead of a single user you set up in a config file,
correct?

Some events that fire in ASP.NET are fired by the ASP.NET process, not a
user visiting the site. Let me know if that is the case. I'm still not up
to speed on all of the Win2k3 process stuff like i am on 2000, but I need to
learn it quick and don;t mind doing it :)
--
Eric Marvets
Principal Consultant

the bang project

<shameless self promotion>

Email sa*********@ban gREMOVETHISproj ect.com for Information on Our
Architecture and Mentoring Services

</shameless self promotion>
Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6266
by: VC | last post by:
Hello, I have an issue here. Hope someone can help me. Issue: Developer is using a web application from one server (IIS) (say Server A). A second server (say Server B, which is SQL Server 2000) hosts the stored procedures. The SQL datawarehouse is hosted on a third server (say Server C ,which is SQL Server 2000) and contains allof the data.
0
3404
by: Ross Bennett | last post by:
Ahoy, Folks! I've been looking all over for this, but I just can't seem to shake any documentation out of the MSDN or from Google. I've reviewed every .NET article on developing Windows Services in the MSDN I've located. I'm developing a Windows Service application. This service reads its configuration data from the system registry (HKLM) where it was deposited by another "manager" application. No problems there.
3
1640
by: Claire | last post by:
Sorry for such a daft question. Ive been following some tutorials on creating windows services. Ive not done them before. In my original debuggable windows form application, I create my worker classes. The classes 'run' themselves using several threads and only stop when the form is closed. Now I've used these worker classes in the service application. When I try to run my service manually, I am given a message that the service stopped...
0
1203
by: Peter Rilling | last post by:
I am wondering what the consequences are of using the "nt authority\network service" account in an Application Pool so that IIS can connect to a SQLServer database as opposed to creating a domain account specifically for that purpose.
14
2411
by: RDI | last post by:
I'm in the process of wiritng a custom AutoResponder that will run on a spare PC. If I don't write it as an actual "Service" but just a program that starts via the startup folder, will that use any more (or less) resources than doing it as a Service? Is it worth the extra effort to do it as a service? --
11
8338
by: jjw92 | last post by:
I've been banging my head against the wall with this one for a couple days so I'm hoping someone has some ideas. I have a web service that I created that is called by a .NET class library (which in turn is called by another application). This all works fine in my development environment. Test environment: Windows Server 2003, ASP 6.0, .NET 2.0, Anonymous authentication is enabled. All components (web service, DLL, and calling application)...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9952
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8976
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.