Avatar of quipuha
quipuha
 asked on

.NET Compile Error - type exists in both ...

I am developing a web application (C# VS 2008).  App works fine locally.  To publish to my host, I publish locally (using File System to a local directory).  Then, I manually FTP files to my web host.

When I try to run the page, I'm getting the following error:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0433: The type 'Core' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\11dc5a36\51e0badc\App_Code.okyxvrfm.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\11dc5a36\51e0badc\assembly\dl3\02b50bd1\76c9bdf0_a182cb01\App_Code.DLL'

Source Error:

Line 20:        
Line 21:
Line 22:         SqlConnection connection = new SqlConnection(Core.CONNECTION_STRING);
Line 23:         SqlCommand cmd = new SqlCommand();
Line 24:         SqlDataReader myReader = null;



The Core.CONNECTION_STRING holds my db connection string.

This only occurs when I run the app on my web host.  Any ideas?
ASP.NET

Avatar of undefined
Last Comment
quipuha

8/22/2022 - Mon
jasonduan

clear the "Bin" folder, and publish your application again.
jasonduan

I mean clear the "Bin" folder on the server.
quipuha

ASKER
I just tried that jasonduan, no luck.  Same error message.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
jasonduan

Can you try clear folder (on server) "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\" first then do the upload to see what happens?

quipuha

ASKER
Unfortunately, I don't have access to that folder on the web server.  It's a third-party web hosting company.  Any other ideas?
jasonduan

Do you really have 2 APP_Code dlls in your deployment Bin folder?
(App_Code.okyxvrfm.dll and App_Code.DLL)
Which one do you have?

⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
quipuha

ASKER
Just App_Code.dll.  I don't know where that other .dll came from.
jasonduan

You need call the hosting company to clear the "Temporary ASP.NET Files\" folder, somehow, it is in a corrupt state.
jasonduan

Once you uploaded APP_Code.dll and other APP_Web_xxx.dll files, you cannot upload .code behind files anymore.

Can you post the files list that you loadloaded to the server?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
quipuha

ASKER
Here is the file list:

 quipuha-369215.flv
ASKER CERTIFIED SOLUTION
jasonduan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
quipuha

ASKER
OK, thanks jasonduan