wcf

WCF Service Design Question

Hi, I have to create a WCF service that will accept thousands of requests every 5 minutes, which each request passing a small (1-5KB) text file. The service will pass the file contents to another assembly, which will process the lines and insert some records into the database. Nothing too heavy on this side. I need help on the followi...

Client-Server Application with Plug-in Architecture

I am thinking about a plugin model for my client-server application. A plugin will have a UI part(for configuration, runs on client) and an execution part(does the work, runs on server). For simplicity, I'm trying to figure out if I can locate my plugin DLL on the server side, but still show the UI on the client side. I thought about ...

WCF doesn't receive messages - How can you debug WCF service?

Hi, I have a WCF host that listen to a topic and process incoming messages. the code look this: using (ServiceHost host = new ServiceHost(MessagingServiceType)) { host.Open(); } and the MessagingServiceType looks like that: [ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)] public class MessagingServic...

WCF service registration for distrubuted applications

Hi all, I am in the process of designing a client server app that will use WCF to communicate with the client. It is possible it could become heavily loaded and want to design it in a distributed manner. To that end I have split the application into a number of services. N number of services could be running to deal with the requests...

XML Deserializer / XSD tool / object arrays

I have an XSD, and used the xsd.exe tool to create c# classes. In a webservice I am accepting in the MessageContract an instance of one of these created objects. The relevant portion of the xsd to this question is here: <xs:element name="Tasks"> <xs:complexType> <xs:sequence> <xs:element ref="Task" maxOccurs="un...

How to programatically set a single endpoint for a WCF service

I'm trying to allow for user configuration of a WCF service, including the IP and port number that the service listens on. The user has a separate config application that allows for these values to be set, but the problem I am running into is that the app.config MUST have an endpoint defined in order to create a new ServiceHost entry...b...

WCF - How to create a custom header sent from a Compact Framework Client

I want to add a custom header for WCF service communications (add it in for the client and read it out for the service). There are many examples of this on the internet, but they use classes and interfaces in System.ServiceModel that do not exist in the Compact Framework (IEndpointBehavior, IClientMessageInspector, etc). This link has ...

WCF, Silverlight: clientaccesspolicy.xml not being found

I"m trying to connect my Silverlight application to a WCF service that I'm hosting myself. I've created a clientaccesspolicy.xml file, and placed it in the service host project's root, but when I try to hit the service, my http sniffer says it can't be found. Specifically the file it's looking for is http://localhost:8080/clientaccesspol...

Why do WCF endpoints ignore the hosts file?

I have endpoints defined in a config file with a "fake" domain name. The idea being that this would make deployment easier, since instead of modifying the config files, we simply set the ip address of the "fake" domain name on the enviroments' hosts files. So for example, on my local dev box, I would have an entry in the hosts file 1...

How does a custom SOAP header relate to a custom WCF header?

I am trying to send more info in each message from the client (Mobile Device) to my service. In my research I am finding about interceptors and custom wcf headers. Now I am starting to see stuff about custom SOAP headers. What is the difference? ...

WCF message comes through "UnknownMessageReceived" event - why?

Hi, My WCF service is receiving incoming messages through the "UnknownMessageReceived" event and not through the function that i would expect it to go through. How can i know what was the problem that caused it to end up there? is there anyway to debug it? Thanks for your help. ...

Debug WCF service called by a windows service in C#

I have a Windows service that has been scheduled using Quartz.NET. I have to debug it. As I cannot debug the start method, I put a breakpoint on the Execute method. I compiled my solution and installed this service using installutil /i Name of the exe. Then I did Attach To Process from the Debug menu of Visual Studio and attached that EX...

Passing complex objects into a WCF Rest Service

I have an Operation Contract that accepts a complex object and I'm calling the operation through jQuery. How do I pass in a complex type object like that using jQuery. Below is the operation signature: public Resolution CreateNewResolution(Resolution NewResolution); I need to pass in a Resolution object on the client, but I don't know...

Authenticating WCF DataServices

Hi, I am trying to authenticate calls to a WCF DataServices service via Silverlight. Essentially, when a user logs in they get a special hash which should be embedded in the headers of every request to the WCF DataServices. Currently use this as a check via a QueryInterceptor method eg [QueryInterceptor("Orders")] public Expr...

Running WCF Service on Vista 64 bit

I have a simple console application which runs as a WCF service host. bsicHttpBinding is used. When I try to get the service reference in my client ( another console app) I get this error "There was an error downloading http:// localhost:9999/TS. The request failed with HTTP status 400: Bad Request. Metadata contains a reference that c...

Multiple streams in wcf

Hi, I am trying upload multiple files using WCF. Since WCF only supports one stream I need to join multiple file streams together on the client and pass this to the service. The files might be huge and cannot be buffered in memory. How do I do this? Please show some code sample if you have. Regards, Rune ...

IIS: web applications warmup

After IIS reset, first hit taking a long time because AppPool is starting and other .NET components, DB connections are initializing. What would be the best way to warm up IIS applications and preload required components (e.g. GAC Assemblies, WCF, WWF libraries) I'm working on IIS 6, Windows 2003 server x64 (I know there is warmup mo...

Exception while calling an ASP.NET Web Service using WCF

I have a WCF client which calls an ASP.NET web service in a different project. I get the following error message: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction http://localhost/IMyWebService/MeMethod Web Service code: [WebService(Namespace = "http://tempuri.org/")] [WebSe...

WCF service level variable - C#

Hello there, My WCF Service is hosted in Windows Service and I have added some keys in the appSettings section of Windows Service app.config. Now, I want these keys to be available at more than one code file in WCF Library. Is there any way I can define WCF Service level variable, so that I can avoid - ConfigurationSettings.AppSetti...

Architechture of service application in WCF

I need some help with the architechture of a WCF application. The will be a number of services that should be available to serve a number of different clients, e.g. ASP.Net application (JavaScript and/or Silverlight) iPhone Windows Mobile Android Some of the services need authentication and some will be available w/o authentication. ...