I have a question that is probably simple to answer for many of you, but just
leaves me baffled.

If I publish a ASP.NET website to my webserver in a new directory, but don't
create a virtual directory for it - I simply attempt to access it from the
default web direcotry say www.myweb.net/myapp/Default.aspx I always get an
error indicating that I need to complie: "Could not load the assembly
'App_Web_3um03wt4'. Make sure that it is compiled before accessing the page."

If I create a virtual directory OR drop the contents of the application to
my default www driectory, everything works as per expected.

Can anyone enlighten me? Thank you.

Re: Unable to find dll by Rick

Rick
Sat Mar 15 15:00:21 CDT 2008

ASP.NET dynamically compiles Web sites, so any source files in virtual
folder are automatically compiled and stored in a temp path.

The most important thing to realize is that ASP.NET is scoped to a virtual
directory (or root directory) and you have to ensure that somewhere along
the way up to the root there's a virtual directory configured in IIS. That
virtual - and its Bin directory and web.config - determine where and how
files are stored.

More importantly any code in your APP_CODE folder needs to reside below the
virtual directory. So if you just copied your files without creating a
virtual directory for the files your APP_CODE folder is not found - hence
the error you're seeing. You'll either need to make your directory a virtual
or move any code you have in APP_CODE (and any other of hte special folders
like APP_THEMES/APP_DATA) up to the virtual directory so the files can be
found.

Hope this helps,

+++ Rick ---

---
Rick Strahl
West Wind Technologies
www.west-wind.com/weblog


"T McDonald" <TMcDonald@discussions.microsoft.com> wrote in message
news:3D8D2745-3D3D-432D-8EB8-660805B4EB0F@microsoft.com...
>I have a question that is probably simple to answer for many of you, but
>just
> leaves me baffled.
>
> If I publish a ASP.NET website to my webserver in a new directory, but
> don't
> create a virtual directory for it - I simply attempt to access it from the
> default web direcotry say www.myweb.net/myapp/Default.aspx I always get an
> error indicating that I need to complie: "Could not load the assembly
> 'App_Web_3um03wt4'. Make sure that it is compiled before accessing the
> page."
>
> If I create a virtual directory OR drop the contents of the application to
> my default www driectory, everything works as per expected.
>
> Can anyone enlighten me? Thank you.


Re: Unable to find dll by TMcDonald

TMcDonald
Mon Mar 17 07:26:01 CDT 2008

Thank you. It doesn't entirely make sense to me, but it certainly explains
it. Once I moved the bin directory from the directory below the virtual, back
up to the virtual it indeed worked as you suggested.

So given that, if I have multiple "utilities" on one server, I can't merely
drop them into folders below the defaul virtual directory and have them use
each of their own web.configs? I would need to create virtual directory for
each distinct web.confg?

Thanks for the info.

"Rick Strahl" wrote:

> ASP.NET dynamically compiles Web sites, so any source files in virtual
> folder are automatically compiled and stored in a temp path.
>
> The most important thing to realize is that ASP.NET is scoped to a virtual
> directory (or root directory) and you have to ensure that somewhere along
> the way up to the root there's a virtual directory configured in IIS. That
> virtual - and its Bin directory and web.config - determine where and how
> files are stored.
>
> More importantly any code in your APP_CODE folder needs to reside below the
> virtual directory. So if you just copied your files without creating a
> virtual directory for the files your APP_CODE folder is not found - hence
> the error you're seeing. You'll either need to make your directory a virtual
> or move any code you have in APP_CODE (and any other of hte special folders
> like APP_THEMES/APP_DATA) up to the virtual directory so the files can be
> found.
>
> Hope this helps,
>
> +++ Rick ---
>
> ---
> Rick Strahl
> West Wind Technologies
> www.west-wind.com/weblog
>
>
> "T McDonald" <TMcDonald@discussions.microsoft.com> wrote in message
> news:3D8D2745-3D3D-432D-8EB8-660805B4EB0F@microsoft.com...
> >I have a question that is probably simple to answer for many of you, but
> >just
> > leaves me baffled.
> >
> > If I publish a ASP.NET website to my webserver in a new directory, but
> > don't
> > create a virtual directory for it - I simply attempt to access it from the
> > default web direcotry say www.myweb.net/myapp/Default.aspx I always get an
> > error indicating that I need to complie: "Could not load the assembly
> > 'App_Web_3um03wt4'. Make sure that it is compiled before accessing the
> > page."
> >
> > If I create a virtual directory OR drop the contents of the application to
> > my default www driectory, everything works as per expected.
> >
> > Can anyone enlighten me? Thank you.
>