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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:13:25+00:00 2026-06-14T03:13:25+00:00

I’ve got a virtual directory set up in my web site in IIS 7.5

  • 0

I’ve got a virtual directory set up in my web site in IIS 7.5 that users can map a network drive to. What I’d like to do is set up some sort of custom authentication where the user chooses “connect with different credentials” when they map the drive, and then I can use those credentials to log them into my website before letting them view the contents of the virtual directory. Is this possible?

I can’t seem to find a way to (programatically) get the credentials used when mapping the drive. Right now I’ve got an HttpModule and HttpHandler executing on each request to the virtual directory, but I’m not seeing a way to detect credentials. Has anyone ever done anything like this?

If this isn’t possible, can someone explain what the purpose is then for choosing to connect with different credentials? Where are those credentials used, is it used by a certain form of Authentication in IIS? Surely there has to be some sort of setup for using the different credentials?

UPDATE:

Using Digest Authentication, I can now see the Authorization header showing up in Fiddler, but I’m not yet sure if it is possible to parse the password out somehow. I’ve also seen some articles online that suggest Digest Authentication is fundamentally flawed, but according to Authentication in ASP.NET: .NET Security Guidance, I shouldn’t use Basic Authentication if my users are stored in a custom database.

So let me lay out a simpler scenario that will hopefully be easier to answer:

I’m trying to implement custom authentication used when mapping a network drive to a virtual directory in my site. I’m using IIS 7.5. I need to parse out the username and password to handle the custom log-in, either in an HttpModule or a Global.asax event. Has anyone ever done anything like this or have any advice/suggestions?

I’ve found this example which seems like it could work – but it’s meant for a browser. I’ve got it implemented now on my test site but the problem is when mapping the drive, the 401 challenge is returned (which is supposed to prompt for a log-in) but Windows instead displays an error that says:

Windows cannot access Http://myServer/mySite/myFolder

Check the spelling of the name. Otherwise, there might be a problem with your
network.

Error code: 0x80070043 The network name cannot be found

I’m wondering if I can format/build a Basic/Digest Authentication-style challenge response so that Windows will prompt for a log-in rather than displaying the network can’t be found? Does anyone know if this is possible?

UPDATE 2:

I saw using Fiddler, that Windows Authentication includes a Negotiate header. So I tried including that header in my challenge response in addition to the WWW-Authenticate: Basic header. This seems to have fixed my problem with the “network name cannot be found” error described above, but unfortunately now there is no Authorization header included in the subsequent request (after I provide my credentials) so I can’t pull out the username and password.

I’m running out of ideas here, and while there seems to be a lot of documentation on Authentication, there doesn’t seem to be much on WebDAV Authentication (or how to use it), or custom authentication when mapping drives.

Does anyone have any insight or ideas?

SOLUTION:

It’s not looking like I’ll be able to do what I want exactly. I’m going to do further testing with @AdamV ‘s suggestion with Windows Authentication as it looks like it might be my only option.

  • 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-06-14T03:13:26+00:00Added an answer on June 14, 2026 at 3:13 am

    I am assuming you are trying to use Active Directory in conjunction with IIS to map network drives. If this assumption is correct, I have an idea for you.

    You have your first website at http://www.mysite.com/ and you can login to it. Then, as a subfolder and new Web Application in IIS you setup http://www.mysite.com/networkdrive/ which recieves the network path they want to use via http://www.mysite.com/ in a post parameter or cookie.

    The kicker is, this new application will simply use Windows Auth and the root site can use whatever authentication you like. This way, the user logs into your site, then selects or types in the network drive path, this is sent to the sub app, and automatically asks for windows credentials, and the first action it does is map the drive using the Windows Auth token. You will need to turn off Identity Impersonation as well as setup the rights to execute code via their credentials to achieve this.

    When they want to switch drives, log them out of the /networkdrive/ app and send them back to the drive selection page/form.

    For info on Windows Authentication: http://msdn.microsoft.com/en-us/library/907hb5w9(v=vs.100).aspx

    Updated: In response to the WebDAV comment, here is some documentation I found on configuring WebDAV but it still uses Windows Authentication. http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-webdav-on-iis

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a small JavaScript validation script that validates inputs based on Regex. I
I am doing a simple coin flipping experiment for class that involves flipping a

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.