NAVmoble - the pocket-sized ERP
Optimized for Microsoft Dynamics NAV and Windows Mobile powered devices

Tuesday, March 09, 2010

System.Web.Mvc.HtmlHelper<object> does not contain a definition for ActionLink

 

I spent some time playing with ASP.NET MVC 2 RC . Everything was smooth and nice until I tried to upload my simple app on a “production” server.

The app its self was a basic test app without any valuable functionality , but I wanted to test the deployment process of such an app.

So I copied the  files on the machine and made some configuration changes on the web server. I opened my web browser, hit the app and KA-BOOOOM …… I got the yellow screen of pain:

image

 

NOTES: my server has .NET 3.5 SP1 installed and System.Web.MVC.dll 2.0 registered in GAC.

All my trials to find a solution from someone else failed. I’ve checked if  I have all the needed namespaces in the <pages>/<namespaces> tag. I’ve checked if my app is configured to work

I’ve checked if I have the right assemblies deployed on the machine. Still no success!

 

Fortunately, I had a luck and found the problem my self by exploring the Web.config file. I found that I had by mistake replaced a symbol in the CompilerVersion string

image

 

So I replaced the “?” symbol with “p” and the yellow screen disappeared.

3 comments:

Unknown said...

How unbelievably specific to your situation...

Unknown said...

For anyone else having this problem and has tried the above solution without success, try adding this to the web.config

Uday said...

I also came across the same issue and followed the above guidelines(?). Issue resolved!!!