RE: Access to restricted folder
- From: Alex. O. Koranteng <AlexK@xxxxxxxxxxxxxxxx>
- Date: Thu, 2 Oct 2008 11:41:02 -0700
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:
msdnmg@xxxxxxxxxxxxxx
==================================================
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?= <AlexK@xxxxxxxxxxxxxxxx>
| Subject: Access to restricted folder
| Date: Mon, 29 Sep 2008 16:51:01 -0700
| Lines: 5
| Message-ID: <FA0FA987-7404-4827-AFB5-6F3B7168F1AB@xxxxxxxxxxxxx>
| 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.
|
- Follow-Ups:
- RE: Access to restricted folder
- From: Allen Chen [MSFT]
- RE: Access to restricted folder
- From: Allen Chen [MSFT]
- RE: Access to restricted folder
- Prev by Date: RE: Access to restricted folder
- Next by Date: RE: Access to restricted folder
- Previous by thread: RE: Access to restricted folder
- Next by thread: RE: Access to restricted folder
- Index(es):
Relevant Pages
|