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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:36:46+00:00 2026-06-04T16:36:46+00:00

I have a simple updater program that copies files from a company server to

  • 0

I have a simple updater program that copies files from a company server to the user’s machine.

For most people on the internal LAN this is no problem, but some staff access this from LANs where they are not automatically authenticated with the server in question.

Normally an attempt to access this server (e.g. via Explorer) would simply throw up a user credentials dialog asking the user to provide a login that can access the shared directory.

In my Winforms application I simply use operations like File.Copy to move the files.

How can my application cause Windows to prompt for authentication rather than just throwing an exception?

I’m willing to do a fair bit of work myself but what I was really hoping was that Windows provided a way for this to happen.

Otherwise I’m considering just attempting access and showing an error message instructing the user to authenticate themselves using explorer.

Are there any other nice ways to deal with this problem without reinventing the wheel for a 50 line program? 🙂

  • 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-04T16:36:48+00:00Added an answer on June 4, 2026 at 4:36 pm

    you could use shell API to make that happen (same API Windows Explorer is based upon) – instead File.Copy you would pinvoke SHFileOperation.

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

Sidebar

Related Questions

I have a simple program. Its job is to move files from A to
I have a simple Javascript program that displays a small rectangle in a canvas.
I have a made a simple program that reproduces the problem: #include <boost/archive/text_oarchive.hpp> #include
I have a simple Java program that reads in a text file, splits it
I have a C# program that works with an SQL Server database. The setup
I have written a simple utility that loops through all C# files in my
I have a simple C# program that checks the database for updates every minute
I have a program that sorts big files by splitting them into chunks, sort
Here you have a simple WPF program: <!-- Updater.xaml --> <Window x:Class=Update.Updater xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
I am trying to create a simple program that will allow the user to

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.