SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission'

前端 未结 2 747
梦毁少年i
梦毁少年i 2020-12-10 04:06

This is one of those \'works locally, doesn\'t work on the server\' posts.

I have a simple contact form that sends an email. On the server, I get the following excep

2条回答
  •  旧巷少年郎
    2020-12-10 04:28

    A low security level doesn't allow you to specify the smtp port. Default is port 25. Although my ISP specifies port 587, I can use port 25 and it works fine.

提交回复
热议问题