Windows Authentication Web Services WinForms

G

Guest

Hi!

There is a website that accepts only authenticated users.

When I access from a web application, I'm using the line :
oWS_DB.Credentials = System.Net.CredentialCache.DefaultCredentials;

but when using it from a WinForms, I feel like empty credentials are passed...

Can someone give me any clue ?

Thanks,
Claude Vernier
 
N

Nicholas Paldino [.NET/C# MVP]

Claude,

From the documentation for the DefaultCredentials property:

DefaultCredentials represents the system credentials for the current
security context in which the application is running. For a client-side
application, these are usually the Windows credentials (user name, password,
and domain) of the user running the application. For ASP.NET applications,
the default credentials are the user credentials of the logged-in user, or
the user being impersonated.

It should be passing the crendentials of the user that the app is
running under (most often the logged in user). What makes you think that
empty credentials are passed when you make a call from a Windows Forms app.
Also, how and what are you passing the credentials to?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top