Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6552665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:29:16+00:00 2026-05-25T12:29:16+00:00

I have an ASP.NET MVC 3 application running on both my local dev box

  • 0

I have an ASP.NET MVC 3 application running on both my local dev box (Win7) and staging server (W2k8r2). The application operates fine in both environments until ASP.NET Windows authorization security is enabled.

After securing the web-app, it continues operates correctly on the staging server but generates 401.2 access denied’s on my local dev box. The only significant difference I can see is on local dev box, I’m using Cassini via Visual Studio whereas the server is IIS7.5.

Windows authorization + impersonation is being used. What could cause Cassini to generate these 401.2 access denied?

Web.config is:

<system.web>
   <authentication mode="Windows" />
   <identity impersonate="true" />
   <!-- replication of system.webServer security settings for cassini which doesn't process them... -->
   <authorization>
       <allow roles=".\Test Application - Users" />
       <deny users="*" />
   </authorization>
</system.web>
<system.webServer>
   <validation validateIntegratedModeConfiguration="false" />
   <modules runAllManagedModulesForAllRequests="true" />
   <security>
      <authorization>
          <remove users="*" roles="" verbs="" />
          <add accessType="Allow" users="" roles="Test Application - Users" />
      </authorization>
  </security>

FYI Relevant users are in the ‘Test Application – Users’ Windows security group on each system.

Solution

The underlying issue on the dev box turned out to be that:

  1. Cassini doesn’t support identity impersonation and
  2. Whilst the user had been added to relevant NT groups, they had not logged off/on and thus the group SID’s associated with their Windows token had not been refreshed

If impersonation had been supported by Cassini I doubt this would have been an issue because a new token would have been established within the impersonation context. Thanks to @x0n for pointing in the right direction.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:29:16+00:00Added an answer on May 25, 2026 at 12:29 pm

    i’m not entirely sure, but I don’t think cassini can impersonate (iis express can, however.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC 1.0 application running on Windows Server 2003 IIS 6.0.
I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7
I have an Asp.Net MVC application that works in the vs.net development web server.
I have a ASP.NET MVC application that runs in both IIS 6 and 7.
I have an ASP.Net MVC application and I'm using Forms authentication in SQL Server.
I have an ASP.NET MVC web application running in IIS as a subweb; let's
I have an ASP.NET MVC 3 Beta application running on IIS. In my web.config
I have an ASP.NET 4.0 MVC web application running on IIS 6.0 with a
I have ASP.NET MVC Beta on our web server running a few apps. My
I have an ASP.NET MVC application running on IIS7. I use sessions to keep

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.