I am having a problem "500 Internal Server Error" when I used web service call. What is causing this problem? How to resolve it?
Please advise me..
Here's my code:
MailMessage objEmail = new MailMessage(new MailAddress(ConfigurationManager.AppSettings["emailAdd"].ToString()), new MailAddress(ConfigurationManager.AppSettings["emailAdd"].ToString()));
objEmail.Subject = "Test";
objEmail.Body = "EJSCODE:" + _Message;
objEmail.Priority = MailPriority.High;
SmtpClient SmtpMail = new SmtpClient();
SmtpMail.Host = "localhost";
SmtpMail.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
SmtpMail.PickupDirectoryLocation = @"C:\Inetpub\wwwroot\MailMsg2";
SmtpMail.Send(objEmail);
Also you can look at IIS log, that by default stores at C:\Windows\System32\LogFiles\W3SVC1 - there you can find the error description
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With