wcf

Restful WCF Data Service to up- and download large files?

Hi, I'm thinking about to write a restful service which is able to upload and stream large video files (GB) (in future it might not only be videos and could also be large documents. I researched so far and what really makes sense to me could be to use off: WCF Data Services and Implement IDataServiceStreamProvider and on the back-end ...

.NET Webservice Client: Auto-retry upon call failure

Hi, We have a .NET client calling a Java webservice using SSL. Sometimes the call fails due to poor connectivity (the .NET Client is a UI that is used from the weirdest locations). We would like to implement an automatic retry mechanism that will automatically retry a failed call X times before giving up. This should be done solely with...

WCF web service Data Members defaulting to null

I am new to WCF and created a simple REST service to accept an order object (series of strings from XML file), insert that data into a database, and then return an order object that contains the results. To test the service I created a small web project and send over a stream created from an xml doc. The problem is that even though all...

wcf configuration for this code

I have the following code and would like to convert a lot of code into configuration settings for WCF. As you can see, the code is using wshttpbinding. I appreciate any help on this. try { // Provides a unique network address that a client uses to communicate with a service endpoint. Endpoin...

Custom Types in WCF Rest

I am using the Rest Singleton WCF Service temple from the Rest Starter Kit. The temples uses sample item as its sample Item. i am attempting to replace that sample ITem with a custom type from web reference in my ASP.Net project .dll. The types and name spaces are found and i can replace the sample item in the code. when i run the ap...

Cannot use WCF service from windows mobile 5: no endpoint found.

Hi All, I'm trying to figure out how to call a WCF service from a windows smart phone. I have a very simple smartphone console app, which does nothing but launch and make 1 call to the service. The service simply returns a string. I am able to instantiate the proxy class but when i call the method it throws an exception: There wa...

Distinguish between clientaccesspolicy.xml failure and untrusted cert in Silverlight

Does anyone know of a clever way to distinguish between an error communicating with a server due to a missing or invalid clientaccesspolicy.xml file vs. a server presenting an untrusted or self-signed certificate? This is a Silverlight 3 application talking to a self-hosted WCF service on a server. Currently both cases are returning the...

Deploying WCF Tutorial App on IIS7: "The type could not be found"

Hello, I've been trying to follow this tutorial for deploying a WCF sample to IIS . I can't get it to work. This is a hosted site, but I do have IIS Manager access to the server. However, in step 2 of the tutorial, I can't "create a new IIS application that is physically located in this application directory". I can't seem to find a men...

WCF Transaction Scope SQL insert table lock

Hi All, I have two services talking to two different Data-stores (i.e SQL). I am using transactionscope: eg: using(TransactionScope scope = new TransactionScope()) { service1.InsertUser(user);//Insert to SQL Service 1 table User service2.SavePayment(payment);//Save payment SQL Service 2 table payment scope.Complete(); } ...

How do I know what the storeName of a certificate?

I have a certificate installed in windows server 2003 The path I can see from MMC is: Certificates(Local Computer)/Personal/Certificates I want to configure it in my wcf config. How do I know what the storeName is? This is what I get so far in my wcf config <serviceCertificate findValue="certificate.example.com" storeLocation="LocalM...

Why would Basic Auth not work with my WCF client to Java SOAP Web Service?

I have a Java based web service that requires basic authentication to communicate with it. If I type the WSDL url into my browser I'm prompted for Basic Auth. Which I can get by entering the correct credentials. However using my WCF client doesn't work. I construct my WCF client like this: var binding = new BasicHttpBinding { MaxR...

Visual Studio Wcf Test Client - entering an Int array

Hi, I've found the Visual Studio WCF test client quite useful when it comes to a quick test of my WCF service. This is the test client found in this location relative to your Visual Studio install directory: \Common7\IDE\WcfTestClient.exe I have a few service calls that require a parameter of type System.Int32[] I can't seem to fi...

Interoperability when returning derived class by base class in WCF

I have some simple code: [DataContract] [KnownType(typeof(SpecialEvent))] public class Event { //data } [DataContract] public class SpecialEvent : Event { //data } [ServiceContract] public interface IService { [OperationContract] List<Event> GetEvents(); } [Service...

JSONPBehaviour and multiple formats from WCF service.

Hi, I have a WCF service which I would like to product XML and JSON depending on the URI template. So in my service contract I have methods like the following [ServiceContract] public interface MultiFormatContract { [OperationContract] [WebGet(UriTemplate="/json/data", ResponseFormat = WebMessageFormat.Json)] [JSONPBehavior(callb...

Application Logic and Smart Client Application

we are designing a application with WPF/WCF... where we had lot of business leaked into the client code so inorder to avoid and make it clear we want to use the Domain Driven design . But where exactly my domain model will Sit .. in Server or client. Note :To explain more about architecture we have WPF with MVVM we are bin...

WCF Callback Contract Fiddler Debugging

I'm trying to debug a WCF self-hosted service utilizing callbacks. Every 1/2 I make a callback to a SL3 app to display the latest changes (yes, there are tons of changes every 1/2 second). There are 3 services, one has new data every 1/2 second, one has new data every second, and another has new data every hour. I've set all of my tim...

Can a stateless WCF service benefit from built-in database connection pooling?

I understand that a typical .NET application that accesses a(n SQL Server) database doesn't have to do anything in particular in order to benefit from the connection pooling. Even if an application repeatedly opens and closes database connections, they do get pooled by the framework (assuming that things such as credentials do not change...

String Length Evaluating Incorrectly

My coworker and I are debugging an issue in a WCF service he's working on where a string's length isn't being evaluated correctly. He is running this method to unit test a method in his WCF service: // Unit test method public void RemoveAppGroupTest() { string addGroup = "TestGroup"; string status = string.Empty; string mess...

Add a WCF Web Service Without Updating Web.config

I am attempting to add a WCF web service to my project and each time I add a new web service it adds a new Service Behavior, new Service configuration, and changes the formatting of my web.config. Is it possible to add a new WCF Web service (.svc extension) to my project without it changing my web.config file? I am willing to add the in...

WCF: Use a Message Contract to make a Soap Header

I need to add a soap header to my web service. I plan to use this to validate my clients (Windows Mobile Devices). I found this link: http://www.c-sharpcorner.com/UploadFile/rog_21/soapheaders05172007120046PM/soapheaders.aspx Which is exactly what I want to do. But it is not written for WCF. I have done some research and I seem to...