I'm new to ASP.NET MVC and I have inherited a project. I am trying to just publish the site to the staging server so I can test things. I had gotten it to publish successfully, and the site came up fine, but once you log in I get the following error.
Compiler Error Message: CS0433: The type 'System.Web.Mvc.WebViewPage<TModel>' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\06514788\844094e3\assembly\dl3\c0de57de\6523ae3b_4016d001\System.Web.Mvc.DLL' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.Mvc\v4.0_3.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll'
I've read a bunch of StackOverflows that say that I should remove the <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> line from my web.config file, but that didn't work.
I also tried removing and re-adding the System.Web.Mvc Reference. But still no luck.
The "Source Error" says public class _Page_Views_Account_SignIn_cshtml : System.Web.Mvc.WebViewPage<Project.Models.LogOnModel> {
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\06514788\844094e3\App_Web_signin.cshtml.5f83eb8c.vy3zmlsz.0.cs Line: 33
So does anyone have any ideas how to fix this error so that when you sign in the site works?
Thanks.
Build -> Clean Solutionin visual studio. If that doesn't work. Delete obj folder within your solution folder.