wcf

Upcasting ServiceContract

Hi, I have a WCF service, which exposes many methods. My application consumes this service, and ServiceContract includes OperationContract definitions for only some of methods. To cut to the question, consider following code example: [ServiceContract] public interface IServer { [OperationContract] void BasicOperation(); } [S...

The resource cannot be found. WCF .svc file

I am making a WCF service. System Config: Widnows 7, ASP.NET 3.5, IIS 7.0 Server Config: IIS7, ASP.NET 3.5 It works fine on my system, but when i deploy this on the server i get following error The resource cannot be found. when i try accessing my .svc file. Please help me out in this. My server is with GoDaddy, so i have no contr...

How to change the behavior of string objects in web service calls via Windows Communication Foundation?

I have third party api's which require string values to be submitted as empty strings. On an asp.net page I can use this code (abbreviated here) and it works fine: public class Customer { private string addr1 = ""; public string Addr1 { get {return addr1;} set {addr1 = value;} } private string addr2 ...

WCF "Instance already exists in CounterSet" error when reopening ServiceHost

I have a working ServiceHost with a single NetTcpBinding and a single endpoint. I .Close() it. Then, I create a new ServiceHost instance with the exact same configuration as the first one. Then, when I try to .Open() the new instance I'm getting this very awkward exception: System.ArgumentException occurred Message=Instance 'LobbySer...

Serializing Exceptions WCF + Silverlight

I have a WCF service I use to submit bugs for my project. Snippet of the data class: Private _exception As Exception <DataMember()> _ Public Property Exception As Exception Get Return _exception End Get Set(ByVal value As Exception) _exception = value End Set End Property I have a Silverlight app that ...

How to get a PerSession context with WCF?

Hi, I got running a WCF service with custom binding, for now it use httpTransport. <customBinding> <binding name="myHttpBindingConf"> <context contextManagementEnabled="true" protectionLevel="None" contextExchangeMechanism="ContextSoapHeader" /> <textMessageEncoding/> <httpTransport useDe...

WCF timedout waiting for System.Diagnostics.Process to finish

Dear All, We have a WCF Service deployed on Windows Server 2003 that handles file transfers. When file is in Unix format, I am converting it to Dos format in the initialization stage using System.Diagnostics.Process (.WaitForExit()). Client calls the service: obj_DataSenderService = New DataSendClient() obj_DataSenderService.In...

Need to change ip address in app.config in runtime without runnning as admin

Hey guys, There's a lot of post saying how to change info in the app.config and there are posts that say you shouldn't edit info in the app.config but store info in user folders. I understand these topics. But what i want is a combination of both. I have a wcf setup for my client in an app.config, which contains the endpoint address to ...

WCF endpoint exception

Hi Team, I am just trying with various WCF(in .Net 3.0) scenarios. I am using self hosting. I am getting an exception as "Service 'MyServiceLibrary.NameDecorator' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the ...

WCF - Serialization Exception even after giving DataContract and DataMember

Hi Team, I am getting the following exception eventhough I have specified the Datacontract and Datamember. Could you please help me to understand what the issue is? "Type 'MyServiceLibrary.CompanyLogo' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized ...

Can I use WCF in this case?

We have a third party application that provied its web services to us by ASMX and it is created at the time of .NET 1.1 in the old days we were using VB 6.0 and connected to it by a PocketSOAP, etc... bt now we want to replace the VB 6.0 with C# 3.5 WinApps and still use that third party web services. so I wish to know what are my optio...

"Circuit breaker" for net.msmq?

Hi, The Circuit Breaker pattern, from the book Release It!, protects a service from requests while it is failing (or recovering). The net.msmq binding used with transactions give us nice retry and poison message capabilities. But I am missing the implementation of such a "Circuit breaker" pattern. A service is put under even heavier loa...

WCFServiceException: Required attribute 'binding' not found.

Hi, My WCF Service when hosted is throwing an error: WCF Service PayThisException: Required attribute 'binding' not found. (C:\Temp\WCFVirtualDirPath\web.config line 278) Please help me with some solution. Cheers, Ravi Santlani ...

Can JAX-WS host "web" service in desktop program?

Can Java (JAX-WS) host "web" service in desktop program? For example .net wcf can host services anywhere. Tnx all. ...

Dynamically setting WCF endpoint

Ive just started using WCF with silverlight and its working fine. But one thing that is bugging me is the address of the .svc. Why is it statically set in the .config? Would it be possible to set it when creating an instance of the proxy class? And if so, is there a way to set it to the current address? Our software will be deployed on m...

Can't get the JSONP workin' with WCF Data Services...

What am I missing here? It seems from all that I read and watched, exposing JSON from a WCF Data Service should be as easy as adding the '[JSONPSupportBehavior]' directive in front of the Service Class. Problem is VS2010 doesn't recognize 'JSONPSupportBehavior'. Is there a reference I am missing? Seemed like, from alll the articles, it w...

WCF - Cross platform question

Hi Team, I have a simple WCF service, self hosting and a .net client. I am generating a proxy using svcutil. When I add the proxy to the client it asks me to add System.ServiceModel.dll. Well, I can add it since it is a test scenario and I am working in .Net platform. However, suppose I am using a machine that does not support .Net, ho...

ASMX schema varies when using WCF Service

Hi, I have a client (created using ASMX "Add Web Reference"). The service is WCF. The signature of the methods varies for the client and the Service. I get some unwanted parameteres to the method. Note: I have used IsRequired = true for DataMember. Service: [OperationContract] int GetInt(); Client: proxy.GetInt(out...

Debugging a WCF service timeout on the server

Hi, I've got a WCF service that I'm hosting in IIS 7, which I connect to from a .NET page. The service and page work fine when I test it locally from Visual Studio, but when I put it on my staging server I get a TimeoutException. Any suggestions on how I can debug this to work out what's going wrong? ...

How do I make calls to a WCF service with jquery ajax from an SSL-secured page?

I have a WCF service returning JSON to jQuery ajax calls and presenting the results on an ASPX page. When the page is NOT under SSL, the ajax calls work perfectly. When the page IS under SSL, the calls fail. I understand that this behavior must be due to the Same Origin Policy (SOP). So, how do I setup my WCF service to accept calls fro...