I've developed an application in asp.net MVC.
My application sends a mail using my smtp server.
It works fine in my local PC/network, But when I send mail using my web server (my website is hosted in godaddy.com), I get the following error:
Error: Insufficient permissions for setting the configuration property 'port'. (D:\Hosting\6295866\html\web.config line 177)
My web.config file settings are as follow:
<configuration>
<system.net>
<mailSettings>
<smtp from="vikas.patel@sufalamtech.com" deliveryMethod="Network">
<network host="mail.sufalamtech.com" port="2626" defaultCredentials="false" password="mypassword" userName="vikas.patel@sufalamtech.com" />
</smtp>
</mailSettings>
</system.net>
</configuration>
My SMTP server use the 2626 port to send email.