wcf-configuration

How to configure WCF in a separate dll project

我与影子孤独终老i 提交于 2020-01-14 08:01:20
问题 I'm developing a web application (ASP.NET 3.5) that will consume a number of web services. I have created a separate dll-project for each web service: these projects contains the service reference and client code. However, the calling website MUST have the <system.serviceModel> information (the <bindings> and <client> nodes) in it's web.config, even though this information is also in the dll's app.config file! I have tried copying the serviceclass.dll.config over to the bin directory of the

How to enable HTTPS in WCF service

喜夏-厌秋 提交于 2019-12-29 07:58:53
问题 I have hosted my service on IIS. Hosted service has applied SSL certificate and on browse of URL, it appears with HTTPS. But, when i do consume this URL into client application (ASP.NET WEB Application) then, it allows to add https//domain/service.svc but, on client configuration, it appears the URL as http and not https . when do manual change then, it gives error as follow: The provided URI scheme 'https' is invalid; expected 'http'. Below is the WCF service configuration (hosted on IIS):

How to enable HTTPS in WCF service

佐手、 提交于 2019-12-29 07:58:13
问题 I have hosted my service on IIS. Hosted service has applied SSL certificate and on browse of URL, it appears with HTTPS. But, when i do consume this URL into client application (ASP.NET WEB Application) then, it allows to add https//domain/service.svc but, on client configuration, it appears the URL as http and not https . when do manual change then, it gives error as follow: The provided URI scheme 'https' is invalid; expected 'http'. Below is the WCF service configuration (hosted on IIS):

Silverlight+WCF exception: Expecting application/soap+xml, received text/xml

删除回忆录丶 提交于 2019-12-21 03:58:53
问题 I have a Silverlight application in which I would like to call a WCF service. When calling the service I receive the following response from the server: 415 Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8 Has anyone experienced this problem before? Does anyone know which configuration settings I need to adjust? Any information on how to fix this would be appreciated. 回答1: Well, you could try using the

WCF: using streaming with Message Contracts

随声附和 提交于 2019-12-17 17:32:17
问题 I am trying to use the WCF streaming with Message Contracts, because I need additional parameters beside the stream itself. Basically I am creating a file upload and download service, with some additional logic on top. Unfortunately, when I try to hit the service from the browser to check that everything is all right, I get the following error: Server Error in '/' Application. Operation 'UploadFile' in contract 'IFileTransferService' uses a MessageContract that has SOAP headers. SOAP headers

How do you configure WCF known types programmatically?

大兔子大兔子 提交于 2019-12-17 04:18:57
问题 My client/server application is using WCF for communication, which has been great. However one shortcoming of the current architecture is that I must use known type configuration for certain transmitted types. I'm using an in-house Pub/Sub mechanism and this requirement is unavoidable. The problem is that it's easy to forget to add the known type, and if you do, WCF fails silently with few clues as to what's going wrong. In my application, I know the set of types that are going to be sent. I

How do you configure WCF known types programmatically?

痴心易碎 提交于 2019-12-17 04:18:13
问题 My client/server application is using WCF for communication, which has been great. However one shortcoming of the current architecture is that I must use known type configuration for certain transmitted types. I'm using an in-house Pub/Sub mechanism and this requirement is unavoidable. The problem is that it's easy to forget to add the known type, and if you do, WCF fails silently with few clues as to what's going wrong. In my application, I know the set of types that are going to be sent. I

WCF Service Communication Exception Due to Parameter Size

假如想象 提交于 2019-12-12 12:04:59
问题 I've got a WCF Web MEthod that takes in an XElement object as a parameter. For one of my XML files (sized at 600KB or so) this works just fine, however, for this bigger XML file (about 5MB) I get a CommunicationException right away. I've already increased the message sizes for my binding. Below is the ServiceModel section of my web.config: <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="BIMIntegrationWS.metadataBehavior"> <serviceMetadata httpGetEnabled="true" />

netTCP binding Soap Security Negotiation Failed

最后都变了- 提交于 2019-12-12 08:22:46
问题 I am writing a WCF service requires impersonate and session. It is ok when I tried to call it on my local machine, but on the remote machine it always failed with such error: Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity 'host/hostname'. If the server is running in a service account (Network Service for example), specify the account's ServicePrincipalName as the identity in the EndpointAddress for the server. If the

Send UTF-8 character to WCF service

妖精的绣舞 提交于 2019-12-11 12:10:31
问题 How can i configure WCF service / client to send UTF-8 characters to the service? I want send norwegian, finnish, romanian text like this "ţşîăâăâşţŞŢĂÎÂ" My binding is like this: <basicHttpBinding> <binding name="myBindingConfiguration" receiveTimeout="00:21:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" transferMode="Buffered" useDefaultWebProxy="true" textEncoding="utf-8" > <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647