wcfservice

Is opening too many threads in an application bad?

I have a C# winform application. it has many forms with different functionalities. These forms wrap to a WCF service. for example form1 calls serviceMethod1 continuously and updates the results form2 calls serviceMethod2 continuously and updates the results The calls are made in a different thread per each form, but this is ending up...

System.InvalidOperationException: An exception was thrown in a call to a WSDL export extension: System.ServiceModel.Description.DataContractSerializerOperationBehavior

can any one help me to fix this exception.... I have created service to get the country details information of various clients.. but while hosting the service i am getting this exception. i am using basic http binding. An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.InvalidOperationExce...

How to do WCF Hosting in a console app?

How do I host my WCF class library in a console app? I have a WCF service within a class library and I wanted to test the service outside my project with a test app.(I have to do it outside the project) ...

Hosting and Consuming WCF Service from Same Process.

Can you become a client of a WCF Service from with the Process that is hosting the WCF Service? I have tried creating seperate App Domains within the same process and still no success. The service is confirmed to be available on Http, Net.TCP and Net.Pipe. Thank you for any help! Nat ...

Return 401 from WCF service

How can I return a HTTP 401 from a WCF service? ...

How to do WCF REST Caching?

I have a WCF REST service which needs to return both Static and some filtered data based on what parameters were passed in by the clients(which are fat windows clients) Since the data store which feeds this service doesnt change too often, I wanted to cache this data on the service(Server side caching), The data store is an Azure Table,...

WCF service: Returning custom objects

I'm using WCF service in my application. I need to return a custom object in the service class. The method is as follows: IService.cs: [OperationContract] object GetObject(); Service.cs public object GetObject() { object NewObject = "Test"; return NewObject; } Whenever i make a call to the service, it throws an exception with t...

WCF conversion of larger system Multiple Inputs?

I have many apps currently using a DAL we wrote. I am attempting to reconstruct these app biz layers within a WCF. I have to pass back to the mainframe watchdog a security token for each of our bizz apps. Would I make numerous WCF Front ends, exposed on web server, to have them tie back to the proper "service" dll for processing? H...

How to add custom soap headers in wcf?

Hi, Can I add Custom SOAP header in WCF incomming/outgoing messages in basicHttpBinding, like we can add custome authenticatino header in ASMX web services? Those custome SOAP header should be accessble using .net 2.0/1.1 web service clients (accessible by WSDL.EXE tool) . Thanks nRk ...

WCF Error: looking for a false token when JSON request sent

Hello, I'm having WCF problems where I'm receiving errors that a token 'false' was expected but found 'filen', which is because I have a ajax function written in jQuery that is sending JSON in the form of "filename:Bank Detail SPC 09-0724 to 09-0824". I dont see any reason why its looking for false...I have been banging my head on thi...

WCSF + WCF Service in ASP.NET 3.5 Disadvantages.

I need to build a webapplication that uses WCF services as backend and ASP.NET as frontend. It has a rich UI components because it is a migration of a desktop application. Now I just read the WCSF introduction from Simon Ince's Blog, but I dont get it much deeper. I want to know the advantages and disadvantages of converting my ASP.NET-W...

WCF Service Reference creates second class

I am creating a service reference to a WCF service using VS2008 but the generated reference file has 2 classes defined representing the same object. Any ideas why this would be? See result below - THView and THView1 were generated while I'm expecting only THView. [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Comp...

NetTcpBinding with Streaming and Session

Hi! I’m trying to set up a WcfService with the use of NetTcpBinding. I use Transfer mode Streamed since I will transfer large files. I need to use Session, and I have read that NetTcpBinding supports this, but when I turn it on like: SessionMode=SessionMode.Required I get the error: System.InvalidOperationException: Contract requir...

RESTful WCF Service returns a 400 code when sending "raw" XML

I have been banging my head of the wall for two days with this so, hopefully, someone can give me a hand. What I have is a RESTful Web Service that I wrote using WCF; nothing to it really just two methods that accept a single string parameter and also return a string. Both the parameter and return value are straight XML. [ServiceContra...

WCF Service Binding taking default values instead of custom values

I have build an APi which is a WCF Service. In the web.config for the service i have specified a custom bindong looking like this: <bindings> <wsHttpBinding> <binding name="FxBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" closeTimeout="00:20:00" openTimeout="00:20:00" rece...

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...

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 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. ...

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...

Where to set up and store application state in a WCF Service Library project?

I have something I want to initialise and use throughout a WCF Service Library. If it was in an ASP.NET site I'd be doing it in the Application_Start method of the global.asax, but what's the equivalent for a WCF Service Library? ...