wcf

WCF: Data contract being converted to message contract

My WCF service exports a single operation, marked with the catch-all action and reply action so that it represents a common entry point to the service: [ServiceContract] public interface IService { [OperationContract (Action="*", ReplyAction="*")] Message MyMethod (Message msg); } Client proxies are still generated as data con...

How do I secure WCF services for website and mobile device using membership provider?

My question is a bit specific. I am currently hosting WCF services that provide data to a website (JQuery) and a mobile application (iphone). I want to secure this communication using a Membership Provider. I know how to setup the membership provider to secure the services so the Jquery part of the story is complete. However I need ...

How to create a WCF MessageFault

I see two ways to create a MessageFault: FaultException fe = new FaultException("error"); MessageFault f = fe.CreateMessageFault(); Or FaultCode fc = new FaultCode("error"); MessageFault f = MessageFault.CreateFault(fc, "error"); What's the difference b/w two? Is anyone preferred? ...

Securing a Web Service for use in Mobile Devices

I have a web service that I would like to use from a few different mobile applications. The data is not at the user level, but I don't want just anyone to be able to access the data. I want to limit the data access to just the mobile applications, but I don't know what I can do to prevent someone else from possibly writing an applicati...

Limiting number of calls to an WCF Web Service

We are planning to develop a web service using WCF. Is there a good way to limit the number of calls to the service in a period of time for a single IP? We don't want to put a hard limit (X number of times an hour), but we want to be able to prevent a spike from a single user. Rather than trying to come up with our own custom solution a...

WCF 4 Rest Getting IP of Request?

Hey, how do you get the IP address of the person making a request in something like the following: [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public partial c...

If ChannelTerminatedException occurs in WCF, which event is raised Faulted or Closed?

Self descriptive ...

How to read stream from WCF service

Hi, I have created a WCF service to stream files(download). Code for the service is below public Stream GetCoverScan(List<string> productIDs) { FileStream stream = new FileStream("", FileMode.Open, FileAccess.Read); return stream; } Can some one tell me how do i consume this on the client side. I have already created a proxy ...

BizTalk: how to limit number of connections to a wcf service?

I developed a BizTalk application that receives as input a file that contains a bunch of messages. I use the BizTalk XML disassembler component to 'debatch' the file in sepereate messages. Each of those messages is picked up from the MessageBox by an orchestration that transforms the message and calls a wcf service. The problem I am exp...

"Baseaddress not found"-error when deploying WCF service on GoDaddy.

Hi, I'm trying to deploy a WCF-service, but I'm having dificulties getting the final bits to work. I'm not a deployment guru in any way, so please bear with me. I'm using a WebHttpBinding to make Ajax calls to the service using JSON, but I receive the error: "Could not find a base address that matches scheme http for the endpoint with ...

Castle Windsor Component registration of multiple interface on a single service

hello. i am trying to implement multiple Service Contracts via a single WCF. i am trying to run this code: return new WindsorContainer() .AddFacility<WcfFacility>() .Register( Component.For<IServiceBehavior>().Instance(metadata), Component.For<IServiceBehavior>().Instance(debu...

Authentication via WCF webhttpbinding on iPhone

I'm using ASIHttpRequest API to communicate with my WCF services. The WCF services are set up as webHttpBinding so I can communicate in basic JSON without SOAP. This is the code I'm using to talk with the service and pass along user credentials: NSURL *url = [NSURL URLWithString:@"http://allseeing-i.com/top_secret/"]; ASIHTTPRequest *...

What methods are there to send read/ write a file from one machine to another?

Using asp.net what non http / ftp methods are there to read a file from one machine and write it back from another? For example i have an image on machine A called test.JPG. Machine B should be able to grab a copy of test.JPG generate a thunmbail and send it back to Machine A. I've looked at the following solutions but unsure which if...

How to export metadata from a running WCF service.

Hello, I wish to send the service metadata of a running WCF service to a third party developer, so he'll be able to create a proxy on his end. At the moment the service is accessible from my local machine only. ...

REST WCF Authentication

Hi, I'm building a self-hosting WCF service, which exposes 2 end-points for each service SOAP REST the SOAP uses WS-* SOAP authentication (authentication header) How can i go about implementing REST authentication? I thought about some sort of login method which will return a cookie of some sort, but i cant think of how to make th...

convert stream to zip file

Hi, I have made a WCF web service that streams a 200 mb zip file. Can some one please advise me on how i can read this stream at my client and then give option to the user to download that Thanks ...

Streaming an undetermined number of objects through WCF

I have a WCF service that needs to read large (10 to 20 million) numbers of objects from the database. What I'd like to do, is have the client open up a stream and have the server push data from the database as it's reading. So the client could just sit in a loop deserializing messages until it gets the EOF message from the server, ...

How to perform GET web requests to WCF Service Without WCF Client?

I want to send a GET web Request to a WCF service: for example to: http://TheirServerIP:PortNumber/TheirService/TheirServiceName.svc?op=theirWCFmethod i want to write a C# code in my page (web aplication) that send HTTP GET request to their service (without WCF Client) can i do that ? ...

How to Automate a WCF Service that does a job in regular intervals

I have a WCF Service that does a job on a request from client. I need that WCF Service to do a preprocessing on regular intervals on a day before it can service the requests coming from client. How can i automate my wcf service so that it does the preprocessing on regular intervals? ...

WCF duplex connection on iPhone?

Hi Guys, Is there way that a WCF duplex connection can be consumed in iPhone? Best regards, ...