@Html.ActionLink is working on local machine but not on the live server

Posted by Sheonarayan under Error and Solution on 10/21/2013 | Points: 10 | Views : 1173 | Status : [Administrator] | Replies : 3

I was facing this very strange problem.

The @Html.ActionLink was as usual working on my local (dev machine) but when I uploaded on the server, the @Html.ActionLink returns empty string.

I searched a lot in google and many suggests to use @Url.Content or @Url.Action etc helper methods but it didn't work. I even set below setting into web.config file.

 <modules runAllManagedModulesForAllRequests="true" />


What worked for me?


My server had .NET Framework 4.0 installed and now I thought there might be a bug in the .NET Framework that MS would have fixed so I decided to install .NET Framework 4.5 and it did the work.

Amazingly, it worked. Everything is working fine now.

Hope my experience will help someone.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com



Responses

Posted by: Allemahesh on: 10/22/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Thanks for you problem and solution. This will help others.

Sheonarayan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sheonarayan on: 11/9/2013 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Most welcome Allemahesh! Do keep submitting these kinds of problem solution posts to help others.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Sheonarayan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sourav.Kayal on: 11/9/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Thanks sir, for sharing problem and solution.

Read my blog here
http://ctrlcvprogrammer.blogspot.in/

Sheonarayan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response