User1520731567 posted
Hi vaverbukh2,
When i am sending email on my local machine email working fine but when i am trying to send from Development server i am getting this error:
laterSystem.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at NYCDOE.EIS.Portal.Utils.EMailUtil.MailWebPage(String url, SecureQueryString param, String emailfrom, String emailto,
String emailsubject, String userid, String sysid) at EISPortal.PSWaivers.PSWaiverApplication.SendEmail_Click(Object sender, EventArgs e)
According to your descriptions,we couldn't directly find the issue.Because there are many reasons why this error can be caused.
I suggest you could follow below ways to find the details error message.
First, you need to enable and see detailed errors of your web messages, because this is a general message without giving information on what's really happening for security reasons.
With the detailed error, you can locate the real issue here.
Also, if you can run the browser on the server, you get details on the error, because the server recognizes that you are local and shows it to you. Or if you can read the log of the server using the Event Viewer, you also see the details of
your error.
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
More details,you could refer to:
https://stackoverflow.com/questions/5385714/deploying-website-500-internal-server-error
Besides, I guess you may not use the right way to publish the app, you could refer to:
https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/visual-studio-web-deployment/deploying-to-iis#publish-to-iis
Best Regards.
Yuki Tao