Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-11-12
12
Medium Priority
?
424 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

721 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