joeybagadonutz Posted November 6, 2004 Posted November 6, 2004 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 Quote
joeybagadonutz Posted November 6, 2004 Author Posted November 6, 2004 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? Quote
Administrators PlausiblyDamp Posted November 6, 2004 Administrators Posted November 6, 2004 Just a quickie but is the SMTP service properly configured on the server? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
joeybagadonutz Posted November 6, 2004 Author Posted November 6, 2004 (edited) 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. Edited November 6, 2004 by joeybagadonutz Quote
joeybagadonutz Posted November 8, 2004 Author Posted November 8, 2004 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.............................. Quote
*Gurus* Derek Stone Posted November 8, 2004 *Gurus* Posted November 8, 2004 Please do not bump threads. Your post will be removed if it continues. Quote Posting Guidelines
*Gurus* Derek Stone Posted November 8, 2004 *Gurus* Posted November 8, 2004 You'll need to attach your global.asax file and any classes from which it may inherit. Quote Posting Guidelines
joeybagadonutz Posted September 25, 2005 Author Posted September 25, 2005 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.