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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:42:30+00:00 2026-06-17T09:42:30+00:00

In my ASP.NET application, I use a WebClient to download a file. This file

  • 0

In my ASP.NET application, I use a WebClient to download a file. This file is almost always on the company intranet, and requires permission to access. Whenever I run the application in VS, it works fine, because it is running in the context of my own permissions. However, when it is deployed to IIS, it runs in the context of “Network Service”‘s permissions, which are basically non-existent (as you would expect) when it comes to the intranet.

I can see a few poor solutions here:

  • Make an account specifically for the application, the details for which would be located in web.config and provided to the WebClient as strings. This is suboptimal, as not all users of the service have the same permissions.
  • Require a username and password to be entered. This would never be approved, as the company uses certificates wherever possible. Passwords are used to log in to Windows, and almost everything past that point uses Windows authentication with the help of Kerberos

The optimal solution would be to pass the credentials of the current person accessing (and providing Windows authentication data via Kerberos) directly to the WebClient object. Is this possible? If so, how so? I would be so immensely grateful if someone could tell me, or at least put me out of my misery and tell me it cannot be done.

  • 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-17T09:42:31+00:00Added an answer on June 17, 2026 at 9:42 am

    Impersonation turned out to be the optimum solution; thank you, JT.

    There are plenty of good resources on tying Windows Authentication to impersonation. One that I didn’t actually use, but have since discovered and which appears very comprehensive, is available here:

    http://www.codeproject.com/Articles/94612/Windows-Authentication

    Delegation was also required in my case, and this guy explains it fairly well, and links to a useful msdn document regarding it:

    http://blog.reveille.org.uk/2010/01/asp-net-impersonation-delegation-2/

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

Sidebar

Related Questions

I have asp.net application that use forms authentication to control access. Let's imagine we
In our intranet ASP .NET application we use an architecture approach which is similar
I have a ASP.NET Application and use a ListView . This ListView has a
I have an ASP.NET Application and use a ListView . This ListView has rows
I have a ASP.NET Application where I use Sessions. In this Session I get
This is in context to an ASP.Net application. The application makes use of a
In an asp.net application, I would like to combine the use of the Webclient
We are in the process of migrating our ASP.NET application to use Jquery instead
We have a ASP .Net application whereby we use Log4Net to log details within
I'm trying to convert an ASP.NET web application to use resource files. I haven't

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.