wcf-binding

How to increase the MaxStringContentLength size when creating the XML reader

折月煮酒 提交于 2019-12-25 05:14:38
问题 I am getting following error: The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'InsertQuery'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 33788. To increase the size of MaxStringContentLength, i

WCF communication on Http

大城市里の小女人 提交于 2019-12-25 02:53:21
问题 I have a WCF service which works fine when accessed internally. The WCF link is . I requested the network team at our organization to expose this WCF to outside world since public websites will access this WCF. I gave the network team DNS as somewebsite.com and IP address of the server on which WCF is hosted. After getting the confirmation from Network team (they use Juniper network ) that they have made the required settings to make the WCF available to outside world I tested it as an

HTTP and HTTPS Bindings

心已入冬 提交于 2019-12-25 02:18:15
问题 I have a application that consumes a WCF web service. I have it cofigured to use a https binding. It works fine. I also wanted to add a HTTP binding to the same. My requirement is if my client is on my domain (or on VPN) i need them to use the HTTP binding. and if they are external clients I want them to use HTTPS binding. How can I go about doing that? I am very new to WCF and this is my first try on it. I have attached my Config File for reference. I did not know where to add the end point

wcf service with params

你。 提交于 2019-12-25 00:47:04
问题 the contract def is [OperationContract] DataSet myfunc(string a, params object[] args); but the proxy is generated like so by the add service ref wizard public System.Data.DataSet myfunc(string a, object[] args) { return base.Channel.GetDataSet(a, args); } what gives ? both are .net 4.0 projects I can change the proxy but the changes will be lost on update 回答1: Not sure what your question is, but I'm guessing you're seeing problems because of your use of params there. WSDL doesn't deal with

How to create a wsdl file for a WCF service library?

帅比萌擦擦* 提交于 2019-12-24 17:39:23
问题 I have a WCF service library project. I am trying to generate a wsdl file by launching WCF Test Client by running it in Visual studio (pushed F5). It launched WCF Test Client but it says "Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.". It also gives me the below error message. c:\Users\xxx\AppData\Local\Temp\Test Client Projects\10.0\354421b1-b65e-45fc-8d98-ac87254a5903\Client.cs(911,26) : error CS0644: 'System

How do I configure WCF client to use XElement and not XmlDocument?

给你一囗甜甜゛ 提交于 2019-12-24 15:13:58
问题 I have an ASMX webservice that returns XElement - (not an .svc WCF service) When consuming the service in Silverlight the client that is generated uses XElement as I want. However in C# .NET 3.5 WCF 'Service Reference' it generates this property using XmlDocument . In C# .NET 4 WCF 'Service Reference' it also generates this property using XmlDocument . So it doesn't seem to be a .NET 4 thing - but a Silverlight thing. How can I configure the WCF client to use XElement also in the standard 3.5

Custom Endpoint Behavior using Standard webHttpEndpoint

房东的猫 提交于 2019-12-24 09:39:37
问题 We currently have a working REST WCF service. I'm trying to implement a custom behavior for error handling that will return a custom JSON object. I believe the article found here WCF Exception Handling with IErrorHandler will do the trick, however, the example shows how to add the behavior via code. We're hosting the service via IIS and have no ServiceHost. Can anyone direct me as to how to add my custom error handling class to the web.config? I've searched all over Google and SO and have

Sending larger object to WCF results in 400 Bad Request

爱⌒轻易说出口 提交于 2019-12-24 02:56:06
问题 I have a unit test that sends a moderately large object to a WCF service. If I pass null for that parameter, everything works fine. When I send a populated object, I get an HTTP 400 response. WCF tracing shows this error: The maximum message size quota for incoming messages (65536) has been exceeded. However, I have cranked up the size configuration parameters in app.config for the unit test project as follows: <basicHttpBinding> <binding name="BasicHttpBinding_IMyAppService" closeTimeout="00

Supporting both Mtom and Text as MessageEncoding in WCF

纵然是瞬间 提交于 2019-12-23 17:19:11
问题 I have a WCF service, which has a method with the following signature: object GetCommand(Guid apiKey, SocialService service, string name, object argument); The reason it's working with objects as both the return type and last argument, is because it should be possible to pass any type as argument and return any type. Anyway, I'm passing an object, which contains the following property: public byte[] Photo { get; set; } To enable large messages, I'd like to start using Mtom, while I was

ASP.NET website -> WCF service -> WCF service, with impersonation all the way?

淺唱寂寞╮ 提交于 2019-12-23 12:48:12
问题 In short my scenario is like so: The user triggers an action in the web browser, which causes an Ajax call to a web service in the web server ( server A ). The web server issues a call to a WCF service, hosted in IIS ( server B ) The WCF service issues a call to another WCF service, hosted in IIS ( server C ) All web sites are exposed over http, not https. Now, server C needs to know who the user is in the other end. I got it working so far so that the WCF service call to server B is