wcfservice

WCF Mutliple Service Endpoints

I am hosting a WCF Service as a Windows Service. A snapshot below. myHost = new ServiceHost(typeof(AnalyticsService)); Uri address = new Uri("http://localhost:8080/MathServiceLibrary"); WSHttpBinding binding = new WSHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; binding.MaxBufferPoolSize = 2147483647; //binding.Security....

Handle WCF exceptions from webservice proxy

I have a WCF service (.NET 4) hosted in IIS. My service contract has one method with: [FaultContract(typeof(string))] My service implementation for that method validates input parameters and may throw an exception like this: if (string.IsNullOrWhiteSpace(siteName)) { throw new FaultException("siteName is required."); } The consumer...

wcf service port

Hi, I have two processes running on the same machine. Each process is hosting a WCF service to allow inter process communications asynchronously. As of now, I have assigned a fixed port 8731 and 9000 to the two wcf services. What if a customer machine has these ports taken up? How can i dynamically make the wcf client find the wcf servi...

How to share data between wcf services?

Hello, i want to build a simple winform chat application using wcf. There will be a login form, a form to select the channel and the chat form. I figured it out like this: MembershipService -> login, logout, register ChatService ->JoinChatChannel, LeaveChannel, SendPublicMessage, SendPrivateMessage MembershipService: public clas...

How to setup selfhosted https WCF service with embedded certificates on client and server?

Im creating a simple WCF service for receiving crash reports. The service will run self-hosted as a console program and must run without any installation of certificates. Security-wise i need to ensure that the data send by the client is only send to our server and that the data is not intercepted. From the server point of view i would...

Problem in Hosting WCF Service using wsHttpBinding in IIS

I am trying to host my service using following configuration. <system.serviceModel> <services> <service name="Test.MyService" behaviorConfiguration="MyServiceBehavior"> <!-- Service Endpoints --> <endpoint address="MyTestService" binding="wsHttpBinding" bindingConfiguration="WebserviceHttpBin...

Specifying a WCF Service session to persist indefinitely

I'm new to WCF, so maybe this is something best done in another way. Right now I have a collection of WCF Services, but I am trying to build in functionality which sends weekly emails. To do this I built another WCF service with the code below: [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, AutomaticSessionShutdown...

How to return Dictionary fromJSON WCF service.

Hi ... I want to call a WCF service in which i pass just one argument(let's UserId) of any dictionary(have multiple K-V pairs)....& then save all the other arguments of this Dictionary in Database(SQl Server-2005). I have to use this for Iphone. Plz Plz any help/suggestion. ...

Using Autofac for DI into WCF service hosted in ASP.NET application

I'm having trouble injecting services dependencies into my WCF service using Autofac 1.4.5. I've read and followed the Autofac wiki page on WcfIntegration but my debugging shows me that my WCF service is created by the System.ServiceModel.Dispatcher.InstanceBehavior.GetInstance() method and not by the AutofacWebServiceHostFactory. What a...

Does IIS shut down hosted services? How can I prevent that?

I'd like to host a WCF service in IIS 7. I'm not familiar with this topic, but a coworker ensured me that IIS is going to shut down the hosted service after some time ("days") no matter what. When does IIS actually shut down my services automatically? How do I set it up so it keeps them running all the time (even if they are not doing a...

How to post data from Iphone to sqlserver.

Hi... I want to post data from Iphone to Sqlserver using WCF REST service.... In Iphone i have a dictionary(with 5 K-V pairs) & want to pass a single element of this dictionary (like Id )through webservice(Browser) ......& save all the other K-V pairs in Sqlserver corresponding to this Id using the method made in Wcf service. Plz Any he...

WCF Restful services in VS 2010?

Hi There, Does anyone know of a good screencast, walkthrough or tutorial for creating WCF Restful services in VS 2010? I found the starter kit, but this appears to be for .net 3.5 / VS 2008.?? Then i found via the extension gallery a WCF Restful services template for VS 2010... THis appears to be what i need, but i have no idea of whe...

Simulate Concurrent WCF Client Calls And Measure Response Time

I am trying to simulate X number of concurrent requests for a WCF Service and measure the response time for each request. I want to have all the requests hit the Service at more or less the same time. As the first step I spawned X number of Threads, using the Thread class, and have invoked the Start method. To synchronize all the reque...

unable to fetch data from link table using WCF

I have a aspnet_Users table with UserD as primary key and master_actor table with ActorID as primary key and have no common key.. The two tables are linked together using a link table master_actorlink table with UserID and ActorID columns.. I want to fetch the ActorID of master_actorlink table using the UserID via WCF services.. I'm...

Accessing a field

Hi Guys, I have a Webservice and a client to webservice. I am using Duplex pattern. There is a field in client called "id" which is set to some value. The client code is shown below. string id = "foobar"; InstanceContext context = new InstanceContext(this); CalcClient client = new CalcClient(context); How can I access the field "id...

how do you stress test a wcf service

What tools and techniques have you used for testing your wcf services? Where there any special considerations made for the type of hosting you used(ie windows service vs IIS vs WAS)? ...

WCF Instancing query

I am in the middle of converting our legacy application to an enterprise architecture using WCF. I am struggling with some instancing/concurrency issues. The application architecture that is required does not lend itself very well to the WCF options available using ConcurrencyMode & InstancingContextMode. The behaviour needed is somet...

WCF Web Service Metadata Publishing Disabled Error

I modified my web.config to add a custom binding in order to increase the buffer and message size, and it seems like in creating the service element explicitly, it has somehow broken the reference to my behavior element. When I try to run my web service from VS using the WCF Test Client, or I go to the service page, I get the error: M...

Is OData intended only as a way to publish data to other parties or can i use it as a Data Layer for my Application

I am a bit confused about OData. Is it meant only for "publishing" data to other parties? Or can I use it in my client server application as a data layer. The case I have is : developing a client-server application for managing some information. The client is a WPF application, the Server is basically Database and a WCF Layer to expose ...

WCF and Stored Procedure Options

I'm making my first WCF Service and I am unsure which route I should take with stored procedures and Linq to Sql. I understand that I can drag and drop stored procs to my DBML file and call them that way, or call them directly, not using the dbml. Is there a reason why i should choose one over the other? I guess I'm a little confused... ...