Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-11-12
12
Medium Priority
?
437 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

876 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