Solved

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

Posted on 2010-11-12
12
399 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
Comment Utility
clear the "Bin" folder, and publish your application again.
0
 
LVL 11

Expert Comment

by:jasonduan
Comment Utility
I mean clear the "Bin" folder on the server.
0
 

Author Comment

by:quipuha
Comment Utility
I just tried that jasonduan, no luck.  Same error message.
0
 
LVL 11

Expert Comment

by:jasonduan
Comment Utility
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
Comment Utility
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
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

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

Expert Comment

by:jasonduan
Comment Utility
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
Comment Utility
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
Comment Utility
Here is the file list:

 quipuha-369215.flv
0
 
LVL 11

Accepted Solution

by:
jasonduan earned 500 total points
Comment Utility
Looks good.

You probably need contact he hosting company now.
0
 

Author Closing Comment

by:quipuha
Comment Utility
OK, thanks jasonduan
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now