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 6689287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:30:05+00:00 2026-05-26T05:30:05+00:00

I have an asp.net site, and I need to use both Windows Auth and

  • 0

I have an asp.net site, and I need to use both Windows Auth and Anonymous Auth together.

I need Windows auth as I need to get the username of the logged on user, but also the site runs a web-service which must be accessed anonymously.

If I turn on Windows Auth I can get the user and this works fine, but the site calling the web-service returns a 401 error. If I add in Anonymous access too the site using the web-service works fine, but I can no longer get the username of the logged in user.

How can I get the best of both – i.e. get the user name, but not kill my web service.

  • 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-26T05:30:06+00:00Added an answer on May 26, 2026 at 5:30 am

    You can add the following to disable access to specific locations within your directory tree

    <location path="path.to.web.service">
        <system.web>
            <authorization>
                <allow users="*"/>
            </authorization>
        </system.web>
    </location>
    

    while keeping the main site under control of the Windows authentication.

    See : http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx

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

Sidebar

Related Questions

I have asp.net web site in which user can login and also do logout
I have an ASP.NET web site technology that I use for scores of clients.
I have an ASP.Net MVC intranet site which uses Windows Authentication to know who
I need a regex (for use in an ASP .NET web site) to validate
I'm creating an ASP.NET site where some pages need to have a div floated
I'm writing an ASP.NET MVC site where I need to have a Tasks application
I have an ASP.Net site, in which I am using a ListView with a
I have an ASP.NET site with membership tables in a Main_DB for the site.
i have multilingual asp.net site. there is a masterpage and default.aspx. I put two
simple question... Given I have an ASP.NET site, which uses a [custom] RoleProvider, Is

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.