By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,783 Members | 1,943 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,783 IT Pros & Developers. It's quick & easy.

Using multiple web.config files...

P: n/a
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>
Nov 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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" <sp**@aNOSPAM.com> wrote in message
news:uY**************@TK2MSFTNGP09.phx.gbl...
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>
Nov 17 '05 #2

P: n/a
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" <sp**@aNOSPAM.com> wrote in message
news:uY**************@TK2MSFTNGP09.phx.gbl...
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>
Nov 17 '05 #3

P: n/a
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" <sp**@aNOSPAM.com> wrote in message
news:uY**************@TK2MSFTNGP09.phx.gbl...
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>
Nov 17 '05 #4

P: n/a
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" <sp**@aNOSPAM.com> wrote in message
news:uY**************@TK2MSFTNGP09.phx.gbl...
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>
Nov 17 '05 #5

P: n/a
"Jerry III" <je******@hotmail.com> wrote in message
news:O0**************@TK2MSFTNGP11.phx.gbl...
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" <sp**@aNOSPAM.com> wrote in message
news:uY**************@TK2MSFTNGP09.phx.gbl...
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>

Nov 17 '05 #6

P: n/a
"Jerry III" <je******@hotmail.com> wrote in message
news:O0**************@TK2MSFTNGP11.phx.gbl...
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" <sp**@aNOSPAM.com> wrote in message
news:uY**************@TK2MSFTNGP09.phx.gbl...
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>

Nov 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.