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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:18:45+00:00 2026-05-14T15:18:45+00:00

I am writing a ClickOnce WPF app that will sometimes be used over VPN.

  • 0

I am writing a ClickOnce WPF app that will sometimes be used over VPN. The app uses resources available only to domain authenticated users. Some of the things include accessing SSRS Reports, accessing LDAP to lookup user information, hitting web services, etc.

When a user logs in from a machine that is not authenticated on the domain, I need to somehow get his credentials, authenticate him on the domain, and store his credentials.

  1. What is the recommended approach for
    authenticating domain users over
    VPN?
  2. How can I securely store the credentials?

I’ve found several articles but, not much posted recently and a lot of the solutions seem kinda hacky, or aren’t very secure (ie – storing strings clear text in memory).

It would be cool if I could use the ActiveDicrtoryMembershipProvider, but that seems to be geared for use in web apps.

EDIT:
The above is kind of a workaround. The user must enter their domain credentials to authenticate on the VPN. It would be ideal to access the credentials the user has already entered to login to the VPN instead of the WindowsIdentity.GetCurrent() (which returns the user logged into the computer). Any ideas on how that could work? We use Juniper Networks to connect to the VPN.

Answer
I ended up doing basically what was suggested in the link below. When the app starts, I’ll detect whether the user is on the domain. If so, I’ll use those credentials when calling services. If the user is on the VPN (but not on a domain authenticated machine), I prompt for the user’s credentials and authenticate via System.DirectoryServices. If the user gives valid credentials I’ll store the domain, user and password in a SecureString. The app then uses that information to create credentials to pass to various services.

Thanks!

  • 1 1 Answer
  • 1 View
  • 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-14T15:18:45+00:00Added an answer on May 14, 2026 at 3:18 pm

    This answer to the question might help.

    –EDIT–

    • If the client is logging under their AD credentials then WindowsIdentity.GetCurrent() would return a valid WindowsIdentity.

    • If client is not logged onto the domain then you can provide a pop up that would ask for AD credentials.

    Well, just thinking…

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

Sidebar

Related Questions

Writing an app that will include the ability to decompress zip and rar files.
Background: We have a ClickOnce-deployed WPF app, that talks to WCF Services, which in
Writing a PHP app and have several classes that only have static methods (no
Writing a Jabber client that uses Twisted Words. I would like to know an
Writing a small app that ( among other things ) lets users upload a
I've written a WPF app, which has been used by us for about a
Writing a stored procedure that will have multiple input parameters. The parameters may not
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the
Writing a test app to emulate PIO lines, I have a very simple Python/Tk
Writing documentation in html requires some code examples. What to do with characters that

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.