wcf

WCF Service Start

I have a wcf service and i want to call a method automatically , immediately after the publishing in IIS. Like an initialization of the WCF service without having to call the method manually or from somewhere else. Where should i place my Initialize method in WCF Service in order to run exactly after the start of the application? ...

Compressing data coming out of WCF

I would like to compress the data coming out of WCF on a basicHttpBinding. I am trying to produce a new version of a system originally written as SOAP web services. In that we returned a GZipStream when we received a request. Is there any way to do the same with WCF? I am using VS2010, currently against .Net 3.5 but that's flexible. ...

WCF -- KnownType vs Sharing Class Types Between Client and Server

Hi, I have an a client that executes some sql and gets the results in the form of a DataSet. This DataSet gets put into an object called "ExecutionResults" where a property called "Data" of type Object holds this DataSet. I wish to send this "ExecutionResults" object across the wire by calling a WCF web service method "SavePackageExecu...

consuming wcf in .net 2.0 winform

How can we consume WCF service in .Net 2.0 Winform. Please note that we don't have IIS on the client. an example or a sample would be great. ...

Issue adding service reference for wcf

Warning 1 Custom tool warning: Cannot import wsdl:binding Detail: The given key was not present in the dictionary. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://wrapper.dao.ccarwebservice.ids.com']/wsdl:binding[@name='CCaRWebServiceHttpBinding'] C:\Users\me\Documents\Visual Studio 2008 \Projects\CcarsWcfTest\CcarsWc...

Need help with deploying web service and web site

Hi everyone, There is web site that is consuming wcf service and it's been working good for some time. I changed one ws method, by adding to it one parameter. Prior to copying files to destination, i built projects, published them locally, removed config files so they don't interfere with existing files, stopped services, copied files...

Why would I use WCF instead of MVC when building a RESTful api?

Possible Duplicate: Which to choose: ASP.NET MVC or RESTful WCF? I'm trying to figure out when I would ever want to use WCF to build restful services instead of something much less complex like ASP.Net MVC? With MVC I can easily control the urls and the output. With WCF there's an increadible amount of know-how and complexity ...

How can I sign someone out using forms authentication and wcf

I have an asp.net aspx page that I log the user in using forms authentication. Later on I want to log the user out using a call to a wcf service that I created. The wcf service will call formsauthentication.logout... I try this but it doesn't seem to work.. ...

Communicate with a REST service inside a REST service

Hi, i use the following code to communicate with a REST service: [ServiceContract()] interface ISomeService { [OperationContract()] [WebGet()] bool DoSomething(); } WebHttpBinding binding = new WebHttpBinding(); ChannelFactory<ISomeService> channelFactory = new ChannelFactory<ISomeService>(binding, "http://localhost:12000"...

Using WCF with wsHttpBinding with Web Forms vs MVC

I have used WCF in the past with my Webforms so my solution was MyWebformApp = WCF(Model+business) + Web Forms So when I want to work with the MVC for presentation arch. How do u use WCF with ASP.net MVC ? Are your data contracts a part of the model ? How do you register the datacontracts as properties? ...

How can I implement a custom QueryStringConverter for RESTful WCF?

I've implemented a customized QueryStringConverter class and hooked it up using a customized WebHttpBehavior subclass. When I make a service call, it hits my breakpoint in the CanConvert override (and I return true for this parameter), but it never calls my ConvertStringToValue override, and ends up just passing null to the service call....

WCF Webservice for sending and receiving larget byte []'s

I've read numerous posts about this and have received conflicting info - I'm trying to 'boil down' a number of questions others have asked in hopes a good clear answer can exist somewhere on the web :-) I am writing .NET application for my PC that connects to an IIS webserver running ASP.NET. The webserver has two methods similar to...

Can I use an object in UriTemplate?

I tried the following code: [OperationContract] [WebInvoke(UriTemplate="/Users/Register/{user}")] void Register(User user); But when I Try to run this, it tells me the UriTemplate must only contain strings. What if I need to pass in an object to my method as in this case, a User object to my Register method. If I change the WebIn...

Can WCF self hosted applications create ServiceHosts automatically using the app.config?

When I create a self hosted wcf application, I create ServiceHost objects for each service I want to expose. It then looks in the app.config (matching up the server name), and then pulls the associated endpoint address and contract. Is there a way to automatically create ServiceHosts for every service that is listed in the app.config. I...

WCF exception received on closing connection with callbacks in use

Hey there all, I am using a netNamedPipeBinding to perform inter-process WCF communication from a windows app to a windows service. Now my app is running well in all other accounts (after fighting off my fair share of WCF exceptions as anybody who has worked with WCF would know..) but this error is one that is proving to be quite resil...

Make WCF uploading/downloading faster

My WCF server exposes database access remotely and ensures authentication. Typically, users download and upload large documents. The remote connection turns out to be quite slow. Are there any tips and tricks for optimizing the service to handle those types of communication effectively? ...

when WCF method returns XmlElement , the client sees XElement returned?

i return an xmlElement from a WCf method. when i do a service reference in the client, the same method is returning XElement instead of XmlElement. i tried everything: updating the service reference, making a new service reference, but it doesn't help. This is my client: ServiceReference1.BasicServiceClient basicWCfClient = new Servic...

Supporting Multiple Data Formats in WCF

Hello, I have two dumb/rookie questions. My problem is, I have NO idea where to begin learning this stuff. Traditionally, I am an ASP.NET developer. I am familiar with creating and consuming traditional web services (.asmx) in ASP.NET. Now, I want to create some REST based services that adhere to the HTTP verbs approach. I intend to u...

WCF in Console to Android with username and password

Hi, After reading and trying and reading, I hope somebody might help. I want to make an application that runs in an console (Click and it starts without complicated configuration) . Then an android client connects to the WCF service on the console, enters his username and password, and has access to the service. (only intranet) It soun...

When Creating a WCF serivce

I have already a MVC-webapplication, I wounder should I create a new WCF Service Appication or should I insert a serivce in same webapp udner the folder "Model"? What is the best solution? ...