Question

I am getting error when i am publish my ASP.NET Application in localhost using IIS 7.5. all the pages run perfectly expect on and getting error:-

Compiler Error Message: CS0433: The type 'pages_Default' exists in both'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\785050d7\543e65af\assembly\dl3\6a3d3e87\242bc946_6834cf01\App_Web_zxwcuztt.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\785050d7\543e65af\assembly\dl3\c72e1cad\7d5dd447_6834cf01\App_Web_b5bhtyqt.DLL

Plese Help me to resolve this

No correct solution

OTHER TIPS

Try it:

I set the batch="false" attribute on the compilation section in web.config worked for me. This tells ASP.NET to dynamically compile individual .aspx/.ascx files into separate assemblies. This avoids the circular reference issue that triggers the exception.

<configuration>
   <system.web>
       <compilation debug="false" batch="false"></compilation>
   </system.web>
</configuration>

Or

You will have a path similar to the following:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

Delete the contents of this entire folder (no harm will be done), then try and Clean and Rebuild your solution.

Or

The problem occurred in a virtual application's bin folder. Looking into this bin-folder you will probably see two files (an information i found here):

App_global.asax.dll

App_global.asax.compiled

Removing these resolves the error. The App_global.asax.dll is generated at runtime too which causes the problem.

I am however still investigating how these files got there, so comments are definitely welcome!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top