wcf

Implementing a cache in a WCF Service

情到浓时终转凉″ 提交于 2021-02-07 08:29:39
问题 I have a WCF service that caches certain data and uses it to respond to web requests. To deal with this requirement, I made the service a Singleton (using InstanceContextMode.Single and ConcurrencyMode.Multiple (yes, it's threadsafe)). I've tried to set the timeout of the service to its maximum using the following binding: <binding name="WebHttpBinding" receiveTimeout="24.20:31:23.6470000"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="None" /> </security> <

Implementing a cache in a WCF Service

徘徊边缘 提交于 2021-02-07 08:29:39
问题 I have a WCF service that caches certain data and uses it to respond to web requests. To deal with this requirement, I made the service a Singleton (using InstanceContextMode.Single and ConcurrencyMode.Multiple (yes, it's threadsafe)). I've tried to set the timeout of the service to its maximum using the following binding: <binding name="WebHttpBinding" receiveTimeout="24.20:31:23.6470000"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="None" /> </security> <

WCF IClientMessageInspector.BeforeSendRequest modify request

风格不统一 提交于 2021-02-07 08:27:50
问题 I'm trying to modify request in WCF service. public object BeforeSendRequest(ref Message request, IClientChannel channel) { string xmlRequest = request.ToString(); XDocument xDoc = XDocument.Parse(xmlRequest); //Some request modifications //Here i have XML what in want to send request = Message.CreateMessage(request.Version, request.Headers.Action, WhatHere?); request.Headers.Clear(); return null; } But i don't know what i can set in CreateMessage or maybe is different way to set my XML as

WCF IClientMessageInspector.BeforeSendRequest modify request

谁说我不能喝 提交于 2021-02-07 08:27:19
问题 I'm trying to modify request in WCF service. public object BeforeSendRequest(ref Message request, IClientChannel channel) { string xmlRequest = request.ToString(); XDocument xDoc = XDocument.Parse(xmlRequest); //Some request modifications //Here i have XML what in want to send request = Message.CreateMessage(request.Version, request.Headers.Action, WhatHere?); request.Headers.Clear(); return null; } But i don't know what i can set in CreateMessage or maybe is different way to set my XML as

The AutofacServiceHost.Container static property must be set before services can be instantiated

北城以北 提交于 2021-02-07 07:56:28
问题 Within my XXXX.WS WCF services project I'm trying to get DI/IOC using autofac going...been at it all day but I think I'm close (different errors are progress here)...this error I can't understand how to shake..."AutofacServieHost.Container static property must be set..."..but I think I am setting it!?! What am I doing wrong? protected void Application_Start(object sender, EventArgs e) { var builder = new ContainerBuilder(); builder.Register(c => new DatabaseFactory()).As<IDatabaseFactory>()

The AutofacServiceHost.Container static property must be set before services can be instantiated

白昼怎懂夜的黑 提交于 2021-02-07 07:53:11
问题 Within my XXXX.WS WCF services project I'm trying to get DI/IOC using autofac going...been at it all day but I think I'm close (different errors are progress here)...this error I can't understand how to shake..."AutofacServieHost.Container static property must be set..."..but I think I am setting it!?! What am I doing wrong? protected void Application_Start(object sender, EventArgs e) { var builder = new ContainerBuilder(); builder.Register(c => new DatabaseFactory()).As<IDatabaseFactory>()

WCF behind a public reverse proxy which is used for traffic encryption

北城余情 提交于 2021-02-07 06:47:14
问题 I have a Silverlight application that connects to a WCF service. Under the basic configuration I am used to, there's no problem connecting this application to its corresponding WCF service. However, recently, one of my clients started using an Apache reverse proxy. This proxy is the public server and it's only used to encrypt HTTP traffic via SSL (HTTPS) going between the client and it. This proxy passes all traffic from it to the actual web server that hosts my application. The traffic

How can I accept arbitrary JSON objects in my REST WCF service?

六月ゝ 毕业季﹏ 提交于 2021-02-07 06:15:46
问题 I want to implement a service method like this: [OperationContract] [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat=WebMessageFormat.Json)] public void MakeShape(string shape, string color, IDictionary<string, object> moreArgs) { if (shape == "circle") { MakeCircle(color, moreArgs); } } My clients POST objects like: { "shape":"circle", "color": "blue", "radius": 42, "filled":true, "annotation": {"date":"1/1/2012", "owner":"George"} } At the call to MakeCircle, moreArgs would

How can I accept arbitrary JSON objects in my REST WCF service?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-07 06:15:10
问题 I want to implement a service method like this: [OperationContract] [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat=WebMessageFormat.Json)] public void MakeShape(string shape, string color, IDictionary<string, object> moreArgs) { if (shape == "circle") { MakeCircle(color, moreArgs); } } My clients POST objects like: { "shape":"circle", "color": "blue", "radius": 42, "filled":true, "annotation": {"date":"1/1/2012", "owner":"George"} } At the call to MakeCircle, moreArgs would

WCF net.tcp binding 808:* what does this mean?

五迷三道 提交于 2021-02-07 02:50:41
问题 I am trying to connect to a WCF service someone set up and i'm having trouble, I have no idea what 808:* means in the "Binding Information" for net.tcp site bindings. thanks this is how the bindings are configured in IIS 7 (navigate to IIS, right click on the application hosting the service, click 'edit bindings'). there are two entries: type: http, port: 8000, ip address: *, binding information: (empty) type: net.tcp, port: (empty), ip address: (empty), binding information: 808:* 回答1: I