webhttpbinding

Provide exceptions for wcf webhttpbinding

被刻印的时光 ゝ 提交于 2021-01-29 19:09:17
问题 I have to change a binding for wcf webservices from tcpbinding to webhttpbinding with basic authentication and ssl. Webservices are self hosted in a console application and in a windows service for production version. Some of local services are with named pipe binding, just if a service call another service. All works perfectly but not the global error manager (a class that implement IErrorHandler interface) Some of DAL or business methods throw an exception with a custom message and this

Provide exceptions for wcf webhttpbinding

一曲冷凌霜 提交于 2021-01-29 14:16:27
问题 I have to change a binding for wcf webservices from tcpbinding to webhttpbinding with basic authentication and ssl. Webservices are self hosted in a console application and in a windows service for production version. Some of local services are with named pipe binding, just if a service call another service. All works perfectly but not the global error manager (a class that implement IErrorHandler interface) Some of DAL or business methods throw an exception with a custom message and this

How to disable credentials input for HTTPS call to my WCF hosted in windows service

耗尽温柔 提交于 2021-01-29 10:53:03
问题 I'm just creating my first WCF project, so I have a lot of deficiencies in knowledge in this field. My problem is that when I'm calling my WCF url in web browser, I have to enter the credentials but I cannot even use my domain name and password, but I have to choose my personal chip card certificate and enter it's password. After that, everything work like a charm. My final product should be installed on every user workstation in our domain for IT operations purposes only. So there will be

setting cookies within a wcf service

☆樱花仙子☆ 提交于 2020-05-14 09:01:32
问题 I have a asp mvc application consuming wcf rest services (all on the same box). For authentication calls, I am trying to set cookies inside a wcf rest service. Code on the client side - HttpResponseMessage resp; HttpClient client = new HttpClient("http://localhost/auth/login/"); resp = client.Get(); In the webservice I just use FormsAuthentication to set an authcookie. HttpCookie authCookie = FormsAuthentication.GetAuthCookie("foo", false); HttpContext.Current.Response.Cookies.Add(authCookie)

How can I return HTTP-400 from a BizTalk Rest service?

早过忘川 提交于 2020-01-11 11:12:11
问题 I am using BizTalk 2013 R2 and I have a RESTFUL service. How can I return a HTTP-400 response to a client? 回答1: Set WCF.OutboundHttpStatusCode property in message assignment shape: MyResponseMessage(WCF.OutboundHttpStatusCode) = "400"; 回答2: Oleg's answer will work if you have an Orchestration If you want a messaging only solution you will have to have a Pipeline Component set the same context property. For this we tend to use the BizTalk Business Rules Engine Pipeline Framework In your

How can I return HTTP-400 from a BizTalk Rest service?

懵懂的女人 提交于 2020-01-11 11:11:45
问题 I am using BizTalk 2013 R2 and I have a RESTFUL service. How can I return a HTTP-400 response to a client? 回答1: Set WCF.OutboundHttpStatusCode property in message assignment shape: MyResponseMessage(WCF.OutboundHttpStatusCode) = "400"; 回答2: Oleg's answer will work if you have an Orchestration If you want a messaging only solution you will have to have a Pipeline Component set the same context property. For this we tend to use the BizTalk Business Rules Engine Pipeline Framework In your

Getting Gibberish instead of Hello World from a service with webHttpBinding

一世执手 提交于 2019-12-25 03:21:54
问题 Here is a trivial example that is supposed to return "Hello World" string. However, a browser displays something like SGVsbG8gV29ybGQ= . Which is the right way to return plain text from an oldskul-style service? please know that: I can't return a string: three Unicode characters will be automatically prepended and the legacy HTTP client won't be able to interoperate. I could return a Message , but still must keep parsing functionality to extract the data variable. Mixing Message and int types

WebHttpBinding with Http and Https

拜拜、爱过 提交于 2019-12-21 07:57:27
问题 I am trying to use https & http for the website. The website has .svc files which act as REST service and called from JavaScript. My Config: <system.serviceModel> <behaviors> <endpointBehaviors> <behavior name="AjaxBehavior"> <webHttp /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="MyServiceBehaviour"> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceMetadata httpGetEnabled="True" httpsGetEnabled="true"/> </behavior> </serviceBehaviors> </behaviors>

BasicHttpBinding vs WsHttpBinding vs WebHttpBinding

江枫思渺然 提交于 2019-12-17 03:44:43
问题 In WCF there are several different types of HTTP based bindings: BasicHttpBinding WsHttpBinding WebHttpBinding What are the differences among these 3? In particular what are the differences in terms of features / performance and compatability? 回答1: You're comparing apples to oranges here: webHttpBinding is the REST-style binding, where you basically just hit a URL and get back a truckload of XML or JSON from the web service basicHttpBinding and wsHttpBinding are two SOAP-based bindings which

WCF says it exceeds maximum query string value while it is not

China☆狼群 提交于 2019-12-12 09:49:48
问题 I have a WCF service (over a webHttpBinding ) using ASP.NET 4/IIS 8 and I had no problems communicating with it using JSON with GET . However, today I needed to implement a method that sends a large query string (about 3000 characters, not that long but longer than that I've been using). I called the service and immediately got a 404 error, without even stepping into my code at my debug machine. The first thing that came to my mind is the maximum query string length limit. I've added this to