wcf

WCF and eBay SDK library

Hi everybody, I've a question about WCF. I created a WCF service with a MSMQ endpoint. This service is exposed by a Windows Service and the service is consumed by an Asp.net application. My Asp.net application uses an external DLL containing classes and enums (defined by eBay) that I'd like to use in my DataContract. I cannot modify th...

DNS name vs MachineName/Localhost for VS Add Service References

We are developing a Silverlight 3 application using WCF services on the back-end. Some of these services will also be consumed by external clients. We'll be using IIS to host these services. I've noticed that when using VS to add a Service Reference it uses the machine name to resolve the WSDL location and schemaLocations in the XSD's...

Using .NET 2.0 class library from Silverlight WCF service, public properties remain unexposed

Hi all, Here's a bit subtle issue I'm dealing with, and would appreciate any help. We have our project on production mode, built with .NET 2.0. We have recently developed a Silverlight application external to the 2.0 solution, and it's "speaking" with a WCF service. This service consumes DLLs we copy from our 2.0 solution publish folde...

Hosting a precompiled WCF REST service in IIS6 - how?

Can anyone provide a repeatable process for hosting a precompiled website or a web application in IIS6 that can be built using aspnet_compiler? I cannot get code to build reliably (works sometimes) with aspnet_compiler without hitting the "cannot load type: global" error. Changing to a website does not help as I can't even get the precom...

WCF Callback Contract InvalidOperationException: Collection has been modified

We are using a WCF service with a Callback contract. Communication is Asynchronous. The service contract is defined as: [ServiceContract(Namespace = "Silverlight", CallbackContract = typeof(ISessionClient),SessionMode = SessionMode.Allowed)] public interface ISessionService With a method: [OperationContract(IsOneWay = true)] vo...

Can I generate proxy objects for WCF service library using scriptmanager?

I have used the AJAX Enabled WCF Service template from within a web application. By adding a Service reference to the scriptmanager, some client objects are generated allowing me to easily consume the service. My question is can I do anything like that when I use a WCF Service Library? I added the project to my solution and in my web app...

WCF OutgoingMessageHeaders not saving values

I am trying to write a MessageHeader to the OutgoingMessageHeaders but the value isn't sticking. BasicHttpBinding basicHttpBinding = new BasicHttpBinding(); EndpointAddress endpointAddress = new EndpointAddress("http://localhost:1003/Client.svc"); IClientService serviceClient = new ChannelFactory<IClientService>(basicHttpBinding, endpo...

WCF MSMQ binding with an IIS service - how to instantiate the service?

I have a WCF service with netMsmqBinding. My client can send messages to my queue, and when the service is running it retrieves messages from the queue as expected. If the service is not running, messages received are queued until the service starts. My problem is that the service does not start when a message hits the queue. The ser...

Why can't my WCF Web Service see it's own web.config Connectionstrings?

I have written an ASP.Net 3.5 WCF service and when I created this project VS gave me a web.config file to go with it. Having done this the app now seems entirely blind to connectionstrings, a big problem as the app will be heavily reliant on reformatting and spitting out SQL Server DB data in various web friendly formats. Most of the re...

Designing WCF server for low latency

How to achieve low latency of WCF server in publish-subscribe scenario? Specifically, clients subscribe to data and receive updates, latency in question is between data changing and client receiving the change? CPU, memory, bandwidth requirements are not important and can be high. Basics are obvious: binary serialization, named pipes, e...

web reference to WCF service using wrong endpoint

I've got a WCF service hosted on my server. I've set up 2 seperate endpoints on the service, 1 wshttpbinding for communicating with .net 3.5 service references and 1 basichttpbinding for commuicating with all other web references. When i reference the service as a service reference in a .net 3.5 project everything works fine. The servic...

IErrorHandler Get Original Message

Hi, I have a WCF error handler that uses the IErrorHandler interface. In the HandleError method of this error handler I write the error exception to the log. This all works fine. However, I have a requirement to also write the actual message that raised the exception to the log as well and this is not something passed into the HandleErr...

Closing WCF connection

We are using WCF service on the client side we are planning to explicitly close the connection It seems there are more then one way of closing Sample1: In the finally block of the WCF service consumption use if (client.State == CommunicationState.Faulted) { client.Abort(); } client.Close(); Since if the service is in fault state...

OAuth Consumer request for token from ServiceProvider returns InternalServerError

I'm playing around with DevDefined.OAuth - an OAuth consumer and provider implementation for .Net http://code.google.com/p/devdefined-tools/wiki/OAuth and on launching the ExampleConsumerSite project after configuring the service endpoints on my IIS 7 web server, I'm receiving the following error: Description: An unhandled exception occ...

Duplex Wcf Server Threading - Where to do synchronous DB I/O?

Here are my basic assumptions: Wcf executes my service operation methods on IOCP threads (UnsafeQueueNativeOverlapped) instead of normal ThreadPool threads (QueueUserWorkItem). Blocking I/O should not be done inside of one-way service operation methods. Blocking I/O should not be done inside of a normal ThreadPool thread. I believe t...

Custom HTTP Header with webservice call

Hi, I need to make a webservice call in C# and with every request i need to send a custom HTTP header. How do i do this. thanks ...

WCF endpoints, baseAddressPrefixFilters, host headers

I have two websites on the same machine. The first (client) references a WCF service on the second site(server). How do I set the address for the service reference? When moving from development on my local machine to the group development server, how do I change the url for the service? The sites are differentiated by host headers, lik...

Is it possible to use WCF service instead of .asmx web service with AJAX Control Toolkit Slideshow extender?

I have a working WCF service that I can call via AJAX javascript routine. I cannot get it to work with the Slideshow extender in the Ajax Control Toolkit. No errors reported, slideshow just does not load and run. I can write AJAX javascript routine within the page and successfully access the return results from the WCF service (array of ...

Calling WCF service w/ ProtoBehavior and multiple parameters

This one has me puzzled and am hoping it's a silly oversight on my part. When I call the following web service, if a null parameter is encountered then all following parameters are null (or zero for the numerics). [OperationContract, ProtoBehavior] [ServiceKnownType(typeof(ServiceFault))] [FaultContract(typeof(ServiceFault))] PersonPro...

WCF REST Compression

I have a REST service that returns a large chunk of XML, about 150k worth. e.g. http://xmlservice.com/services/RestService.svc/GetLargeXML Therefore I want to compress the response from the server, as GZIP should reduce this to something much smaller. Having searched everywhere I cannot for the life of me find an example of how to ...