Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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?

Posted (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 by joeybagadonutz
Posted
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..............................

  • 10 months later...
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...