wcf

Application works with fiddler ON and doesn't works without fiddler?

末鹿安然 提交于 2021-02-09 10:50:37
问题 I have a silverlight application it makes HTTPS request, it works fine when I am tracing the application with fiddler ON, But it throws Remote server not found error when I don't have fiddler running 回答1: I ran into this recently, in Fiddler Options->HTTPS I had 'ignore server certificate errors' checked. Unchecked that and Fiddler displayed a certificate error. Ended up adding the code mentioned here http://social.msdn.microsoft.com/Forums/en-US/ncl/thread/43a933b8-e2b1-40a7-ac23

Copy HTTP request / response headers from a call to a HttpWebRequest?

纵饮孤独 提交于 2021-02-08 15:35:08
问题 I have a C# WCF service that receives a request Message and post it to another service. Posting to the other service is done through HttpWebRequest. How can i get in my service the original request HTTP headers and put them in the HttpWebRequest when i post them to the other service. Something like this: HttpRequestMessageProperty httpRequestProp = GetHttpRequestProp(requestMessage); HttpWebRequest loHttp = (HttpWebRequest)WebRequest.Create(uri); foreach (var item in httpRequestProp.Headers

Copy HTTP request / response headers from a call to a HttpWebRequest?

China☆狼群 提交于 2021-02-08 15:35:00
问题 I have a C# WCF service that receives a request Message and post it to another service. Posting to the other service is done through HttpWebRequest. How can i get in my service the original request HTTP headers and put them in the HttpWebRequest when i post them to the other service. Something like this: HttpRequestMessageProperty httpRequestProp = GetHttpRequestProp(requestMessage); HttpWebRequest loHttp = (HttpWebRequest)WebRequest.Create(uri); foreach (var item in httpRequestProp.Headers

What is concrete implementation?

孤街浪徒 提交于 2021-02-08 12:18:53
问题 I saw lot of posts in StackOverflow and elsewhere talking about concrete implementation. While fiddling with WCF i came through the line Tying your service implementation, or any “service based” class to a concrete implementation is never a good idea. Can anyone explain what Concrete Implementation is? 回答1: It is implementation of something abstract (abstract class, interface). Note that you can instantiate only objects of concrete classes. Just for example if you have : abstract class

What is concrete implementation?

≡放荡痞女 提交于 2021-02-08 12:18:01
问题 I saw lot of posts in StackOverflow and elsewhere talking about concrete implementation. While fiddling with WCF i came through the line Tying your service implementation, or any “service based” class to a concrete implementation is never a good idea. Can anyone explain what Concrete Implementation is? 回答1: It is implementation of something abstract (abstract class, interface). Note that you can instantiate only objects of concrete classes. Just for example if you have : abstract class

How to comply with policy defined in WSDL

偶尔善良 提交于 2021-02-08 11:36:54
问题 I'm trying to access a SOAP web service using Zeep There is a publicly available WSDL, and a testing WSDL (has a self-signed cert) My code to test (from test site) is: from requests import Session from zeep import Client from zeep.transports import Transport from zeep.wsse.username import UsernameToken import xml.dom.minidom WS_USER_NAME = '<username>' WS_PASSWORD = '<password>' WS_WSDL = 'https://pre.ipddb.org/WS/Services/IpdDownloadService.svc?wsdl' session = Session() session.verify =

How to comply with policy defined in WSDL

大兔子大兔子 提交于 2021-02-08 11:36:02
问题 I'm trying to access a SOAP web service using Zeep There is a publicly available WSDL, and a testing WSDL (has a self-signed cert) My code to test (from test site) is: from requests import Session from zeep import Client from zeep.transports import Transport from zeep.wsse.username import UsernameToken import xml.dom.minidom WS_USER_NAME = '<username>' WS_PASSWORD = '<password>' WS_WSDL = 'https://pre.ipddb.org/WS/Services/IpdDownloadService.svc?wsdl' session = Session() session.verify =

How to consume SOAP web service from .NET Core 3.0 WPF app

こ雲淡風輕ζ 提交于 2021-02-08 11:21:27
问题 I have a SOAP web service. I want to consume it in my WPF app. I am using .NET Core 3.0, Visual Studio 2019. So I used the Microsoft WCF Web Service Reference Provider to add reference to my project. This created the following classes: and Now, how do I use these to get my data by calling the web service? I tried the following; is this the correct way to call the web service? In many examples that I have seen on the internet, the client constructor does not need the EndpointConfiguration

How to pass message credentials - TransportWithMessageCredential - No credentials in the SOAP request

无人久伴 提交于 2021-02-08 11:11:07
问题 I am using WSBinding with "TransportWithMessageCredential" to secure my WCF web service, I am using it without any problems using .NET clients. But when trying to use it from Android or non-.Net client, I can't tell where to provide the message credentials!! I have intercepted the SOAP message being sent by the .NET client, it doesn't contain any thing related to the credentials, but it is working perfectly, but when using the same syntax for the SOAP request from and Android client, we are

Space disappears on transferring via wcf (xml)

喜欢而已 提交于 2021-02-08 10:16:30
问题 I have an object A with property Name that I use in WCF to transfer a model (communication). [DataMember(IsRequired = false, EmitDefaultValue = false, Name = "p0", Order = 0)] public string Name { get; set; } I discoverd that when Name starts with a space ' 123' then after deserialisation on the other side it has lost the space and it became '123'. The WCF service uses MTOM message encoding. Is this a known effect for xml or wcf in general? With the help of the answer provided I discovered