application_error sub not working on win 2003 server

joeybagadonutz

Regular
Joined
Nov 6, 2003
Messages
72
Hi,
I have some code in an asp.net project that works great for sending me emails on a regular form in the project. However, when I put this code in the application_error sub of the global.asax file, it never sends email. I run the debugger and the application_error IS firing, but just no email is being sent.

I am running vs.net on windows 2003 server.

On my home xp machine, when I do this, everything works, no problems with the application_error running the code, and it sends emails fine.

What could this be? Permissions? If so, what permissions do I change...how and where. Thanks.

-JBD
 
continued...

I just put in a try catch, and there is no error. It executes but it doesnt send an email. I also tried to have it write to a text file, and it doesnt do that either.

when I step through the application_error sub in debug mode, after it steps through with no errors, and then I exit the sub, i get a message box that comes up that says this: "There is no source code available for the current location." and I get buttons that say "ok" or "show dissassembly"

Other then that though there isnt really an error. Ideas?

Like I said, this works fine on my xp machine running vs.net, and it works in this same project on the win 2003 server on the normal web forms. I'm stumped.

Why does this work in vs.net on xp, but not on windows 2003 server?
 
PlausiblyDamp said:
Just a quickie but is the SMTP service properly configured on the server?

Yep, if it wasnt, why would it work on the other forms in the project? This is the same smtp server i used for all of my email forms, it just wont work in the application_error sub.

Also, I tried to do an eventlog writer as well, and that wont work either, I don't think it is mail related, it wont write event logs, text files or send email. It's almost like its a permission thing but I have even tried making the iusr_machinename and aspnet accounts be administrators and rebuilt solution...still doesnt work.
 
Last edited:
joeybagadonutz said:
Yep, if it wasnt, why would it work on the other forms in the project? This is the same smtp server i used for all of my email forms, it just wont work in the application_error sub.

Also, I tried to do an eventlog writer as well, and that wont work either, I don't think it is mail related, it wont write event logs, text files or send email. It's almost like its a permission thing but I have even tried making the iusr_machinename and aspnet accounts be administrators and rebuilt solution...still doesnt work.


bump..............................
 
Derek Stone said:
You'll need to attach your global.asax file and any classes from which it may inherit.

Just to share what the solution was...

I had to go into my registry, under the event log in services, and set the permissions to full control for Network Service.
 
Back
Top