Access to restricted folder

A

Alex. O. Koranteng

I have configured my app to use sql membership provider. I have a sub folder
which has specified pages to allow access to restricted users. When I ran the
application, I get this error: It is an error to use a section registered as
allow definition='Machineapplication' beyond application level, This error
can be caused by virtual directory not configured as virtual application.
 
A

Allen Chen [MSFT]

Hi Alex,

This exception is generally caused by the fact that the web.config file in
the sub folder is not correctly configured. Ideally the web.config should
only contain authorization element, as below:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>
<allow users="Test1" />
<deny users="Test2" />
</authorization>
</system.web>
</configuration>

Please try above code to see if it works. If it does, please then check if
some other elements are added in it. For example, if I add the membership
element it will throw following exception:

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.

Source Error:


Line 30: <system.web>
Line 31:
Line 32: <membership defaultProvider="MyProvider1"
userIsOnlineTimeWindow="15">
Line 33: <providers>
Line 34: <clear/>


Source File: C:\Inetpub\wwwroot\membershiperror\test\web.config Line: 32

From the above information we can see the memberhip element is the culprit

Please check it to see what the culprit is and let me know if you need
further assistance. Besides, here's a related post in the ASP.NET forum:
http://forums.asp.net/t/769696.aspx


Regards,
Allen Chen
Microsoft Online Community Support


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Thread-Topic: Access to restricted folder
| thread-index: AckijjpD9u5DdRUiR/CQZMFfKpOPhg==
| X-WBNR-Posting-Host: 65.55.21.8
| From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <[email protected]>
| Subject: Access to restricted folder
| Date: Mon, 29 Sep 2008 16:51:01 -0700
| Lines: 5
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3119
| Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:2681
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
|
| I have configured my app to use sql membership provider. I have a sub
folder
| which has specified pages to allow access to restricted users. When I ran
the
| application, I get this error: It is an error to use a section registered
as
| allow definition='Machineapplication' beyond application level, This
error
| can be caused by virtual directory not configured as virtual application.
|
 
A

Allen Chen [MSFT]

Hi Alex,

Have you got it solved?

Regards,
Allen Chen
Microsoft Online Support
--------------------
| X-Tomcat-ID: 18029247
| References: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Allen Chen [MSFT])
| Organization: Microsoft
| Date: Tue, 30 Sep 2008 02:21:41 GMT
| Subject: RE: Access to restricted folder
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| Lines: 110
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:2682
| NNTP-Posting-Host: TOMCATIMPORT3 10.201.220.210
|
| Hi Alex,
|
| This exception is generally caused by the fact that the web.config file
in
| the sub folder is not correctly configured. Ideally the web.config should
| only contain authorization element, as below:
|
| <?xml version="1.0" encoding="utf-8"?>
| <configuration>
| <system.web>
| <authorization>
| <allow users="Test1" />
| <deny users="Test2" />
| </authorization>
| </system.web>
| </configuration>
|
| Please try above code to see if it works. If it does, please then check
if
| some other elements are added in it. For example, if I add the membership
| element it will throw following exception:
|
| 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.
|
| Source Error:
|
|
| Line 30: <system.web>
| Line 31:
| Line 32: <membership defaultProvider="MyProvider1"
| userIsOnlineTimeWindow="15">
| Line 33: <providers>
| Line 34: <clear/>
|
|
| Source File: C:\Inetpub\wwwroot\membershiperror\test\web.config Line:
32
|
| From the above information we can see the memberhip element is the
culprit
|
| Please check it to see what the culprit is and let me know if you need
| further assistance. Besides, here's a related post in the ASP.NET forum:
| http://forums.asp.net/t/769696.aspx
|
|
| Regards,
| Allen Chen
| Microsoft Online Community Support
|
|
| Delighting our customers is our #1 priority. We welcome your comments and
| suggestions about how we can improve the support we provide to you.
Please
| feel free to let my manager know what you think of the level of service
| provided. You can send feedback directly to my manager at:
| (e-mail address removed).
|
| ==================================================
| Get notification to my posts through email? Please refer to
| http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
|
| Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
| where an initial response from the community or a Microsoft Support
| Engineer within 1 business day is acceptable. Please note that each
follow
| up response may take approximately 2 business days as the support
| professional working with you may need further investigation to reach the
| most efficient resolution. The offering is not appropriate for situations
| that require urgent, real-time or phone-based interactions or complex
| project analysis and dump analysis issues. Issues of this nature are best
| handled working with a dedicated Microsoft Support Engineer by contacting
| Microsoft Customer Support Services (CSS) at
|
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
| ==================================================
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
| --------------------
| | Thread-Topic: Access to restricted folder
| | thread-index: AckijjpD9u5DdRUiR/CQZMFfKpOPhg==
| | X-WBNR-Posting-Host: 65.55.21.8
| | From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <[email protected]>
| | Subject: Access to restricted folder
| | Date: Mon, 29 Sep 2008 16:51:01 -0700
| | Lines: 5
| | Message-ID: <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3119
| | Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| | Path: TK2MSFTNGHUB02.phx.gbl
| | Xref: TK2MSFTNGHUB02.phx.gbl
| microsoft.public.dotnet.framework.aspnet.security:2681
| | NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
| |
| | I have configured my app to use sql membership provider. I have a sub
| folder
| | which has specified pages to allow access to restricted users. When I
ran
| the
| | application, I get this error: It is an error to use a section
registered
| as
| | allow definition='Machineapplication' beyond application level, This
| error
| | can be caused by virtual directory not configured as virtual
application.
| |
|
|
 
