473,385 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using multiple web.config files...

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
6 5489
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
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
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
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
"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
1
by: Vlad | last post by:
Is there any way to install multiple instances of the same windows service designed with VS.NET 2003? I tried copying the binaries into a separate folder and then copying registry entries for the...
1
by: RK | last post by:
Hi I am working on C# application, where in I may require just one app.config for the C#.NET solution with multiple windows application projects. I know one web.config can be used for multiple...
6
by: Daniel Groh | last post by:
Hi Sirs, Could I use 2 config files in the same solution ? I have 2 projects in my solution (Data - Class Library, MySite - Web Application) But the funcking =/ problem happens because i want the...
4
by: Shrinivas | last post by:
Hi, Let us say my web.config is keep growing and I want to break the data logically and still use web.config methods to retrieve the data. e.g. <?xml version="1.0" encoding="utf-8" ?>...
2
by: Sam | last post by:
Hi All, I have a solution which consists of multiple projects and each of these projects has their own app.config file. The problem is that all of my projects in the solution pull keys from the...
1
by: herbert | last post by:
In VS.2005 a Windows Service can have an app.config file. A class library can also have an app.config file. Now if my Windows Services uses three class libraries, each of it coming with its own...
3
by: | last post by:
I'm seeking (probably basic) guidance on the right way to split a large site that's supposed to represent one domain(mydomain.org) into many small VS.NET projects, and how to avoid issues with...
2
by: Fresno Bob | last post by:
I quite like to store variables in the web.config file. However it can make the web.config messy and make deployment fiddly. Is there any way of have multiple web.config files - one with the major...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.