wcf

WCF Exception on Hosted Server

I have searched online for a solution, but have yet to find one that works. I have a Silverlight application that uses a WCF web service. Everything runs fine on my development environment. When I publish to my DiscountASP.NET account - the web service gives me the following exception: "Server Error in '/eLearning/Services' Applicati...

ChannelFactory Credentials + object is read only

Greetings, what is the problem that when I try to set credentials for my factory as follows: ChannelFactory<IWCFSeekService> factory = Factory; if (factory != null) { factory.Credentials.UserName.UserName = CServiceCredentials.Instance.Username; _Channel = factory.CreateChannel(); } I get an exception that object is read-only....

Way to tell if WCF service is called via HTTP or HTTPS?

Let's say you've got a WCF service that is accessible via HTTP and HTTPS, but you want only certain methods to be available with HTTPS-- how can I check if the current request is HTTPS? Since HttpContext is empty, you can't simply check HttpContext.Current.Request.IsSecureConnection -- any other ideas? Thanks in advance. ...

Multiple Base Addresses and Multiple Endpoints in WCF

I'm using two bindings TCP and HTTP. I want to give mex data on both bindings. What I want is that the mexHttpBinding only exposes the HTTP services while the mexTcpBinding exposes TCP services only. Or is this possible that I access stats service only from HTTP binding and the eventLogging service from TCP? For Example: For TCP I sho...

WCF Windows Service - Long operations/Callback to calling module

I have a Windows Service that takes the name of a bunch of files and do operations on them (zip/unzip, updating db etc). The operations can take time depending on size and number of files sent to the service. (1) The module that is sending a request to this service waits until the files are processed. I want to know if there is a way to...

Designing WCF data contracts and operations

Hi! I'm starting to design a wcf service bus that is small now but will grow as our business grow so I'm concerned about some grwoing problems and also trying not to YAGNI too much. It's a e-commerce platform. The problem is I'm having too many second thoughts about where to put stuff. I will give a scenario to demonstrate all my questi...

WebSharingAppDemo-CEProviderEndToEnd Queries peerProvider for NeedsScope before any files are batched to the server. This seems out of order!?

I'm building an application based on the WebSharingAppDemo-CEProviderEndToEnd. When I deploy the server portion on a server, the code gives the error "The path is not valid. Check the directory for the database." during the call to NeedsScope() in the CeWebSyncService.cs file. Obviously the server can't access the client's sdf but what ...

WebHttpBinding: Log all errors to service logfile

I have a self-hosted WCF service that uses a WebHttpBinding. In the implementation of the service, all exceptions are caught and a appropriate message is returned to the caller. All exceptions are also logged to the service logfile. catch (Exception ex) { _log.Error("Error posting message", ex); WebOperat...

WCF Async callback setup for polled device

I have a WCF service setup to control a USB fingerprint reader from our .Net applications. This works fine and I can ask it to enroll users and so on. The reader allows identification (it tells you that a particular user has presented their finger, as opposed to asking it to verify that a particular user's finger is present), but the de...

WCF Web Service - List<> Return type

List<CertMail> lsRecipetNumber = new List<CertMail>(); CertMail class is in data access layer which returns a List<CertMail>. I need to convert this to the object of my class and return that List<CertMailReceiptNumbers> lsReceiptNumbers = new List<CertMailReceiptNumbers>(); CertMailReceipt.lsCMRN = lsReceiptNumbers; //---- > return...

Best practices for streaming response of WCF webservice

I'm trying to pull a large amount of data out of a WCF web service. The request is fairly small and the response message will be very big. Currently the web service is throwing SystemOutOfMemory exceptions due a limitation on IIS6 for the memory it can allocated (~1.4GB). I have read in some blogs that implementing streaming will so...

Deploying WCF Services

I have a WCF visual studio project, which contains many SVC files. Can I compile each SVC file into its own dll file? my target is to be able to deploy each svc file separately without touching other services, but maybe keep them on the same website what options I have? ...

What is the WCF equivalent?

I am trying to port some code that is based on WSE3.0 to WCF. Basically, the old code has the following configuration: <microsoft.web.services3> <diagnostics> <trace enabled="true" input="InputTrace.webinfo" output="OutputTrace.webinfo" /> </diagnostics> <tokenIssuer> <statefulSecurityContextToken enabled="false"...

How to set the base path in IIS 7 hosting a WCF application?

I've been fighting my way through the process of migrating a (previously self-hosted) WCF application to IIS7 (I've never used IIS before and I realise that this is a very simplistic question but I failed to google/SO the answer so far). My service is hosted at http://xxx.xxx.xxx.xxx/SampleWebsite/Service.svc but when I access it with ?...

CustomBinding +error while connecting to WCF service

Greetings I have to following error while connecting to my WCF Service using custom binding An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail web.config looks as follows: <system.serviceModel> <bindings> <customBinding> <binding name="BindingEn...

Default encoding type for wsHttp binding

My understanding was that the default encoding for wsHttp binding is text. However, when I use Fiddler to see the SOAP message, a part of it looks like this: <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecu...

wcf multiple end point address on Dev and Prodcution server how to ?

hi after digging for a while i have decided to go with WCF service and i really love the idea of multiple end points, this will let me serve different type of service protocols with one service. now my question is how i can make for example a service address like this http://www.mysite/services/blog/RSS/gettopposts http://www.mysite...

WCF Web Service Response XML file.

I am using a data contract in WCF, but there is some unwanted response tags being sent in the xml file, I am not sure how to modify the data contract class so that I can avoid sending that unwanted response field. In the below XML file, all the text which is bolded and italics is unwanted. Thanks. <GetCertMailReceiptNumbersResponse xm...

WCF DataContract serialization with Collections

Hi, I have a simple DataContract class that contains an array of another DataContract class. When it's serialized, the resulting XML contains the array, but every tag first starts with "a:" (example: <a:name>test</a:name>). Is there a way to tell the serializer to ommit those? Thanks! ...

WCF Certificates without Certificate Store

My team is developing a number of WPF plug-ins for a 3rd party thick client application. The WPF plug-ins use WCF to consume web services published by a number of TIBCO services. The thick client application maintains a separate central data store and uses a proprietary API to access the data store. The thick client and WPF plug-ins are ...