Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 152
  • Last Modified:

Error when I try to Publish a web site

I get the following error when I try to publish a web site using asp .net 2.0.

The type 'UserObjectTest' exists in both c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\onlinereg\cca7fb14\d014180c\App_Web_3w9iizbn.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\onlinereg\cca7fb14\d014180c\App_Web_o1hfgute.dll' C:\Documents and Settings\nbilly\My Documents\Visual Studio 2005\OnlineReg\PageParticipantObjectTest.aspx

this is the code in PageParticipantObjectTest.aspx: <uc1:ParticipantObjectTest id="ParticipantObjectTest1" runat="server">
        </uc1:ParticipantObjectTest>  
When I uncomment the latter the publish works but my program doesn't work.  I have a link button in my default.aspx page and it has a postbackurl to PageParticipantObjectTest.aspx.  what's going on?
0
NBilly
Asked:
NBilly
  • 4
  • 4
1 Solution
 
existenz2Commented:
Delete your temporary asp.net files and also delete the dlls from your debug and release directory, reboot your computer and try it again. That should work.
0
 
NBillyAuthor Commented:
Where are temporary asp.net files located.  Also, where is the debug and release directory?
0
 
existenz2Commented:
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\onlinereg\

and Debug/Solution make are in the place where you located the Visual Studio Projects map, so most likely:

c:\inetpub\wwwroot\<projectname>\bin\debug\
c:\inetpub\wwwroot\<projectname>\bin\release\
c:\document and settings\<user name>\my documents\Visual Studio Projects\<projectname>\bin\release\
c:\document and settings\<user name>\my documents\Visual Studio Projects\<projectname>\bin\debug\

0
Technology Partners: 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!

 
NBillyAuthor Commented:
I delete the files you mentioned and rebooted the system.  I tried to publish again after that it gave me the same error.
0
 
existenz2Commented:
Are both: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\onlinereg\cca7fb14\d014180c\App_Web_3w9iizbn.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\onlinereg\cca7fb14\d014180c\App_Web_o1hfgute.dll'

deleted?
0
 
NBillyAuthor Commented:
Yes, I deleted all files in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\onlinereg.
0
 
existenz2Commented:
It is finding double declarations of a type called UserObjectTest, check your code to see if you accidently have defined multiple times the same class within the same namespace or in namespaces which look a lot like each other (Eg Test.UserObjectTest & User.Test.UserObjectTest can cause problems).
0
 
NBillyAuthor Commented:
You are right.  I had UserObjectTest defined multiple times.  I changed it  and it published it.  Thank you.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now