A

Alex. O. Koranteng

Thanks for your help. I have added the authorization element to web config in
the sub folder and things are working. What is the difference beteeen this
approach and using the Security Admin tool. My next step to extend this
functionality to other pages within the restricted folder, but I can only get
one page to open for folder.
Any suggestions

Thanks

Alex
 
A

Allen Chen [MSFT]

Hi Alex,

Quote from Alex==================================================
What is the difference beteeen this approach and using the Security Admin
tool

==================================================

The tool adds authorization tag in the web.config for us. The final effect
we get by using these two approaches is basically identical. Do you mean
your tool adds other elements as well?

Quote from Alex ==================================================

My next step to extend this
functionality to other pages within the restricted folder, but I can only
get
one page to open for folder.


==================================================

Could you please clarify this? What do you mean by "but I can only get
one page to open for folder"?

Regards,
Allen Chen
Microsoft Online Community Support

--------------------
| Thread-Topic: Access to restricted folder
| thread-index: AckkvmvFe8EYPW+vTbyJIC3IKcX5Dg==
| X-WBNR-Posting-Host: 65.55.21.8
| From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Access to restricted folder
| Date: Thu, 2 Oct 2008 11:41:02 -0700
| Lines: 125
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3119
| Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:2687
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
|
| Thanks for your help. I have added the authorization element to web
config in
| the sub folder and things are working. What is the difference beteeen
this
| approach and using the Security Admin tool. My next step to extend this
| functionality to other pages within the restricted folder, but I can only
get
| one page to open for folder.
| Any suggestions
|
| Thanks
|
| Alex
|
| "Allen Chen [MSFT]" wrote:
|
| > Hi Alex,
| >
| > This exception is generally caused by the fact that the web.config file
in
| > the sub folder is not correctly configured. Ideally the web.config
should
| > only contain authorization element, as below:
| >
| > <?xml version="1.0" encoding="utf-8"?>
| > <configuration>
| > <system.web>
| > <authorization>
| > <allow users="Test1" />
| > <deny users="Test2" />
| > </authorization>
| > </system.web>
| > </configuration>
| >
| > Please try above code to see if it works. If it does, please then check
if
| > some other elements are added in it. For example, if I add the
membership
| > element it will throw following exception:
| >
| > 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.
| >
| > Source Error:
| >
| >
| > Line 30: <system.web>
| > Line 31:
| > Line 32: <membership defaultProvider="MyProvider1"
| > userIsOnlineTimeWindow="15">
| > Line 33: <providers>
| > Line 34: <clear/>
| >
| >
| > Source File: C:\Inetpub\wwwroot\membershiperror\test\web.config
Line: 32
| >
| > From the above information we can see the memberhip element is the
culprit
| >
| > Please check it to see what the culprit is and let me know if you need
| > further assistance. Besides, here's a related post in the ASP.NET forum:
| > http://forums.asp.net/t/769696.aspx
| >
| >
| > Regards,
| > Allen Chen
| > Microsoft Online Community Support
| >
| >
| > Delighting our customers is our #1 priority. We welcome your comments
and
| > suggestions about how we can improve the support we provide to you.
Please
| > feel free to let my manager know what you think of the level of service
| > provided. You can send feedback directly to my manager at:
| > (e-mail address removed).
| >
| > ==================================================
| > Get notification to my posts through email? Please refer to
| >
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
| >
| > Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
| > where an initial response from the community or a Microsoft Support
| > Engineer within 1 business day is acceptable. Please note that each
follow
| > up response may take approximately 2 business days as the support
| > professional working with you may need further investigation to reach
the
| > most efficient resolution. The offering is not appropriate for
situations
| > that require urgent, real-time or phone-based interactions or complex
| > project analysis and dump analysis issues. Issues of this nature are
best
| > handled working with a dedicated Microsoft Support Engineer by
contacting
| > Microsoft Customer Support Services (CSS) at
| >
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
| > ==================================================
| > This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| >
| > --------------------
| > | Thread-Topic: Access to restricted folder
| > | thread-index: AckijjpD9u5DdRUiR/CQZMFfKpOPhg==
| > | X-WBNR-Posting-Host: 65.55.21.8
| > | From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <[email protected]>
| > | Subject: Access to restricted folder
| > | Date: Mon, 29 Sep 2008 16:51:01 -0700
| > | Lines: 5
| > | Message-ID: <[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3119
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| > | Path: TK2MSFTNGHUB02.phx.gbl
| > | Xref: TK2MSFTNGHUB02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.security:2681
| > | NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
| > |
| > | I have configured my app to use sql membership provider. I have a sub
| > folder
| > | which has specified pages to allow access to restricted users. When I
ran
| > the
| > | application, I get this error: It is an error to use a section
registered
| > as
| > | allow definition='Machineapplication' beyond application level, This
| > error
| > | can be caused by virtual directory not configured as virtual
application.
| > |
| >
| >
|
 
A

Allen Chen [MSFT]

Hi Alex,

Have you solved this issue? Please let me know if you need any assistance.

Regards,
Allen Chen
Microsoft Online Support
--------------------
| Thread-Topic: Access to restricted folder
| thread-index: AckkvmvFe8EYPW+vTbyJIC3IKcX5Dg==
| X-WBNR-Posting-Host: 65.55.21.8
| From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Access to restricted folder
| Date: Thu, 2 Oct 2008 11:41:02 -0700
| Lines: 125
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3119
| Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:2687
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
|
| Thanks for your help. I have added the authorization element to web
config in
| the sub folder and things are working. What is the difference beteeen
this
| approach and using the Security Admin tool. My next step to extend this
| functionality to other pages within the restricted folder, but I can only
get
| one page to open for folder.
| Any suggestions
|
| Thanks
|
| Alex
|
| "Allen Chen [MSFT]" wrote:
|
| > Hi Alex,
| >
| > This exception is generally caused by the fact that the web.config file
in
| > the sub folder is not correctly configured. Ideally the web.config
should
| > only contain authorization element, as below:
| >
| > <?xml version="1.0" encoding="utf-8"?>
| > <configuration>
| > <system.web>
| > <authorization>
| > <allow users="Test1" />
| > <deny users="Test2" />
| > </authorization>
| > </system.web>
| > </configuration>
| >
| > Please try above code to see if it works. If it does, please then check
if
| > some other elements are added in it. For example, if I add the
membership
| > element it will throw following exception:
| >
| > 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.
| >
| > Source Error:
| >
| >
| > Line 30: <system.web>
| > Line 31:
| > Line 32: <membership defaultProvider="MyProvider1"
| > userIsOnlineTimeWindow="15">
| > Line 33: <providers>
| > Line 34: <clear/>
| >
| >
| > Source File: C:\Inetpub\wwwroot\membershiperror\test\web.config
Line: 32
| >
| > From the above information we can see the memberhip element is the
culprit
| >
| > Please check it to see what the culprit is and let me know if you need
| > further assistance. Besides, here's a related post in the ASP.NET forum:
| > http://forums.asp.net/t/769696.aspx
| >
| >
| > Regards,
| > Allen Chen
| > Microsoft Online Community Support
| >
| >
| > Delighting our customers is our #1 priority. We welcome your comments
and
| > suggestions about how we can improve the support we provide to you.
Please
| > feel free to let my manager know what you think of the level of service
| > provided. You can send feedback directly to my manager at:
| > (e-mail address removed).
| >
| > ==================================================
| > Get notification to my posts through email? Please refer to
| >
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
| >
| > Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
| > where an initial response from the community or a Microsoft Support
| > Engineer within 1 business day is acceptable. Please note that each
follow
| > up response may take approximately 2 business days as the support
| > professional working with you may need further investigation to reach
the
| > most efficient resolution. The offering is not appropriate for
situations
| > that require urgent, real-time or phone-based interactions or complex
| > project analysis and dump analysis issues. Issues of this nature are
best
| > handled working with a dedicated Microsoft Support Engineer by
contacting
| > Microsoft Customer Support Services (CSS) at
| >
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
| > ==================================================
| > This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| >
| > --------------------
| > | Thread-Topic: Access to restricted folder
| > | thread-index: AckijjpD9u5DdRUiR/CQZMFfKpOPhg==
| > | X-WBNR-Posting-Host: 65.55.21.8
| > | From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <[email protected]>
| > | Subject: Access to restricted folder
| > | Date: Mon, 29 Sep 2008 16:51:01 -0700
| > | Lines: 5
| > | Message-ID: <[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3119
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| > | Path: TK2MSFTNGHUB02.phx.gbl
| > | Xref: TK2MSFTNGHUB02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.security:2681
| > | NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
| > |
| > | I have configured my app to use sql membership provider. I have a sub
| > folder
| > | which has specified pages to allow access to restricted users. When I
ran
| > the
| > | application, I get this error: It is an error to use a section
registered
| > as
| > | allow definition='Machineapplication' beyond application level, This
| > error
| > | can be caused by virtual directory not configured as virtual
application.
| > |
| >
| >
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top