title: WPF application with Windows authentication
body: <p>I have a simple wpf client (few text boxes) that uploads some data to a web service. And I want to use windows authentication to go with my application.</p>
  
  <p>I am checking in OnStartup of App.xaml, whether or not the user is authenticated. My question is around what is the meaning of Thread.CurrentPrincipal.Identity.IsAuthenticated.</p>
  
  <p>I don't want my application to be used from outside my network as it is connecting to a web service and uploads data. But my assumption is as long as you run this application from inside any windows network the above mentioned property will always return true?</p>
  
  <p>So how do I find out if the application is being run from inside my network. I don't think checking domain name or role name is any different, because I can always setup a domain and name it whatever I want. I don't want to prompt user for username or password of any sort.</p>
  
  <p>How do you check Identity of user against a particular AD (AD might not be publically available). Basically the application should only works from my local network or through VPN.</p>