wcf-configuration

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

前提是你 提交于 2019-12-03 11:22:23
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. Well, you could try using the "Silverlight-enabled WCF Service" template in VS2008, and comparing the differences? I expect that you need

WCF Client Configuration: how can I check if endpoint is in config file, and fallback to code if not?

☆樱花仙子☆ 提交于 2019-12-03 09:22:53
问题 Looking to make a Client that sends serialized Message objects back to a server via WCF. To make things easy for the end-developer (different departments) would be best that they didn't need to know how to edit their config file to set up the client end point data. That said, would also be brilliant that the endpoint wasn't embedded/hard-coded into the Client either. A mix scenario would appear to me to be the easiest solution to roll out: IF (described in config) USE config file ELSE

WCF MaxItemsInObjectGraph setting not working

拟墨画扇 提交于 2019-12-03 06:16:24
I have been getting the following error trying to access my WCF service. '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 Doing some research, it looks like all I need to do is update this setting to be a higher value. This is what I am trying to do, but the setting does not seem to be getting read from the configuration. I keep getting the same exception with the 65536 value in it. I followed the instructions found at this Link , but am having no luck. Here is what I have

WCF Client Configuration: how can I check if endpoint is in config file, and fallback to code if not?

半城伤御伤魂 提交于 2019-12-02 23:37:38
Looking to make a Client that sends serialized Message objects back to a server via WCF. To make things easy for the end-developer (different departments) would be best that they didn't need to know how to edit their config file to set up the client end point data. That said, would also be brilliant that the endpoint wasn't embedded/hard-coded into the Client either. A mix scenario would appear to me to be the easiest solution to roll out: IF (described in config) USE config file ELSE fallback to hard-coded endpoint. What I've found out is: new Client(); fails if no config file definition

What value should the servicePrincipalName have?

纵然是瞬间 提交于 2019-11-30 07:00:45
I'm trying to set up client impersonation on my service. I need to set a value for the servicePrincipalName of my services endPoint I'm looking at this MSDN article but still cannot quite figure it out My service is hosted in a console app on a server that we'll call ServerName1. The Uri is: net.tcp://ServerName1:9990/TestService1/ . What specifically should my servicePrincipalName be? I tried, with no joy: <identity> <servicePrincipalName value="ServerName1" /> </identity> The name of the user you wish the service to user (execute under). So if you want to execute it under 'local network'

How to enable HTTPS in WCF service

蓝咒 提交于 2019-11-29 11:58:57
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): <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="customBehavior"> <serviceMetadata

What value should the servicePrincipalName have?

时光总嘲笑我的痴心妄想 提交于 2019-11-29 07:56:50
问题 I'm trying to set up client impersonation on my service. I need to set a value for the servicePrincipalName of my services endPoint I'm looking at this MSDN article but still cannot quite figure it out My service is hosted in a console app on a server that we'll call ServerName1. The Uri is: net.tcp://ServerName1:9990/TestService1/ . What specifically should my servicePrincipalName be? I tried, with no joy: <identity> <servicePrincipalName value="ServerName1" /> </identity> 回答1: Configuring

WCF Known Type from System.Object in Config

荒凉一梦 提交于 2019-11-27 22:23:02
问题 I'm trying to specify a known type in my config, but I'm having problems with the fact that it derives from Object. I can make it work specifying the known type via attribute. But in this case I need to make it work from the config. Here's an example. The following works fine: [ServiceContract] [ServiceKnownType(typeof(MyData))] public interface IContract { [OperationContract] void Send(object data); } [DataContract] public class MyData { [DataMember] public string Message { get; set; } } But

WCF ConcurrencyMode Single and InstanceContextMode PerCall

亡梦爱人 提交于 2019-11-27 22:00:19
I have an issue with my wcf service config. I would like every call to my service create a new instance of the service. For the concurrency I would like to one call is finished before another start. Thus if I have a service like this one: [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Single, InstanceContextMode=InstanceContextMode.PerCall)] public class MyService: IMyService { public bool MyServiceOp() { Debug.WriteLine("thread "+ Thread.CurrentThread.ManagedThreadId.ToString()); Debug.WriteLine("start operation "); Do_work() Debug.WriteLine("end operation"); return true; } } When I call it

Service has zero application (non-infrastructure) endpoints

我们两清 提交于 2019-11-27 12:15:51
I recently created a WCF service (dll) and a service host (exe). I know my WCF service is working correctly since I am able to successfully add the service to WcfTestClient. However, I seem to be running into an issue when I comes to utlizing my WCF from a service host (exe). I can add a reference to the WCF (dll) to my service host (exe) and create the necessary componets to the exe; such as the service installer, service host, and the app.config, compile and then finally install the exe using InstallUtil. But, when I tried to start the service in the Microsoft Management Console, the service