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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:30:47+00:00 2026-06-18T16:30:47+00:00

Hi I am writing a WPF app that needs to access my files on

  • 0

Hi I am writing a WPF app that needs to access my files on another PC on my network (domain). My first try to access a remote folder has not been a raging success.

On my Windows 7 laptop I entered in Windows Explorer

\\WIN-DCname\c$

, this is the path to C drive on my test domain controller, and when challenged I logged in with the administrator account for the DC. I can then access the folder tree of C drive as expected.

As a test application I used the following to probe that same drive:

Try
    Dim DirInfo As New DirectoryInfo("\\WIN-DCname\c$")
    Dim Dirs = DirInfo.GetDirectories.OrderByDescending(Function(x) x.FullName)
Catch ex As Exception
End Try

but the GetDirectories line throws an exception:

The system detected a possible attempt to compromise security. Please
ensure that you can contact the server that authenticated you.

I’m starting to think there is a permissions problem here…. Do I have to programmatically authenticate again prior to doing this? If so how?

Or is it not possible to do a GetDirectories over the network? Is there another way?

Thanks for any advice!

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

    In the end it turns out that I needed to use Impersonation, which lets me programmatically emulate another user while executing a block of code. No opening of ports was required.

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

Sidebar

Related Questions

I'm writing a WPF app and the font that I am using only has
I'm writing a WPF app that has a Canvas in it. This canvas will
I've got an issue with a WPF application that I'm writing. The app needs
Im writing a WPF application that has a zoom and pan ability, but what
I am writing a ClickOnce WPF app that will sometimes be used over VPN.
I am writing a C# application that needs to communicate with another application written
I am writing a WPF application that has an optional dependency on an API
We are writing an app that runs on users laptops offline. It needs to
I'm writing an MVVM WPF app with a datagrid of values which needs to
I am writing a C# WPF app that open, close, read and write 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.