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

  • Home
  • SEARCH
  • 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 6963609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:48:56+00:00 2026-05-27T15:48:56+00:00

In the web.config: <configuration> <authentication mode=Windows> </authentication> <authorization> <deny users=? /> </authorization> </configuration> in

  • 0

In the web.config:

<configuration>
    <authentication mode="Windows">
    </authentication>
    <authorization>
      <deny users="?" />
    </authorization>
</configuration>

in global.asax

protected void Application_AuthenticateRequest(object sender, EventArgs args)
{
    tracker.LogRequest(HttpContext.Current.User, DateTime.Now)
    ///THIS IS ALWAYS NULL!!!
}

I am just really confused by this, any ideas?

  • 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-27T15:48:57+00:00Added an answer on May 27, 2026 at 3:48 pm

    I think this is a symptom of listening on the wrong event. You should probably listen for Application.PostAuthenticateRequest.

    Running a sample piece of code using a project I have that authenticates against my local domain’s Active Directory to ask if the User object is nothing:

    Code

    Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
        Debug.WriteLine("Authenticate Request: " & (HttpContext.Current.User Is Nothing))
    End Sub
    
    Sub Application_PostAuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
        Debug.WriteLine("Post-authenticate Request: " & (HttpContext.Current.User Is Nothing))
    End Sub
    

    Output

    Authenticate Request: True

    Post-authenticate Request: False

    Following the PostAuthenticateRequest event, the HttpContext.Current.User.Identity property is an instance of System.Security.Principal.GenericIdentity for unauthenticated requests.

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

Sidebar

Related Questions

Say I have the following web.config: <?xml version=1.0 encoding=utf-8?> <configuration> <system.web> <authentication mode=Windows></authentication> </system.web>
After I inserted the configuration below in my Web.Config <authentication mode=Forms> <forms name=appNameAuth path=/
Here is the web.config; <?xml version=1.0 encoding=UTF-8?> <configuration> <system.web> <customErrors mode=Off> </customErrors> <authentication mode=Forms>
config I have : <configuration> <system.web> <compilation debug=true targetFramework=4.0 /> <authentication mode =Forms> <forms
If have the following web.config : <configuration> <system.web> <authentication mode=Forms> <forms name=MembershipCookie loginUrl=Login.aspx protection=All
I have added the following configuration section to my web.config file <security> <authentication> <anonymousAuthentication
So my Web.Config File has: <authentication mode=Forms> <forms loginUrl=~/Home/Index timeout=2880 /> </authentication> in my
I have an MVC application with the following block inside in Web.config: <authentication mode=Forms>
In IIS 7 Web site I have web.config authorization configuration to allow only definite
In particular from this web.config: <configuration> <configSections> <section name=RStrace type=Microsoft.ReportingServices.Diagnostics.RSTraceSectionHandler,Microsoft.ReportingServices.Diagnostics /> </configSections> <system.diagnostics> <switches>

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.