webhttpbinding

How to use Microsoft JWT Token Handler to secure webHttpBinding based WCF service

最后都变了- 提交于 2019-12-12 01:18:02
问题 I need to secure a WCF Service that uses webHttpBinding with tokens, but having a hard time figuring out how to do so. It is my understanding that the recommend way of doing this is by using JWT Tokens? I have an STS (IdentityServer) that issues JWT tokens to my Mobile Client (Sencha Touch Application) through OAuth 2.0, and this application needs to call a webHttpBinding based WCF Service. Now I want to secure this using tokens, and I know Microsoft has released a JWT Security Token Handler

Windows Authentication not prompting on Firefox or iOS Safari

吃可爱长大的小学妹 提交于 2019-12-11 15:09:31
问题 I have two WCF WebHttpBinding-bound self-hosted services. One is set to WebHttpSecurityMode.TransportCredentialOnly and HttpClientCredentialType.Windows . The other is set to None and None . This service is serving the exactly the intended authentication prompt behavior on Chrome and IE, with correct content types and content. Testing on localhost and remotely (not on a domain). In IE, the default settings for integrated authentication send my credentials immediately to the authenticated

DataContractJsonSerializer and maxItemsInObjectGraph

天大地大妈咪最大 提交于 2019-12-11 11:34:43
问题 How can I set the maxItemsInObjectGraph for the DataContractJsonSerializer? I get an error saying "Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota." Where does the number 65536 come from. The documentation for DataContractJsonSerializer says the default is Int32.MaxValue. I tried to set it in the behavior configuration: <endpointBehaviors> <behavior name="WebBehavior"> <webHttp />

Passing a cookie to a wcf service

烈酒焚心 提交于 2019-12-11 07:35:32
问题 I have a bunch of wcf webhttp (rest) services that expect an auth cookie. Question is - How do I pass the formsauth ticket to the wcf service? Flowing authentication works for get requests through the browsers just fine (as it should) but I am not sure how to set the cookie during my calls using httpclient or webchannelfactory. At this point the authentication is done and the cookie is available. I am not sure of where to insert the cookies while invoking the service through a HttpClient.

WCF Windows authentication issue with REST service

拈花ヽ惹草 提交于 2019-12-11 02:49:57
问题 I'm having some difficulty setting up a WCF service to run under Windows authentication. The service is only consumed via jQuery using ajax. IIS (version 6 on server 2003) is set to only allow Windows Authentication. web.config has the <authentication mode="Windows" /> tag. Here's the service section of the web.config: <system.serviceModel> <behaviors> <endpointBehaviors> <behavior name="AspNetAjaxBehavior"> <webHttp /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name=

Can I call a WCF service without setting content-type?

*爱你&永不变心* 提交于 2019-12-10 10:45:32
问题 I'm trying to replace a legacy REST/plain old xml web service with a WCF one using webHttpBinding. It MUST be backwards compatible with existing clients - which currently do not send a content-type header in the requests. When I point my clients at my new web service I get HTTP ERROR 415 - missing content type. Is it possible to configure WCF so it will accept raw requests without a content-type header? 回答1: 415 is not "missing content type", it is 415 Unsupported Media Type. That infers that

Error: Cannot obtain Metadata; using WCF Test client, C#, and trying to implement webhttpbinding and json

牧云@^-^@ 提交于 2019-12-07 16:19:37
问题 I'm getting the fabled Error: Cannot obtain Metadata from... message, particularly http://localhost:1640/Service1.svc I've scoured stackoverflow and Google and, so far, none of it has helped. I created a new product to dumb it down and it's still not working. So I am here asking for help. I'm trying to setup a WCF Service that uses JSON, which means I need to use webhttpbinding, in C#. When I use the WCF Test Client, I get the aforementioned metadata error. I'm using Visual Studio Express

WCF Error on execute: Manual addressing is enabled on this factory, so all messages sent must be pre-addressed

痴心易碎 提交于 2019-12-06 06:53:02
问题 I have a WCF service hosted with WebHttpBinding. The service is very simple, an operation contract which accept multiple parameters. My WCF client, auto generated after using the "Add Service Reference", is not able to directly consume the WCF service. The error only occur for WebHttpBinding but not the others. Server Side [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "Submit2String", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, BodyStyle =

Can I call a WCF service without setting content-type?

妖精的绣舞 提交于 2019-12-06 04:18:56
I'm trying to replace a legacy REST/plain old xml web service with a WCF one using webHttpBinding. It MUST be backwards compatible with existing clients - which currently do not send a content-type header in the requests. When I point my clients at my new web service I get HTTP ERROR 415 - missing content type. Is it possible to configure WCF so it will accept raw requests without a content-type header? 415 is not "missing content type", it is 415 Unsupported Media Type . That infers that the server IS receiving a content-type, it just does not know how to handle it. According to the HTTP spec

Error: Cannot obtain Metadata; using WCF Test client, C#, and trying to implement webhttpbinding and json

£可爱£侵袭症+ 提交于 2019-12-06 02:56:07
I'm getting the fabled Error: Cannot obtain Metadata from... message, particularly http://localhost:1640/Service1.svc I've scoured stackoverflow and Google and, so far, none of it has helped. I created a new product to dumb it down and it's still not working. So I am here asking for help. I'm trying to setup a WCF Service that uses JSON, which means I need to use webhttpbinding, in C#. When I use the WCF Test Client, I get the aforementioned metadata error. I'm using Visual Studio Express 2010 and the target framework. I've been at this for two days and cannot understand why or what is the