Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinForm apps and 3 HTTP (N.B. not SOAP) secure web servi
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01538852
Message ID:
01538993
Views:
67
Hi Alex,

Are you using Web References or the WCF Client? If you're using Web References you can create your own instance of the HttpWebRequest HTTP client it uses and add any headers you like.

I wrote a post about this a long while back to force Basic Authentication in an app, but once you have the HttpWebRequest you can add any headers (or authentication) as required.

http://www.west-wind.com/weblog/posts/2010/Feb/18/NET-WebRequestPreAuthenticate-not-quite-what-it-sounds-like

Hope this helps,

+++ Rick ---

>Hi all -
>
>This is the first time for me at this dance, so...
>
>I have a .Net/C# winForm application from which I want to consume a secure web service that requires 3 HTTP (N.B. not SOAP) authentication. I'm not sure how to provide the authentication headers.
>
>I've searched in a few places and see many examples for web apps, but none for WinForm. I’ve added the service reference to the solution, generate the web service proxy successfully, and have everything coded (i.e., proxy properties set) correctly. When I call the service (w/o the authentication headers) I get the expected 401 response.
>
>I am _assuming_ that one can consume a secured web service from a WinForm app, and appreciate a bit of “how to” help.
>
>TIA
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform