Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using multiple web.config files...

Reply
Thread Tools

Using multiple web.config files...

 
 
Andrew Connell
Guest
Posts: n/a
 
      10-21-2003
I have an app where I want virtually everything password protected/secure except for a single directory. That directory handles some custom authentication and contains my login form, but also some other pages that I need to make available to anon users.

I've setup my web.config in the root directory to have the following included:
<authentication mode="Forms">
<forms name=".ASPXFORMSAUTH" path="/" loginUrl="portalAuthentication/outbound.aspx" protection="All" timeout="30"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>

What I want to do is set the directory 'portalAuthentication' to let anyone have access. I added a second web.config with the following:
<authentication mode="None" />
<authorization>
<allow users="*"/>
</authorization>
Everything was working fine with the single web.config in the root directory, but when I added the second to the 'portalAuthentication' directory, I started getting the error:
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
My root directory is setup correctly within IIS. I'm fairly certain I didn't have to create additional vdir/applications for the portalAuthentication directory. Any ideas?

--
-AC
<replace NOSPAM with my last name>
 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      10-21-2003
What you want is DataGrid1.BackColor property it takes a Color enum such as
Color.Red
regards

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits/default.htm

"Andrew Connell" <> wrote in message
news:uYbJhf$...
I have an app where I want virtually everything password protected/secure
except for a single directory. That directory handles some custom
authentication and contains my login form, but also some other pages that I
need to make available to anon users.

I've setup my web.config in the root directory to have the following
included:
<authentication mode="Forms">
<forms name=".ASPXFORMSAUTH" path="/"
loginUrl="portalAuthentication/outbound.aspx" protection="All"
timeout="30"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>

What I want to do is set the directory 'portalAuthentication' to let anyone
have access. I added a second web.config with the following:
<authentication mode="None" />
<authorization>
<allow users="*"/>
</authorization>
Everything was working fine with the single web.config in the root
directory, but when I added the second to the 'portalAuthentication'
directory, I started getting the error:
Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS.
My root directory is setup correctly within IIS. I'm fairly certain I
didn't have to create additional vdir/applications for the
portalAuthentication directory. Any ideas?

--
-AC
<replace NOSPAM with my last name>


 
Reply With Quote
 
 
 
 
Jerry III
Guest
Posts: n/a
 
      10-22-2003
You can't use multiple config files in a single application. Instead, you
need to create (one or more) <location> sections in your root Web.Config.

Jerry

"Andrew Connell" <> wrote in message
news:uYbJhf$...
I have an app where I want virtually everything password protected/secure
except for a single directory. That directory handles some custom
authentication and contains my login form, but also some other pages that I
need to make available to anon users.

I've setup my web.config in the root directory to have the following
included:
<authentication mode="Forms">
<forms name=".ASPXFORMSAUTH" path="/"
loginUrl="portalAuthentication/outbound.aspx" protection="All"
timeout="30"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>

What I want to do is set the directory 'portalAuthentication' to let anyone
have access. I added a second web.config with the following:
<authentication mode="None" />
<authorization>
<allow users="*"/>
</authorization>
Everything was working fine with the single web.config in the root
directory, but when I added the second to the 'portalAuthentication'
directory, I started getting the error:
Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS.
My root directory is setup correctly within IIS. I'm fairly certain I
didn't have to create additional vdir/applications for the
portalAuthentication directory. Any ideas?

--
-AC
<replace NOSPAM with my last name>


 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      10-22-2003
"Jerry III" <> wrote in message
news:...
> You can't use multiple config files in a single application. Instead, you
> need to create (one or more) <location> sections in your root Web.Config.


This turns out not to be the case. You can use multiple config files in a
single application.

What you can't do is use the <authentication> element, which is "registered
as allowDefinition='MachineToApplication'" in your subfolder, which is not
an application. Just remove <authentication> and you'll be alright.
--
John


>
> "Andrew Connell" <> wrote in message
> news:uYbJhf$...
> I have an app where I want virtually everything password protected/secure
> except for a single directory. That directory handles some custom
> authentication and contains my login form, but also some other pages that

I
> need to make available to anon users.
>
> I've setup my web.config in the root directory to have the following
> included:
> <authentication mode="Forms">
> <forms name=".ASPXFORMSAUTH" path="/"
> loginUrl="portalAuthentication/outbound.aspx" protection="All"
> timeout="30"></forms>
> </authentication>
> <authorization>
> <deny users="?"/>
> </authorization>
>
> What I want to do is set the directory 'portalAuthentication' to let

anyone
> have access. I added a second web.config with the following:
> <authentication mode="None" />
> <authorization>
> <allow users="*"/>
> </authorization>
> Everything was working fine with the single web.config in the root
> directory, but when I added the second to the 'portalAuthentication'
> directory, I started getting the error:
> Parser Error Message: It is an error to use a section registered as
> allowDefinition='MachineToApplication' beyond application level. This

error
> can be caused by a virtual directory not being configured as an

application
> in IIS.
> My root directory is setup correctly within IIS. I'm fairly certain I
> didn't have to create additional vdir/applications for the
> portalAuthentication directory. Any ideas?
>
> --
> -AC
> <replace NOSPAM with my last name>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using ajax call to fetch multiple results from multiple queries and showing them 1 by 1 as the results comes. Biranchi Narayan Panda ASP .Net 0 02-21-2010 03:46 PM
WSDL.exe : Using multiple appsettingurlkeys for multiple web services david@somuah.com ASP .Net Web Services 0 04-02-2008 08:35 PM
Multiple ISPs and Multiple IP Ranges from Each ISP Chennak Cisco 10 06-08-2005 09:29 PM
IP Address Scheme for Multiple DMZs on Multiple PIXs Scotchy Cisco 2 10-07-2004 03:35 PM
Re: One solution containing multiple projects and multiple hosts Stephen Miller ASP .Net 0 06-24-2003 12:55 PM



Advertisments