wcf

Sharing assembiles between Silverlight and "plain vanilla" .Net.

I'm using some generic classes as data containers, and am using them to pass data to and from a wcf service. Because of the way WCF mangles generic names on the client side into a class named something like "ListOfBlah231546797646", I'm adding a reference to the real assembly as a "KnownType". Silverlight needs to consume these service...

Configuring transport security for WCF

I have a windows service that hosts a WCF service, and a webservice on a different machine acting as a client. I have the nettcpbinding set to Transport security using Windows authentication. Am I correct to assume that the windows user the webservice is running under must have permission to access the WCF service on the other machine?...

How to use IRouteHandler to invoke a WCF REST service

Has anybody managed to make an IRouteHandler to invoke a WCF REST Service. I can't find the appropriate IHttpHandler to return in the IRouteHandler implementation. I want to try routing as opposed to url-rewriting to see if I can get the required RESTful URIs in cassini as well as IIS6+. Thanks, Steve ...

WCF: How should I maintain contract classes in client and server?

I am working on a WCF application with a server and a client (naturally). In server project, I defined the classes with contract attributes. Now when the server is ready, I added the service reference and it created the proxy for me. I used it and it did work fine. The question I want to ask is, is it OK if I create a common DLL which ...

How to Consume WCF Service with Android

Hi, I am creating a server in .NET and a client application for Android. I would like to implement an authentication method which sends username and password to server and a server sends back a session string. I'm not familiar with WCF so I would really appreciate your help. In java I've written the following method: private void Log...

WCF type collision

I have a problem with WCF. I think I understand what the issue is, but I need to test that understanding and ask if anyone has seen this before or can suggest a workaround or an alternate approach. Please bear with me: this is a sizeable problem which is difficult to break down to a minimal test case. The issue: I'm writing a C# interfa...

Question about CCR and WCF integration

Regardind this solution http://stackoverflow.com/questions/494463/using-the-ccr-with-asynchronous-wcf-service Why do you need to do this : ThreadPool.QueueUserWorkItem(s => callback(this)); instead of just calling callback(this) ? Isn't QueueUserWorkItem going to use yet another thread ? ...

Duplex MSMQ Channel ?

Hi, I'd like to be able to use duplex contract with MSMQ, does someone have any ideas to do that ? I've seen some blogs here and here, but it seems that their attempt (using duplex contracts over MSMQ using a:ReplyTo) has not successed. Reliable session cannot help me because it doesn't garantee that the message will be sent when the n...

ASP.NET Application Services and an ASP.NET website

I'm busy building a .NET WCF framework for my company which will allow us to quickly and easily implement community type websites moving forward. The framework currently caters for things like Blogging, Forums and commenting on them etc. I wanted to now implement Membership into the framework, and read up about ASP.NET Application Serv...

Best approach to fire Thread/Process under IIS/WCF, in a shared hosting.

Hi, Scenario: A WCF service receives an XDocument from clients, processes it and inserts a row in an MS SQL Table. Multiple clients could be calling the WCF service simultaneously. The call usually doesn't take long (a few secs). Now I need something to poll the SQL Table and run another set of processes in an asynchronous way. The ...

WCF: MessageContract, DataContract ... Confused?

Hi, I'm writing my first WCF service. I decided to write the service just as a DLL to begin with and then aspect the WCF stuff on afterwards which is where I am now. I was advised by the arcitect that I should stick to a specific format for message objects which I have done. However I've used Interfaces, complex types and lists thereof...

How to enable webHttp connection in WCF?

Hi, I am developing a solution for transfering data from android phone to the server (written in C#/.NET). I created a WCF service and testing with emulator everything worked fine. Then when I tried to login from mobile phone (connected to home wifi network) I got the following exception message: org.apache.http.conn.HttpHostConnec...

How to returnlarge and complex objects from a WCF Serice?

Hi to all, i think i have a serialization or a sizing problem when trying to return a complex object (an object with nested objects with nested objects..). The error code i get a CommunicationException. Any idea? EDIT : This is the stacktrace A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in msc...

Streamed output from a WCF service

I am trying to get streamed output from a WCF service. I have set the transferMode to "StreamedResponse". When client receives the stream from server, it is unable to read the stream. While debugging from server side I can see that the stream has data, but from client side stream.Length throws a not supported exception. Reading the strea...

Programmatically access WCF EndPoint URL

I have an IIS hosted WCF service (configured as described in this blog post ... I need to know what the configured endpoint's URL is. For example, given this configuration: <system.serviceModel> <services> <service behaviorConfiguration="mexBehavior" name="Sc.Neo.Bus.Server.MessageProxy"> <endpoint address="http://l...

MSBuild WCF Options

I think I need to use custom 'svcutil' options to generate a WCF client. I know that I can provide a custom pre-build Event in my project file and apply the svcutil command line there. However I'm wondering if there's any documentation on what overridable rules or targets exist in MSBuild that can be used to override the default comman...

Determine if port is in use?

Is there a way, using C#, to determine if a port is available? I'd like to check before I start up a WCF ServiceHost instance using a port that's already used :-) ...

WCF: What exactly does IsInitiating do?

In some places I see that IsInitiating creates a new session. Other places say that it creates a new session only if needed. Which is correct? Just to make it clear, I want to make sure I can call IService.Foo three times without three sessions being created. ...

Performance of WCF with net.tcp

I have a WCF net.tcp service hosted with the builtin ServiceHost, and when doing some stress tests I get a strange behavior. The first time i send a bunch of requests, 5 to 10 requests are answered quickly, and the rest are returning at about 2 second intervals. The second time i send the requests, 10 - 20 are returned quickly, and rest ...

Polymorphism in WCF

Hi, I'm looking at building a WCF service that can store/retrieve a range of different types. Is the following example workable and also considered acceptable design: [ServiceContract] public interface IConnection { [OperationContract] IObject RetrieveObject(Guid ObjectID); [OperationContract] Guid StoreObject(I...