RE: Web Deployment Project location/Authorization replacement

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,

During "Test" the Role Test is authorized for the sub directory.
During "Release" the test role is not authorized in the sub directory.

Is my understanding correct that you're using membership and roles in your
Web Application, when you test your project in Visual Studio the
authorization works properly. However, after publishing to IIS it doesn't
work?

If so do you get any exceptions?

I did a test. By adding the following web.config in a sub directory the
authorization works fine (both in debug and product scenario). If role1
want to access the resources it'll be denied.

<?xml version="1.0"?>

<configuration>
<system.web>
<authorization>
<allow roles="role2" />
<deny roles="role1" />
</authorization>
</system.web>
</configuration>

Is there a good way to change what roles are authorized in a sub directory
with a web deployment project configuration.

If you've published your site to IIS, you can open the Web Site in Visual
Studio. Then click "WebSite" (on the menu bar of Visual Studio)->"ASP.NET
Configuration". After that, a administration page will be opened. You can
config settings there. By clicking "Security" tab you can simply change the
Access Rules settings following the instruction on the page.

Please let me know if it can solve this issue and feel free to ask if you
have additional questions.

Regards,
Allen Chen
Microsoft Online 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: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 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. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • RE: Securing a single aspx page
    ... forms authentication by default will allow everyone access ... authorization setting: ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Securing a single aspx page
    ... forms authentication by default will allow everyone access ... authorization setting: ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: strange security role issue
    ... As for the authorization, here is the setting, for a section that should not be viewable by a new user: ... But this seems only to reproduce the functionality that security trimming provides, and is not required, correct? ... Microsoft MSDN Online Support Lead ... from the community or a Microsoft Support ...
    (microsoft.public.vsnet.general)
  • Re: Forms Authentication - Supress displaying the login page for certain web pages
    ... specific <authorization> setting for individual pages or directories in the ... Microsoft MSDN Online Support Lead ... response from the community or a Microsoft Support Engineer within 1 ... real-time or phone-based interactions or complex project analysis ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: strange security role issue
    ... BTW, If you by any chance receive some feedback form about us, ... Microsoft MSDN Online Support Lead ... As for the authorization, here is the setting (from web.config in the ...
    (microsoft.public.vsnet.general)