Duplicate type error?
Asked Answered
F

6

7

We have been having a random issue with our live website. We're not sure what exactly is causing the issue. We tried clearing the temporary files but the issue happened again. We even killed the IIS app_pool so that it wouldn't be holding any of them in memory. As soon as we put the site back up we get this error again.

Compiler Error Message: CS0433: The type 'ASP.modules_dataentry_provider_orderhistory_ascx' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\44d35bd0\b13314db\App_Web_orderhistory.ascx.8106afdb.spsukqu_.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\44d35bd0\b13314db\App_Web_xg5e4m3x.dll'

Felton answered 9/12, 2011 at 15:39 Comment(4)
I had the same issue before, but when I build the application for several times it was fixed.Spondylitis
Have you tried cleaning out the bin directory and redeploying the contents of bin from your local build to the server bin directory again? It looks like you are using a website project, so you want to make sure an old version of a page dll isn't present.Cortie
this usually happen during deploy when someone keep a safety copy of the old dll under the bin folder...Arkansas
We had to actually delete the entire website folder, not just the bin. The caching issue was happening with a user control. Not exactly sure how the mechanism causing the issue works. All I know is that completely wiping everything out and re-deploying the code fixed our issues.Felton
A
6

There is not a lot to work with but I think that your deployment of your website went wrong somewhere in the line. You probably only did a overwrite of the folder which could leave old assemblies there. Try to do a clean deploy by first deleting the old assemblies.

Apperceive answered 9/12, 2011 at 15:47 Comment(1)
This was exactly it. The build script we use to push the site to our testing environment actually completely deletes the existing directory before pushing the new code out. However, the script that pushes the site to our live environment was NOT deleting the existing directory, thus the caching issues. Thanks for the help!Felton
W
3

I ran into this same issue. Usually refreshing the page a few times would clear it out, but ultimately this advice helped out.

Set the compilation configuration to batch = false:

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

Give it a try and see if it helps.

Wheelsman answered 9/12, 2011 at 15:46 Comment(0)
S
2

just delete

c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\44d35bd0\

directory and build again

ASP.NET store compiled dll's into that temp folder, and I guess it create twice in your case

Hope this helps

Shipway answered 9/12, 2011 at 15:43 Comment(1)
We already tried this. We cleared all the contents of the "Temporary ASP.NET Files". As soon as we started the site again it happened again.Felton
D
2

I have had this issue before, and deleting the Debug & Release folders within the obj directory of my project fixed this for me.

Dealt answered 9/12, 2011 at 15:57 Comment(0)
C
1

A similar error has happened to me with website projects.

As each page's code behind gets compiled into a separate dll, then you move that type to a different page (or even rename the original parent page) sometimes, the remote dll the old type was defined in hangs around. Clearing out the bin directory and redeploying the dll files has solved this for me in the past. Also make sure you don't have any old aspx/ascx referring to this in the website that you no longer have in your project.

Cortie answered 9/12, 2011 at 15:48 Comment(0)
Q
-1

I had the same issue on my web application and the fix was to change all the "CodeFile" into "CodeBehind"

<%@ Page Language="C#" CodeFile="Default.aspx.cs" MasterPageFile="~/Main.ma ...

To

<%@ Page Language="C#" CodeBehind="Default.aspx.cs" MasterPageFile="~/Main.ma...
Quianaquibble answered 12/4, 2013 at 0:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.