Solved

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

Posted on 2010-11-12
12
402 Views
Last Modified: 2012-08-13
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
Comment
Question by:quipuha
  • 7
  • 5
12 Comments
 
LVL 11

Expert Comment

by:jasonduan
ID: 34123922
clear the "Bin" folder, and publish your application again.
0
 
LVL 11

Expert Comment

by:jasonduan
ID: 34123933
I mean clear the "Bin" folder on the server.
0
 

Author Comment

by:quipuha
ID: 34123977
I just tried that jasonduan, no luck.  Same error message.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 11

Expert Comment

by:jasonduan
ID: 34124041
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
 

Author Comment

by:quipuha
ID: 34124055
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
 
LVL 11

Expert Comment

by:jasonduan
ID: 34124084
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
 

Author Comment

by:quipuha
ID: 34124132
Just App_Code.dll.  I don't know where that other .dll came from.
0
 
LVL 11

Expert Comment

by:jasonduan
ID: 34124214
You need call the hosting company to clear the "Temporary ASP.NET Files\" folder, somehow, it is in a corrupt state.
0
 
LVL 11

Expert Comment

by:jasonduan
ID: 34124252
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
 

Author Comment

by:quipuha
ID: 34124369
Here is the file list:

 quipuha-369215.flv
0
 
LVL 11

Accepted Solution

by:
jasonduan earned 500 total points
ID: 34124452
Looks good.

You probably need contact he hosting company now.
0
 

Author Closing Comment

by:quipuha
ID: 34124473
OK, thanks jasonduan
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question