compilation error only in published version (converted to asp.net 2.0)

R

rsphere

my app is running just fine on my home dev box. no compilation errors
at all. when i move the whole file structure to my hosted site i get
the following error when opening the main page:

----------
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 'Subodei.Database.History'
exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET
Files\spherop_globalphatness\e1f1b599\c5add1ce\App_Code.pqe5fcz6.dll'
and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\spherop_globalphatness\e1f1b599\c5add1ce\assembly\dl3\c59b5d0c\f0c309bc_9f14c601\Subodei.DLL'

Source Error:



Line 55: private void DisplaySnapshot()
Line 56: {
Line 57: History history = new History();

......

any ideas on what's happening here?
 
W

Wouter van Vugt

Hi,

the Subodei.Database.History class is found in two assemblies. One
compiled from the app_code folder inside Visual Studio 2005. The other
might be left over from porting your application to ASP.NET 2.0. Is it
possible you reference the Subodei.Database DLL? If you do, and also
have the History class in app_code, it might be present two times at
runtime. Throw one away, probably the old one found in the
Subodei.Database dll (if that DLL actually exists, I am guessing here).
Clear the Temporary ASP.NET folder
(c:\windows\Microsoft.NET\Framework\v2.0\)

Grtz, Wouter van Vugt
www.infosupport.com
 
G

Guest

I had this same problem. I fumed over it for hours, but figured out exactly
what happened. I had a form "register.aspx" which I had been working on in
VS2005. It worked fine in the DEV environment (debug mode) and even when
published.

But, at a critical juncture in my development I got the bright idea to make
a backup of this .aspx. So I went to the file system and did a quick copy
and paste of the file into the same directory as the originial....
"inetpub/wwwroot/register". So now that directory contained both
"register.aspx" and "copy of register.aspx".

After that, I went to publish the project and I didn't notice but it had
compiled the file "copy of register.aspx" into the project. This caused the
class "register" to occur twice in the compiled version and gave me the same
error that you reported.

T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top