Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > global.aspx Application_error does not fire on anything other than

Reply
Thread Tools

global.aspx Application_error does not fire on anything other than

 
 
jvcoach23
Guest
Posts: n/a
 
      01-14-2008
I've got a global.aspx file that works in my dev environment (vs 2005).
When i publish the site to a windows 2000 sp4 box running IIS, the global
does not seem to fire. Since it's a test server, i've tried granting the
user that IIS is using with all kinds of rights, that didn't work.... so is
there some setting i'm missing somewhere.

Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
Dim olog As New dempsey.TextFile
With olog
.FileName = "500Errors.txt"

..SaveText("-------------------------------------------------------------")
Dim err As Exception = Server.GetLastError()

.SaveText(Err.ToString)
.SaveText(err.StackTrace)
End With

Response.Redirect("~/500Error.htm")
end sub

and an bit from the web.config file
<compilation debug="false" strict="false" explicit="true">

hope someone can help out...
just to be more complete.. in the appliction_error, i'm also writing some
info out to a sql database... again.. that works running things out of visual
studio.. but not when the code is published..

thanks
shannon
 
Reply With Quote
 
 
 
 
Peter Bromberg [C# MVP]
Guest
Posts: n/a
 
      01-14-2008
try using

Server.GetLastError().GetBaseException()

That's where all the information is.
Then call Server.ClearError()
before you redirect.

Are you getting an exeption when the call to the Database is made? It's
another possibility that could be blowing everything up on you.

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com


"jvcoach23" wrote:

> I've got a global.aspx file that works in my dev environment (vs 2005).
> When i publish the site to a windows 2000 sp4 box running IIS, the global
> does not seem to fire. Since it's a test server, i've tried granting the
> user that IIS is using with all kinds of rights, that didn't work.... so is
> there some setting i'm missing somewhere.
>
> Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
> ' Code that runs when an unhandled error occurs
> Dim olog As New dempsey.TextFile
> With olog
> .FileName = "500Errors.txt"
>
> .SaveText("-------------------------------------------------------------")
> Dim err As Exception = Server.GetLastError()
>
> .SaveText(Err.ToString)
> .SaveText(err.StackTrace)
> End With
>
> Response.Redirect("~/500Error.htm")
> end sub
>
> and an bit from the web.config file
> <compilation debug="false" strict="false" explicit="true">
>
> hope someone can help out...
> just to be more complete.. in the appliction_error, i'm also writing some
> info out to a sql database... again.. that works running things out of visual
> studio.. but not when the code is published..
>
> thanks
> shannon

 
Reply With Quote
 
 
 
 
jvcoach23
Guest
Posts: n/a
 
      01-14-2008
I'll try that..

I don't think the sql logging is causing any problems. I'm using a class to
write to the database, this class is using the same connection string that
all the other database calls are using and i'm able to do inserts for those.
i've watched in sql profiler and the sql box is not getting hit by the this
call... so i don't think it's firing... i understand though that if it was
getting chocked up on this, that it would make the call.. i've also tried
writing out to a log file, again, that works when running in visual studio,
but not when it is published.

"Peter Bromberg [C# MVP]" wrote:

> try using
>
> Server.GetLastError().GetBaseException()
>
> That's where all the information is.
> Then call Server.ClearError()
> before you redirect.
>
> Are you getting an exeption when the call to the Database is made? It's
> another possibility that could be blowing everything up on you.
>
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com
>
>
> "jvcoach23" wrote:
>
> > I've got a global.aspx file that works in my dev environment (vs 2005).
> > When i publish the site to a windows 2000 sp4 box running IIS, the global
> > does not seem to fire. Since it's a test server, i've tried granting the
> > user that IIS is using with all kinds of rights, that didn't work.... so is
> > there some setting i'm missing somewhere.
> >
> > Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
> > ' Code that runs when an unhandled error occurs
> > Dim olog As New dempsey.TextFile
> > With olog
> > .FileName = "500Errors.txt"
> >
> > .SaveText("-------------------------------------------------------------")
> > Dim err As Exception = Server.GetLastError()
> >
> > .SaveText(Err.ToString)
> > .SaveText(err.StackTrace)
> > End With
> >
> > Response.Redirect("~/500Error.htm")
> > end sub
> >
> > and an bit from the web.config file
> > <compilation debug="false" strict="false" explicit="true">
> >
> > hope someone can help out...
> > just to be more complete.. in the appliction_error, i'm also writing some
> > info out to a sql database... again.. that works running things out of visual
> > studio.. but not when the code is published..
> >
> > thanks
> > shannon

 
Reply With Quote
 
Shannon
Guest
Posts: n/a
 
      01-14-2008
Hi Peter.. another question

what is a way that i can test.. or trap if there is something causing the
application_error to bomb.. i mean.. if i have something wrong with my code
or something else is going wrong, what is the best way to figure that out...

if the application_error is running, but i'm bombing out on some of my
code.. what is somethign that i can put in there to test to see if it's
running. i'll commit out all my code

hopefully that way i can give you better info so you can set me straight..

thanks
shannon

"Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> try using
>
> Server.GetLastError().GetBaseException()
>
> That's where all the information is.
> Then call Server.ClearError()
> before you redirect.
>
> Are you getting an exeption when the call to the Database is made? It's
> another possibility that could be blowing everything up on you.
>
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com
>
>
> "jvcoach23" wrote:
>
>> I've got a global.aspx file that works in my dev environment (vs 2005).
>> When i publish the site to a windows 2000 sp4 box running IIS, the global
>> does not seem to fire. Since it's a test server, i've tried granting the
>> user that IIS is using with all kinds of rights, that didn't work.... so
>> is
>> there some setting i'm missing somewhere.
>>
>> Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
>> ' Code that runs when an unhandled error occurs
>> Dim olog As New dempsey.TextFile
>> With olog
>> .FileName = "500Errors.txt"
>>
>> .SaveText("-------------------------------------------------------------")
>> Dim err As Exception = Server.GetLastError()
>>
>> .SaveText(Err.ToString)
>> .SaveText(err.StackTrace)
>> End With
>>
>> Response.Redirect("~/500Error.htm")
>> end sub
>>
>> and an bit from the web.config file
>> <compilation debug="false" strict="false" explicit="true">
>>
>> hope someone can help out...
>> just to be more complete.. in the appliction_error, i'm also writing some
>> info out to a sql database... again.. that works running things out of
>> visual
>> studio.. but not when the code is published..
>>
>> thanks
>> shannon



 
Reply With Quote
 
Jeff Dillon
Guest
Posts: n/a
 
      01-14-2008
Make sure the directory is marked at an IIS Application/virtual directory

Jeff
"jvcoach23" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've got a global.aspx file that works in my dev environment (vs 2005).
> When i publish the site to a windows 2000 sp4 box running IIS, the global
> does not seem to fire. Since it's a test server, i've tried granting the
> user that IIS is using with all kinds of rights, that didn't work.... so
> is
> there some setting i'm missing somewhere.
>
> Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
> ' Code that runs when an unhandled error occurs
> Dim olog As New dempsey.TextFile
> With olog
> .FileName = "500Errors.txt"
>
> .SaveText("-------------------------------------------------------------")
> Dim err As Exception = Server.GetLastError()
>
> .SaveText(Err.ToString)
> .SaveText(err.StackTrace)
> End With
>
> Response.Redirect("~/500Error.htm")
> end sub
>
> and an bit from the web.config file
> <compilation debug="false" strict="false" explicit="true">
>
> hope someone can help out...
> just to be more complete.. in the appliction_error, i'm also writing some
> info out to a sql database... again.. that works running things out of
> visual
> studio.. but not when the code is published..
>
> thanks
> shannon



 
Reply With Quote
 
Shannon
Guest
Posts: n/a
 
      01-15-2008
thanks for the comment.. it is..any other suggestions

"Jeff Dillon" <(E-Mail Removed)> wrote in message
news:e5$(E-Mail Removed)...
> Make sure the directory is marked at an IIS Application/virtual directory
>
> Jeff
> "jvcoach23" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I've got a global.aspx file that works in my dev environment (vs 2005).
>> When i publish the site to a windows 2000 sp4 box running IIS, the global
>> does not seem to fire. Since it's a test server, i've tried granting the
>> user that IIS is using with all kinds of rights, that didn't work.... so
>> is
>> there some setting i'm missing somewhere.
>>
>> Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
>> ' Code that runs when an unhandled error occurs
>> Dim olog As New dempsey.TextFile
>> With olog
>> .FileName = "500Errors.txt"
>>
>> .SaveText("-------------------------------------------------------------")
>> Dim err As Exception = Server.GetLastError()
>>
>> .SaveText(Err.ToString)
>> .SaveText(err.StackTrace)
>> End With
>>
>> Response.Redirect("~/500Error.htm")
>> end sub
>>
>> and an bit from the web.config file
>> <compilation debug="false" strict="false" explicit="true">
>>
>> hope someone can help out...
>> just to be more complete.. in the appliction_error, i'm also writing some
>> info out to a sql database... again.. that works running things out of
>> visual
>> studio.. but not when the code is published..
>>
>> thanks
>> shannon

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      01-15-2008
re:
!> any other suggestions

1. Make sure the ASPNET account in the W2K server
( if you're not impersonating ASP.NET's account ),
which is the default account ASP.NET runs as under W2K,
has write permissions to the directory where 500Errors.txt is being written to.

If you don't know which account ASP.NET runs as in the W2K server,
save this code as "identity.aspx" and run it on the W2K server.

identity.aspx:
-------------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = "ASP.NET is running as the account : " & tmp
End Sub
</script>
<html>
<head>
<title>What account is ASP.NET running as ?</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
------------

Whichever account that code returns is the account which needs permissions.

2. Make sure the account returned by identity.aspx has the
specific access permissions for the directories listed in this article:

ASP.NET Required Access Control Lists (ACLs)
http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx

3. Register-unregister ASP.NET in IIS, by running aspnet_regiis
from a command window in the .Net Framework's 2.0 directory :

First unregister :

aspnet_regiis -u

Then, re-register :

aspnet_regiis -i

That will first delete and then recreate the ASP.NET account,
assigning the necessary permissions to that account.

I'd find it very strange if global.asax wouldn't fire,
if you have a healthy .Net Framework installation.

If none of these suggestions work, I'd uninstall the .Net Framework 2.0,
using the Add/Remove Programs applet in Control Panel...and reinstall it fully.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Shannon" <(E-Mail Removed)> wrote in message news:e%(E-Mail Removed)...
> thanks for the comment.. it is..any other suggestions
>
> "Jeff Dillon" <(E-Mail Removed)> wrote in message news:e5$(E-Mail Removed)...
>> Make sure the directory is marked at an IIS Application/virtual directory
>>
>> Jeff
>> "jvcoach23" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> I've got a global.aspx file that works in my dev environment (vs 2005).
>>> When i publish the site to a windows 2000 sp4 box running IIS, the global
>>> does not seem to fire. Since it's a test server, i've tried granting the
>>> user that IIS is using with all kinds of rights, that didn't work.... so is
>>> there some setting i'm missing somewhere.
>>>
>>> Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
>>> ' Code that runs when an unhandled error occurs
>>> Dim olog As New dempsey.TextFile
>>> With olog
>>> .FileName = "500Errors.txt"
>>>
>>> .SaveText("-------------------------------------------------------------")
>>> Dim err As Exception = Server.GetLastError()
>>>
>>> .SaveText(Err.ToString)
>>> .SaveText(err.StackTrace)
>>> End With
>>>
>>> Response.Redirect("~/500Error.htm")
>>> end sub
>>>
>>> and an bit from the web.config file
>>> <compilation debug="false" strict="false" explicit="true">
>>>
>>> hope someone can help out...
>>> just to be more complete.. in the appliction_error, i'm also writing some
>>> info out to a sql database... again.. that works running things out of visual
>>> studio.. but not when the code is published..
>>>
>>> thanks
>>> shannon

>>
>>

>
>



 
Reply With Quote
 
Shannon
Guest
Posts: n/a
 
      01-15-2008
thanks...
i had seen that identity page tip somewhere else.. the account that the test
box is using is ASPNET and i added that user to the administrator group.. i
understand that i won't want to do that in production, but in an effort to
try to figure out what i'm doing wrong so that the global is not working, i
thought that should open the door pretty wide..

do you have any other suggestions
thanks
shannon
"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> re:
> !> any other suggestions
>
> 1. Make sure the ASPNET account in the W2K server
> ( if you're not impersonating ASP.NET's account ),
> which is the default account ASP.NET runs as under W2K,
> has write permissions to the directory where 500Errors.txt is being
> written to.
>
> If you don't know which account ASP.NET runs as in the W2K server,
> save this code as "identity.aspx" and run it on the W2K server.
>
> identity.aspx:
> -------------------
> <%@ Page Language="VB" %>
> <%@ Import NameSpace = System.Security.Principal %>
> <script runat="server">
> Sub Page_Load()
> Dim tmp As String = WindowsIdentity.GetCurrent.Name()
> Label1.Text = "ASP.NET is running as the account : " & tmp
> End Sub
> </script>
> <html>
> <head>
> <title>What account is ASP.NET running as ?</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
> <asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
> </div>
> </form>
> </body>
> </html>
> ------------
>
> Whichever account that code returns is the account which needs
> permissions.
>
> 2. Make sure the account returned by identity.aspx has the
> specific access permissions for the directories listed in this article:
>
> ASP.NET Required Access Control Lists (ACLs)
> http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx
>
> 3. Register-unregister ASP.NET in IIS, by running aspnet_regiis
> from a command window in the .Net Framework's 2.0 directory :
>
> First unregister :
>
> aspnet_regiis -u
>
> Then, re-register :
>
> aspnet_regiis -i
>
> That will first delete and then recreate the ASP.NET account,
> assigning the necessary permissions to that account.
>
> I'd find it very strange if global.asax wouldn't fire,
> if you have a healthy .Net Framework installation.
>
> If none of these suggestions work, I'd uninstall the .Net Framework 2.0,
> using the Add/Remove Programs applet in Control Panel...and reinstall it
> fully.
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ======================================
> "Shannon" <(E-Mail Removed)> wrote in message
> news:e%(E-Mail Removed)...
>> thanks for the comment.. it is..any other suggestions
>>
>> "Jeff Dillon" <(E-Mail Removed)> wrote in message
>> news:e5$(E-Mail Removed)...
>>> Make sure the directory is marked at an IIS Application/virtual
>>> directory
>>>
>>> Jeff
>>> "jvcoach23" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> I've got a global.aspx file that works in my dev environment (vs 2005).
>>>> When i publish the site to a windows 2000 sp4 box running IIS, the
>>>> global
>>>> does not seem to fire. Since it's a test server, i've tried granting
>>>> the
>>>> user that IIS is using with all kinds of rights, that didn't work....
>>>> so is
>>>> there some setting i'm missing somewhere.
>>>>
>>>> Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
>>>> ' Code that runs when an unhandled error occurs
>>>> Dim olog As New dempsey.TextFile
>>>> With olog
>>>> .FileName = "500Errors.txt"
>>>>
>>>> .SaveText("-------------------------------------------------------------")
>>>> Dim err As Exception = Server.GetLastError()
>>>>
>>>> .SaveText(Err.ToString)
>>>> .SaveText(err.StackTrace)
>>>> End With
>>>>
>>>> Response.Redirect("~/500Error.htm")
>>>> end sub
>>>>
>>>> and an bit from the web.config file
>>>> <compilation debug="false" strict="false" explicit="true">
>>>>
>>>> hope someone can help out...
>>>> just to be more complete.. in the appliction_error, i'm also writing
>>>> some
>>>> info out to a sql database... again.. that works running things out of
>>>> visual
>>>> studio.. but not when the code is published..
>>>>
>>>> thanks
>>>> shannon
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      01-15-2008
re:
!> i had seen that identity page tip somewhere else...

Probably somewhere where I posted...or where someone posted my code without attribution.
I wrote that ditty.

re:
!> do you have any other suggestions

Run through the list of directories in the article link I posted,
and make sure the ASPNET account has the listed permissions.

As mentioned earlier, there's no reason for global.asax not to fire,
and for Application_Error not to fire, too, if you have a healthy install
of the .Net Framework and the .Net Framework is registered with IIS,
particularly if, as you say, the same code works in a test environment.

If none of the suggestions work, and unless the W2K server's admin
has explicitly forbidden the use of global.asax, uninstalling and reinstalling
the .Net Framework is the only recourse left.

Talk to the W2k server's admin...and see what (s)he says.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Shannon" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> thanks...
> i had seen that identity page tip somewhere else.. the account that the test box is using is ASPNET and i added that
> user to the administrator group.. i understand that i won't want to do that in production, but in an effort to try to
> figure out what i'm doing wrong so that the global is not working, i thought that should open the door pretty wide..
>
> do you have any other suggestions
> thanks
> shannon
> "Juan T. Llibre" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>> re:
>> !> any other suggestions
>>
>> 1. Make sure the ASPNET account in the W2K server
>> ( if you're not impersonating ASP.NET's account ),
>> which is the default account ASP.NET runs as under W2K,
>> has write permissions to the directory where 500Errors.txt is being written to.
>>
>> If you don't know which account ASP.NET runs as in the W2K server,
>> save this code as "identity.aspx" and run it on the W2K server.
>>
>> identity.aspx:
>> -------------------
>> <%@ Page Language="VB" %>
>> <%@ Import NameSpace = System.Security.Principal %>
>> <script runat="server">
>> Sub Page_Load()
>> Dim tmp As String = WindowsIdentity.GetCurrent.Name()
>> Label1.Text = "ASP.NET is running as the account : " & tmp
>> End Sub
>> </script>
>> <html>
>> <head>
>> <title>What account is ASP.NET running as ?</title>
>> </head>
>> <body>
>> <form id="form1" runat="server">
>> <div>
>> <asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
>> </div>
>> </form>
>> </body>
>> </html>
>> ------------
>>
>> Whichever account that code returns is the account which needs permissions.
>>
>> 2. Make sure the account returned by identity.aspx has the
>> specific access permissions for the directories listed in this article:
>>
>> ASP.NET Required Access Control Lists (ACLs)
>> http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx
>>
>> 3. Register-unregister ASP.NET in IIS, by running aspnet_regiis
>> from a command window in the .Net Framework's 2.0 directory :
>>
>> First unregister :
>>
>> aspnet_regiis -u
>>
>> Then, re-register :
>>
>> aspnet_regiis -i
>>
>> That will first delete and then recreate the ASP.NET account,
>> assigning the necessary permissions to that account.
>>
>> I'd find it very strange if global.asax wouldn't fire,
>> if you have a healthy .Net Framework installation.
>>
>> If none of these suggestions work, I'd uninstall the .Net Framework 2.0,
>> using the Add/Remove Programs applet in Control Panel...and reinstall it fully.
>>
>>
>>
>> Juan T. Llibre, asp.net MVP
>> asp.net faq : http://asp.net.do/faq/
>> foros de asp.net, en espaņol : http://asp.net.do/foros/
>> ======================================
>> "Shannon" <(E-Mail Removed)> wrote in message news:e%(E-Mail Removed)...
>>> thanks for the comment.. it is..any other suggestions
>>>
>>> "Jeff Dillon" <(E-Mail Removed)> wrote in message news:e5$(E-Mail Removed)...
>>>> Make sure the directory is marked at an IIS Application/virtual directory
>>>>
>>>> Jeff
>>>> "jvcoach23" <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> I've got a global.aspx file that works in my dev environment (vs 2005).
>>>>> When i publish the site to a windows 2000 sp4 box running IIS, the global
>>>>> does not seem to fire. Since it's a test server, i've tried granting the
>>>>> user that IIS is using with all kinds of rights, that didn't work.... so is
>>>>> there some setting i'm missing somewhere.
>>>>>
>>>>> Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
>>>>> ' Code that runs when an unhandled error occurs
>>>>> Dim olog As New dempsey.TextFile
>>>>> With olog
>>>>> .FileName = "500Errors.txt"
>>>>>
>>>>> .SaveText("-------------------------------------------------------------")
>>>>> Dim err As Exception = Server.GetLastError()
>>>>>
>>>>> .SaveText(Err.ToString)
>>>>> .SaveText(err.StackTrace)
>>>>> End With
>>>>>
>>>>> Response.Redirect("~/500Error.htm")
>>>>> end sub
>>>>>
>>>>> and an bit from the web.config file
>>>>> <compilation debug="false" strict="false" explicit="true">
>>>>>
>>>>> hope someone can help out...
>>>>> just to be more complete.. in the appliction_error, i'm also writing some
>>>>> info out to a sql database... again.. that works running things out of visual
>>>>> studio.. but not when the code is published..
>>>>>
>>>>> thanks
>>>>> shannon
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Shannon
Guest
Posts: n/a
 
      01-15-2008
ok.. i'll get to work on that.. i'm the admin of the IIS box.. it's just a
test box that is running on it's own workgroup... I've got the 1.1 and 2.0
framework installed on the box...

I'll go through that link.. and post what happens...

thanks
"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> re:
> !> i had seen that identity page tip somewhere else...
>
> Probably somewhere where I posted...or where someone posted my code
> without attribution.
> I wrote that ditty.
>
> re:
> !> do you have any other suggestions
>
> Run through the list of directories in the article link I posted,
> and make sure the ASPNET account has the listed permissions.
>
> As mentioned earlier, there's no reason for global.asax not to fire,
> and for Application_Error not to fire, too, if you have a healthy install
> of the .Net Framework and the .Net Framework is registered with IIS,
> particularly if, as you say, the same code works in a test environment.
>
> If none of the suggestions work, and unless the W2K server's admin
> has explicitly forbidden the use of global.asax, uninstalling and
> reinstalling
> the .Net Framework is the only recourse left.
>
> Talk to the W2k server's admin...and see what (s)he says.
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ======================================
> "Shannon" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> thanks...
>> i had seen that identity page tip somewhere else.. the account that the
>> test box is using is ASPNET and i added that user to the administrator
>> group.. i understand that i won't want to do that in production, but in
>> an effort to try to figure out what i'm doing wrong so that the global is
>> not working, i thought that should open the door pretty wide..
>>
>> do you have any other suggestions
>> thanks
>> shannon
>> "Juan T. Llibre" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> re:
>>> !> any other suggestions
>>>
>>> 1. Make sure the ASPNET account in the W2K server
>>> ( if you're not impersonating ASP.NET's account ),
>>> which is the default account ASP.NET runs as under W2K,
>>> has write permissions to the directory where 500Errors.txt is being
>>> written to.
>>>
>>> If you don't know which account ASP.NET runs as in the W2K server,
>>> save this code as "identity.aspx" and run it on the W2K server.
>>>
>>> identity.aspx:
>>> -------------------
>>> <%@ Page Language="VB" %>
>>> <%@ Import NameSpace = System.Security.Principal %>
>>> <script runat="server">
>>> Sub Page_Load()
>>> Dim tmp As String = WindowsIdentity.GetCurrent.Name()
>>> Label1.Text = "ASP.NET is running as the account : " & tmp
>>> End Sub
>>> </script>
>>> <html>
>>> <head>
>>> <title>What account is ASP.NET running as ?</title>
>>> </head>
>>> <body>
>>> <form id="form1" runat="server">
>>> <div>
>>> <asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
>>> </div>
>>> </form>
>>> </body>
>>> </html>
>>> ------------
>>>
>>> Whichever account that code returns is the account which needs
>>> permissions.
>>>
>>> 2. Make sure the account returned by identity.aspx has the
>>> specific access permissions for the directories listed in this article:
>>>
>>> ASP.NET Required Access Control Lists (ACLs)
>>> http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx
>>>
>>> 3. Register-unregister ASP.NET in IIS, by running aspnet_regiis
>>> from a command window in the .Net Framework's 2.0 directory :
>>>
>>> First unregister :
>>>
>>> aspnet_regiis -u
>>>
>>> Then, re-register :
>>>
>>> aspnet_regiis -i
>>>
>>> That will first delete and then recreate the ASP.NET account,
>>> assigning the necessary permissions to that account.
>>>
>>> I'd find it very strange if global.asax wouldn't fire,
>>> if you have a healthy .Net Framework installation.
>>>
>>> If none of these suggestions work, I'd uninstall the .Net Framework 2.0,
>>> using the Add/Remove Programs applet in Control Panel...and reinstall it
>>> fully.
>>>
>>>
>>>
>>> Juan T. Llibre, asp.net MVP
>>> asp.net faq : http://asp.net.do/faq/
>>> foros de asp.net, en espaņol : http://asp.net.do/foros/
>>> ======================================
>>> "Shannon" <(E-Mail Removed)> wrote in message
>>> news:e%(E-Mail Removed)...
>>>> thanks for the comment.. it is..any other suggestions
>>>>
>>>> "Jeff Dillon" <(E-Mail Removed)> wrote in message
>>>> news:e5$(E-Mail Removed)...
>>>>> Make sure the directory is marked at an IIS Application/virtual
>>>>> directory
>>>>>
>>>>> Jeff
>>>>> "jvcoach23" <(E-Mail Removed)> wrote in message
>>>>> news:(E-Mail Removed)...
>>>>>> I've got a global.aspx file that works in my dev environment (vs
>>>>>> 2005).
>>>>>> When i publish the site to a windows 2000 sp4 box running IIS, the
>>>>>> global
>>>>>> does not seem to fire. Since it's a test server, i've tried granting
>>>>>> the
>>>>>> user that IIS is using with all kinds of rights, that didn't work....
>>>>>> so is
>>>>>> there some setting i'm missing somewhere.
>>>>>>
>>>>>> Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
>>>>>> ' Code that runs when an unhandled error occurs
>>>>>> Dim olog As New dempsey.TextFile
>>>>>> With olog
>>>>>> .FileName = "500Errors.txt"
>>>>>>
>>>>>> .SaveText("-------------------------------------------------------------")
>>>>>> Dim err As Exception = Server.GetLastError()
>>>>>>
>>>>>> .SaveText(Err.ToString)
>>>>>> .SaveText(err.StackTrace)
>>>>>> End With
>>>>>>
>>>>>> Response.Redirect("~/500Error.htm")
>>>>>> end sub
>>>>>>
>>>>>> and an bit from the web.config file
>>>>>> <compilation debug="false" strict="false" explicit="true">
>>>>>>
>>>>>> hope someone can help out...
>>>>>> just to be more complete.. in the appliction_error, i'm also writing
>>>>>> some
>>>>>> info out to a sql database... again.. that works running things out
>>>>>> of visual
>>>>>> studio.. but not when the code is published..
>>>>>>
>>>>>> thanks
>>>>>> shannon
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application_Error does not fire Andy G ASP .Net 6 07-10-2006 11:00 AM
application_error wont' fire =?Utf-8?B?UGhpbA==?= ASP .Net 0 07-19-2005 07:27 PM
Anything Other Than EBay? WeeWilly Computer Support 2 06-16-2005 03:59 PM
Application_Error won't fire for web services ? enrico sabbadin ASP .Net Web Services 1 04-27-2004 11:07 AM
Update for AS5300: Anything other than IOS updates and MICA firmware? Pavlov Cisco 0 04-10-2004 01:23 PM



Advertisments