Re: Error loading class when developing web pages under folders

From: John (jcthREMOVETHISomas5_at_hotmail.com)
Date: 06/10/04


Date: Thu, 10 Jun 2004 17:18:13 GMT


> "Duron" <johnnykhlee@seed.net.tw> wrote in message

> > Then, I copied Web.config into /Member. After this, if I try to run
> > /Member/Default.aspx, an error message says I have to make this folder
an
> > web application in IIS. I did so. But then the old error (can not load
> > namespace MySite._Default) occurs.
> >
> > I haven't done many things to Web.config except the following,
> >
> > <authentication mode="None">
> > </authentication>
> > <authorization>
> > <allow users="*" />
> > </authorization>
> >
> > The reason why I add Web.config to that folder is because I want the
root
> > folder be free to access while /Member needs certification. How do
people
> > normally do this in VS.NET?

I could be wrong (ultranewb, here), but I believe the reason you're getting
an error message that says you have to 'make the folder an application' in
IIS is because you're trying to specify authentication again in your second
web.config file. Authentication can only be set in the web.config file in
the root directory, as it pertains to the whole application. So just remove
the <authentication> tag pair from the config file in the subdirectory and
everything else should be fine - the authorization section does the work you
need. Or you can, as was suggested, use 'location' tags in a single
web.config file at root.

HTH

-John



Relevant Pages

  • Re: Forms Authentication - Cookie not being generated...
    ... You should have only ONE web.config (root folder) with all these entries. ... access with Forms authentication so your login page (and all protected ... Check out the authorization configuration in both the root and ClientCenter ... I am not redirected to the login page. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: XP files question
    ... realize I can just use a subdirectory in the root directory - is ... On XP there isn't any reason not to create a folder for this ... program settings, to restore a catastrophic disk failure. ...
    (microsoft.public.windowsxp.basics)
  • Re: XP files question
    ... realize I can just use a subdirectory in the root directory - is ... On XP there isn't any reason not to create a folder for this ... data and program settings, to restore a catastrophic disk failure. ...
    (microsoft.public.windowsxp.basics)
  • Re: Web.config file
    ... i know it is possible to have this securing different folders in different ... > I have an application that I want to setup for each folder a web.config ... > with different authentication, but when I try to do that it gives me an ... > In the root I don't want to have redirect to login page if i try to access ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Web.config file
    ... i know it is possible to have this securing different folders in different ... > I have an application that I want to setup for each folder a web.config ... > with different authentication, but when I try to do that it gives me an ... > In the root I don't want to have redirect to login page if i try to access ...
    (microsoft.public.dotnet.framework.aspnet)