Moving MVC Sites from Azure to GoDaddy
This is just a brief post about what I experience hosting my MVC sites on GoDaddy. I will add more to this later. This will be an actua post, but right now I'm adding this with very little content so I have at least one blog post published after the move.
I'm pasting some of my notes below:
https://www.godaddy.com/community/Managing-Web-Hosting/Problem-with-Windows-Web-Hosting-quot-this-program-is-blocked/td-p/14500
1. Web.config needs to be changed so that <trust level="Full" /> is added in the system.web section.
2. Web.config needs to be changed so that the compilers are removed. The system.codedom needs to be empty. <system.codedom /> <!-- No compiling on server, GoDaddy blocks it. -->
3. The settings "File Publish Options" in Visual Studio for publishing the website need to be changed to enable precompiling the website.
The root cause of the issue is that GoDaddy does not allow compiling of the website on the server. This was the permission issue observed above. Once these were done the site came up fine.
****Don't forget to change permissions on Uploads folder (select Write)****
https://www.godaddy.com/help/send-email-using-systemnetmail-19291
//add to web.config
<system.net>
<mailSettings>
<smtp from="your email address">
<network host="relay-hosting.secureserver.net" port="25" />
</smtp>
</mailSettings>
</system.net>
add under system.web
<!--Set trust level to "Full" for GoDaddy Hosting-->
<trust level="Full" />
//C# code
MailMessage message = new MailMessage();
message.From = new MailAddress("your email address");
message.To.Add(new MailAddress("your recipient"));
message.Subject = "your subject";
message.Body = "content of your email";
SmtpClient client = new SmtpClient();
client.Send(message);
http://vandelayweb.com/sending-asp-net-emails-godaddy-gmail-godaddy-hosted/
0 COMMENTS