Could not load type after copy/paste .ascx files into a directory set as application in IIS

B

Bogosian

I am working on an asp.net project.There is a subdir called
OSearch,with a few aspx pages in it which as all other pages on the
website use some controls.These controls are stored in a another
subdir as .ascx files.I made OSearch application in IIS ,because i
want all the pages in it with authentiacation.now these pages couldnt
load the controls ,because they were in a different application.i made
a controls folder in OSearch and copy/pasted all the needed controls
there.changed what the namespace in the ascx.cs and inherits=... in
the html part.now when i run it a Could not load type error appears
pointing at the page directive of a page,which was o.k. before
copy/pasting the controls.any idea what went wrong?

scheme of the project:
project
I
I
____controls directory
I
I
I
____OSearch directory = application in IIS
I
I
_____controls directory content = project.controls
copy/paste
I

thanks in advance
 
J

Jim Cheshire [MSFT]

Hi Bogosian,

This error is likely caused by the type not being compiled into your
assembly. After you copied over the files for your user controls, did you
recompile the project?

Jim Cheshire, MCSE, MCSD [MSFT]
Microsoft Product Support Services
ASP.NET Developer Support

This post is provided "as-is" and confers no rights.



--------------------
 
B

Bogosian

Happy new year and thanks for paying attention to my question,Jim.
Yes i did compile it and it didn,t work again.I searched in the
forums about my problem before posting and most usual explanation for
such an error was exactly this but its not in my case.Any other idea?
 
J

Jim Cheshire [MSFT]

Bogosian,

It's hard to say without more information. Where did these controls come
from? Were they copied from a folder for a different application? Is it
possible you have a namespace problem?

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: (e-mail address removed) (Bogosian)
Newsgroups: microsoft.public.dotnet.framework.aspnet
Subject: Re: Could not load type after copy/paste .ascx files into a
directory set as application in IIS
 
B

Bogosian

Jim,I solved the problem by removeing the folder from the solution and
creating a brand new project in the solution.I read yesterdey
somewhere that making a folder in a project a separate application is
not a good thing and decided to do make my folder a project.Now
evrething works fine.Thanks for paying attention to my newbie
questions.
 
J

Jim Cheshire [MSFT]

Hi Bogosian,

Glad to hear it. Thanks for the update.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: (e-mail address removed) (Bogosian)
Newsgroups: microsoft.public.dotnet.framework.aspnet
Subject: Re: Could not load type after copy/paste .ascx files into a
directory set as application in IIS
Date: 6 Jan 2004 07:24:31 -0800
Organization: http://groups.google.com
Lines: 6
Message-ID: <[email protected]>
References: <[email protected]>
<[email protected]>
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top