1

I want to open a native SharePoint 2010 page from my application (for example the Edit Properties page of a document) without the need to enter username/password, but instead to authenticate silently (prior or during the page request). is that possible?

In other words, i have a windows forms application, i enter a sharepoint document path and i click on a button, this will open up a windows form with a browser control that will navigate to the native "editform.aspx" sharepoint 2010 page for this document.Is there a way to authenticate the user without the need for him to enter his credentials?

Thanks,

2
  • is this a intranet? in a normal intranet scenario, credentials should automatically be provided to browser
    – djeeg
    Jan 14, 2011 at 13:21
  • yes, intranet, how to provide them to browser? (without the browser opening the login page?)
    – Zee99
    Jan 14, 2011 at 13:23

2 Answers 2

1

if you specify the DefaultNetworkCredentials in your objects CredentialCache

and use something similar to the below code:

    System.Net.HttpWebRequest w = (HttpWebRequest)System.Net.WebRequest.Create(u); 
    w.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

it should use the current users credentials automatically.

0

On an intranet, so long as you are not using forms based authentication, it should automatically log a person in whether they are browsing, calling the web services or whatever. If it prompts, the URL probably needs to be added to the local intranet sites list in the browsers security settings.

2
  • exactly, but the idea here is to try to login using other credentials than the windows users (can i pass those to the browser silently via querystring or other ways?)
    – Zee99
    Jan 14, 2011 at 14:04
  • Gotcha. Yes it's possible. I wrote a WPF app that does this using the client object model.
    – Rob Wilson
    Jan 14, 2011 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.