Re: global.aspx Application_error does not fire on anything other than



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" <shannonr@xxxxxxxxxxxxxxxxx> wrote in message news:e%23XqmX3VIHA.536@xxxxxxxxxxxxxxxxxxxxxxx
thanks for the comment.. it is..any other suggestions

"Jeff Dillon" <jeffdillon@xxxxxxxxxxxxxxxxx> wrote in message news:e5$2ciwVIHA.1168@xxxxxxxxxxxxxxxxxxxxxxx
Make sure the directory is marked at an IIS Application/virtual directory

Jeff
"jvcoach23" <jvcoach23@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:23940C55-C7BD-47E7-A7C5-5712E92DCB3A@xxxxxxxxxxxxxxxx
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






.



Relevant Pages

  • Re: Virtual Directory - Permission Denied with fso CopyFile
    ... TestUser (normal user account with same credentials on all machines). ... I created a share on a remote server. ... reviewing it's sharing permissions and security tab permissions "everyone" ... "directory security" tab on the vdir and selecting, edit, edit and manually ...
    (microsoft.public.inetserver.iis)
  • RE: SBS 2003/member Web Server and ISUR access
    ... NTFS permissions for the directories and files ... the IIS content directories have the following permissions. ... Server Extensions, ASPNET, SQL Server and other software is installed. ... The IUSR_MachineName account has the following permissions. ...
    (microsoft.public.windows.server.sbs)
  • Re: Virtual Directory - Permission Denied with fso CopyFile
    ... TestUser (normal user account with same credentials on all machines). ... I logged into the IIS server as vdirUser and simply typed ... open and I had read and write permissions to the share. ... I logged off and back into the IIS server as the administrator and deleted ...
    (microsoft.public.inetserver.iis)
  • Re: Server Unavailable - ASP.NET 2.0 on Windows XP
    ... The error message is "Server Application Unavailable". ... The user account I've ... Please review the permissions outlined in this article. ... So I switched to that directory in Command Prompt and tried the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Server Unavailable - ASP.NET 2.0 on Windows XP
    ... Please review the permissions outlined in this article. ... Make sure that the HOME-WKSTATION\ASPNET account has been assigned NTFS ... So I switched to that directory in Command Prompt and tried the following... ... I'm still getting the "Server Unavailable" error... ...
    (microsoft.public.dotnet.framework.aspnet)