asp.netmaster-pages

Compiler Error Message: CS0433: The type 'MasterPage' exists in both 'c:\~\App_Web_ogmril5q.DLL' and 'c:\~\App_Web_ogmril5q.DLL'


I have 2 master pages inside one ASP.Net website. It work fine without publishing website. After publishing the website on the web server, one of the master pages works fine, but when I want to access the page that is linked with the second master page it gives me the above error. But the weird thing is that the error paths are in c\ drive of my computer.


Solution

  • When this has happened in the past [rare but I saw it once in production] you need to clear out the contents of your shadow copy folders for your application. These are usually in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files but the error path in your exception details will tell you where.