473,748 Members | 10,889 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application_err or event and Windows 2003

Hi.

I have the following code in my Global.asax Application_err or event:

Dim lgEntryLog As New Logs.Custom
Dim exApp As Exception = Server.GetLastE rror.GetBaseExc eption

Try
With lgEntryLog
.LogFile = "Site.log"
.LogPath = Request.Physica lApplicationPat h
.Message = exApp.Message
.Source = exApp.Source
.MethodName = exApp.TargetSit e.Name
.Url = Request.Url.ToS tring
.WriteData()
End With

Catch Ex As Exception
Throw Ex
End Try

That code works pretty well in my Windows 2000 workstation. It uses a
custom class that creates a text file and writes in it the information
collected above.

When I run the application in Windows 2003, under production, and some
error is thrown, the file is not created. My site is under
DefaultAppPool in IIS 6.0.
Could it be permissions issues?

Regards,
Chris Leffer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
4 1101
Chris,

Does the NETWORK SERVICE account have write permissions to that file?

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
ja******@online .microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
From: Chris Leffer <ch****@wank.co m>
X-Newsreader: AspNNTP 1.50 (ActionJackson. com)
Subject: Application_err or event and Windows 2003
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <#7************ **@TK2MSFTNGP10 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
Date: Mon, 09 Aug 2004 07:42:21 -0700
NNTP-Posting-Host: 67.41.129.85
Lines: 1
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2531 02
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet

Hi.

I have the following code in my Global.asax Application_err or event:

Dim lgEntryLog As New Logs.Custom
Dim exApp As Exception = Server.GetLastE rror.GetBaseExc eption

Try
With lgEntryLog
.LogFile = "Site.log"
.LogPath = Request.Physica lApplicationPat h
.Message = exApp.Message
.Source = exApp.Source
.MethodName = exApp.TargetSit e.Name
.Url = Request.Url.ToS tring
.WriteData()
End With

Catch Ex As Exception
Throw Ex
End Try

That code works pretty well in my Windows 2000 workstation. It uses a
custom class that creates a text file and writes in it the information
collected above.

When I run the application in Windows 2003, under production, and some
error is thrown, the file is not created. My site is under
DefaultAppPo ol in IIS 6.0.
Could it be permissions issues?

Regards,
Chris Leffer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 18 '05 #2
Hi Jim.

No, I didn't change anything related to permissions for the Network
Service account. Should I allow writes to only the file or to the
directory?

Since the Network Service account can't write to the file, shouldn't I
receive an exception when the application tries to access the file?

Thanks.
Chris Leffer
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
Hi Chris,

Yes, you should. If memory serves, you didn't give us the complete error
you are receiving. If you attach the HTML file itself to your post, I can
look at the full stack trace (it's in the HTML comments) to see what
happened.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
ja******@online .microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
From: Chris Leffer <ch****@wank.co m>
References: <BK************ *@cpmsftngxa06. phx.gbl>
X-Newsreader: AspNNTP 1.50 (ActionJackson. com)
Subject: RE: Application_err or event and Windows 2003
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <eW************ **@TK2MSFTNGP09 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
Date: Mon, 09 Aug 2004 10:04:45 -0700
NNTP-Posting-Host: 67.41.129.85
Lines: 1
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2531 66
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet

Hi Jim.

No, I didn't change anything related to permissions for the Network
Service account. Should I allow writes to only the file or to the
directory?

Since the Network Service account can't write to the file, shouldn't I
receive an exception when the application tries to access the file?

Thanks.
Chris Leffer
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 18 '05 #4
Sorry, Chris. I got your post confused with another one. Can you please
make sure to include the entire thread when replying? I am working a ton
of newsgroup cases and I get them mixed up.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
ja******@online .microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
From: ja******@online .microsoft.com (Jim Cheshire [MSFT])
Organization : Microsoft
Date: Tue, 10 Aug 2004 14:19:01 GMT
Subject: RE: Application_err or event and Windows 2003
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi Chris,

Yes, you should. If memory serves, you didn't give us the complete error
you are receiving. If you attach the HTML file itself to your post, I can
look at the full stack trace (it's in the HTML comments) to see what
happened.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
ja******@onlin e.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
From: Chris Leffer <ch****@wank.co m>
References: <BK************ *@cpmsftngxa06. phx.gbl>
X-Newsreader: AspNNTP 1.50 (ActionJackson. com)
Subject: RE: Application_err or event and Windows 2003
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <eW************ **@TK2MSFTNGP09 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
Date: Mon, 09 Aug 2004 10:04:45 -0700
NNTP-Posting-Host: 67.41.129.85
Lines: 1
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2531 66
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet

Hi Jim.

No, I didn't change anything related to permissions for the Network
Service account. Should I allow writes to only the file or to the
directory?

Since the Network Service account can't write to the file, shouldn't I
receive an exception when the application tries to access the file?

Thanks.
Chris Leffer
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 18 '05 #5

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

Similar topics

1
5924
by: Greg Burns | last post by:
I am trying to write a global custom error page. I thought I would jot down some of what I've learned so far... At first I just used the default customErrors section with a defaultRedirect tag, as such: <customErrors defaultRedirect="error.aspx" mode="On" /> First thing I found out about this method, is that I didn't have access to the exception object in my error.aspx page. So this page was going to be
6
1438
by: Rippo | last post by:
I have a problem with the application_error event being fired from my asp.net application with windows 2003 server standard edition. The event fires fine from my test machine (XP) and all works well. However the event never appears to fire from windows 2003. I have tried just about everything and can not find an answer. I cannot debug through the windows 2003 server as I do not have VS installed on it plus it is a live server Can any...
1
1857
by: David Herbst | last post by:
VS 2005 / .NET 2.0 Windows 2000 Server sp4 (on development as well as testing server) Using Web Deployment Project to build assemblies for testing and production servers. I added a Global.asax file to my web site so I could implement a Application_Error() handler. The handler works fine on my development web server but when I deploy it to the testing web server it doesn't execute. Instead I get the detailed ASP.NET error page or my...
0
1507
by: Brian | last post by:
Greetings group! I've got a weird one. I have an ASP.NET 1.1 application that has been running on a dual-processor Windows 2000/IIS 5 server for a couple of years. Global.asax has an Application_Error() function that writes an entry to the event log. Everything works great. We're migrating to Windows 2003 on a new server, so I built up a virtual PC (MS Virtual Server) Win2k3/IIS6 (single processor) box for testing and everything works...
0
8991
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
8830
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
9370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9247
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
8242
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
6796
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
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
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

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.