• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 455
  • Last Modified:

.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?
0
quipuha
Asked:
quipuha
  • 7
  • 5
1 Solution
 
jasonduanCommented:
clear the "Bin" folder, and publish your application again.
0
 
jasonduanCommented:
I mean clear the "Bin" folder on the server.
0
 
quipuhaAuthor Commented:
I just tried that jasonduan, no luck.  Same error message.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
jasonduanCommented:
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?

0
 
quipuhaAuthor Commented:
Unfortunately, I don't have access to that folder on the web server.  It's a third-party web hosting company.  Any other ideas?
0
 
jasonduanCommented:
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?

0
 
quipuhaAuthor Commented:
Just App_Code.dll.  I don't know where that other .dll came from.
0
 
jasonduanCommented:
You need call the hosting company to clear the "Temporary ASP.NET Files\" folder, somehow, it is in a corrupt state.
0
 
jasonduanCommented:
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?
0
 
quipuhaAuthor Commented:
Here is the file list:

 quipuha-369215.flv
0
 
jasonduanCommented:
Looks good.

You probably need contact he hosting company now.
0
 
quipuhaAuthor Commented:
OK, thanks jasonduan
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now