Confused

Discussion in 'ASP .Net Security' started by Aaron, May 13, 2004.

  1. Aaron

    Aaron Guest

    When I use these lines in the web.config on my local development machine
    everything works great.

    <identity impersonate="true"/>
    <authentication mode="Windows" />

    I have a label on the form telling me which user is logged in and I when
    I run the application, I get prompted for a username/password/domain and
    when I enter my credntials, my domain\username shows up as DEVELOPMENT
    \Aaron.My local IIS is using Integrated auth only.

    If I move my application to the production server I get access denied.
    I have set IIS to Integrated Auth only and even given EVERYONE full
    control permissions on the files in the webbizdev directory where the app
    is running from.

    What am I missing?

    Here is the error message when running from the server.

    Thanks,




    Server Error in '/' Application.
    -------------------------------------------------------------------------
    -------

    Access is denied.
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information
    about the error and where it originated in the code.

    Exception Details: System.ApplicationException: Access is denied.

    Source Error:

    An unhandled exception was generated during the execution of the current
    web request. Information regarding the origin and location of the
    exception can be identified using the exception stack trace below.

    Stack Trace:


    [ApplicationException: Access is denied.
    ]
    System.Security.Principal.WindowsIdentity._ResolveIdentity(IntPtr
    userToken) +0
    System.Security.Principal.WindowsIdentity.get_Name() +71
    System.Web.Configuration.AuthorizationConfigRule.IsUserAllowed
    (IPrincipal user, String verb) +100
    System.Web.Configuration.AuthorizationConfig.IsUserAllowed(IPrincipal
    user, String verb) +81
    System.Web.Security.UrlAuthorizationModule.OnEnter(Object source,
    EventArgs eventArgs) +178

    System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionSt
    ep.Execute() +60
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
    completedSynchronously) +87
     
    Aaron, May 13, 2004
    #1
    1. Advertising

  2. Have you tried to fetch
    System.Web.HttpContext.Current.Request.ServerVariables["LOGON_USER"]? Does
    this return anything?
    Could you perhaps post the bit of code that fails?

    Sincerely
    Svein Terje Gaup

    "Aaron" <> wrote in message
    news:Xns94E870DB4FE55aaronjonharveycom@207.46.248.16...
    > When I use these lines in the web.config on my local development machine
    > everything works great.
    >
    > <identity impersonate="true"/>
    > <authentication mode="Windows" />
    >
    > I have a label on the form telling me which user is logged in and I when
    > I run the application, I get prompted for a username/password/domain and
    > when I enter my credntials, my domain\username shows up as DEVELOPMENT
    > \Aaron.My local IIS is using Integrated auth only.
    >
    > If I move my application to the production server I get access denied.
    > I have set IIS to Integrated Auth only and even given EVERYONE full
    > control permissions on the files in the webbizdev directory where the app
    > is running from.
    >
    > What am I missing?
    >
    > Here is the error message when running from the server.
    >
    > Thanks,
    >
    >
    >
    >
    > Server Error in '/' Application.
    > -------------------------------------------------------------------------
    > -------
    >
    > Access is denied.
    > Description: An unhandled exception occurred during the execution of the
    > current web request. Please review the stack trace for more information
    > about the error and where it originated in the code.
    >
    > Exception Details: System.ApplicationException: Access is denied.
    >
    > Source Error:
    >
    > An unhandled exception was generated during the execution of the current
    > web request. Information regarding the origin and location of the
    > exception can be identified using the exception stack trace below.
    >
    > Stack Trace:
    >
    >
    > [ApplicationException: Access is denied.
    > ]
    > System.Security.Principal.WindowsIdentity._ResolveIdentity(IntPtr
    > userToken) +0
    > System.Security.Principal.WindowsIdentity.get_Name() +71
    > System.Web.Configuration.AuthorizationConfigRule.IsUserAllowed
    > (IPrincipal user, String verb) +100
    > System.Web.Configuration.AuthorizationConfig.IsUserAllowed(IPrincipal
    > user, String verb) +81
    > System.Web.Security.UrlAuthorizationModule.OnEnter(Object source,
    > EventArgs eventArgs) +178
    >
    > System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionSt
    > ep.Execute() +60
    > System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
    > completedSynchronously) +87
    >
    >
     
    Svein Terje Gaup, May 17, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DJ Miller

    Confused and bewildered.

    DJ Miller, Jul 31, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    1,098
    DJ Miller
    Sep 4, 2003
  2. RichGK
    Replies:
    1
    Views:
    403
    SStory
    Jul 31, 2004
  3. Cobra Pilot

    Confused. Need Help!

    Cobra Pilot, Jul 22, 2003, in forum: Perl
    Replies:
    1
    Views:
    982
    Shawn Corey
    Jul 22, 2003
  4. Sean Berry

    Confused on using basename...

    Sean Berry, Apr 14, 2004, in forum: Perl
    Replies:
    1
    Views:
    517
    Joe Smith
    Apr 14, 2004
  5. John
    Replies:
    0
    Views:
    282
Loading...

Share This Page