{"id":5473,"date":"2004-07-29T22:58:00","date_gmt":"2004-07-29T22:58:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/buckh\/2004\/07\/29\/authentication-and-soap-proxies\/"},"modified":"2004-07-29T22:58:00","modified_gmt":"2004-07-29T22:58:00","slug":"authentication-and-soap-proxies","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/buckh\/authentication-and-soap-proxies\/","title":{"rendered":"Authentication and SOAP proxies"},"content":{"rendered":"<p>My last post discussed authentication in web service calls using HttpWebRequest.&nbsp; That caused one reader to wonder how this ties back to SOAP requests.<\/p>\n<p>If you are using wsdl.exe to generate a SOAP proxy class, it derives from <a href=\"http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/cpref\/html\/frlrfsystemwebservicesprotocolssoaphttpclientprotocolclasstopic.asp\">System.Web.Services.Protocols.SoapHttpClientProtocol<\/a>.&nbsp; That class has a <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/cpref\/html\/frlrfsystemwebservicesprotocolswebclientprotocolclasscredentialstopic.asp?frame=true\">Credentials<\/a> property. If you want to use the currently logged-in user&#8217;s credentials, you would assign <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/cpref\/html\/frlrfsystemnetcredentialcacheclassdefaultcredentialstopic.asp\">CredentialCache.DefaultCredentials<\/a> to the Credentials property.&nbsp; The same comment about having to assign an instance of NetworkCredential or CredentialCache apply as the proxy uses the HttpWebRequest class.<\/p>\n<p>[Updated 8\/05\/2004]&nbsp; Check out the article on MSDN about the new <a href=\"http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/dnvs05\/html\/wsnetfx2.asp\">SOAP proxy generation<\/a> support in Whidbey Beta 1, including generating the proxy assembly at build time and how to turn on compression.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My last post discussed authentication in web service calls using HttpWebRequest.&nbsp; That caused one reader to wonder how this ties back to SOAP requests. If you are using wsdl.exe to generate a SOAP proxy class, it derives from System.Web.Services.Protocols.SoapHttpClientProtocol.&nbsp; That class has a Credentials property. If you want to use the currently logged-in user&#8217;s credentials, [&hellip;]<\/p>\n","protected":false},"author":94,"featured_media":10268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-5473","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-c"],"acf":[],"blog_post_summary":"<p>My last post discussed authentication in web service calls using HttpWebRequest.&nbsp; That caused one reader to wonder how this ties back to SOAP requests. If you are using wsdl.exe to generate a SOAP proxy class, it derives from System.Web.Services.Protocols.SoapHttpClientProtocol.&nbsp; That class has a Credentials property. If you want to use the currently logged-in user&#8217;s credentials, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/5473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/comments?post=5473"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/5473\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media\/10268"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media?parent=5473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/categories?post=5473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/tags?post=5473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}