Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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,

share|improve this question
    
is this a intranet? in a normal intranet scenario, credentials should automatically be provided to browser –  djeeg Jan 14 '11 at 13:21
    
yes, intranet, how to provide them to browser? (without the browser opening the login page?) –  Zee99 Jan 14 '11 at 13:23
add comment

2 Answers 2

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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 '11 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 '11 at 17:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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