Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

http 500 internal server error how to fix

Tags:

iis

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);
like image 843
ghie Avatar asked May 30 '11 13:05

ghie


1 Answers

Also you can look at IIS log, that by default stores at C:\Windows\System32\LogFiles\W3SVC1 - there you can find the error description

like image 161
heximal Avatar answered Oct 26 '22 13:10

heximal