wcf

wcf callback exception after updating to .net 4.0

I have a wcf service that uses callbacks with DualHttpBindings. The service pushes back a datatable of search results the client (for a long running search) as it finds them. This worked fine in .Net 3.5. Since I updated to .Net 4.0, it bombs out with a System.Runtime.FatalException that actually kills the IIS worker process. I have no...

POSTing multipart/form-data to a WCF REST service: the action changes

I have a WCF Rest service: [WebHelp(Comment = "Sample description for GetData")] [WebInvoke(Method="POST", UriTemplate = "invoke", BodyStyle =WebMessageBodyStyle.Bare)] [OperationContract] public string GetData( Stream input) { long incomingLength = WebOperationContext.Current.IncomingRequest.ContentLength;...

ASP.Net sites - shared WCF services

I have several web sites that share common functionality - for example, address verification. Is it common practice to have a central location where this address verification service resides and is references by all of my sites? - as opposed to having the same service on multiple sites. Are there any downsides to having the service at a...

Different types of Id when exposing DTO over WCF

Lets say we have a simple DTO with properties Id, Name. If this DTO comes from database through some data layer, Id should be of type int. If this DTO comes from Active Directory, through some data layer, Id should be of type Guid. What would be the best way to implement this? Thanks in advance! ...

POSTing JSON data to WCF REST

I'm trying to send data from a client application using jQuery to a REST WCF service based on the WCF REST starter kit. Here's what I have so far. Service Definition: [WebHelp(Comment = "Save PropertyValues to the database")] [WebInvoke(Method = "POST", UriTemplate = "PropertyValues_Save", BodyStyle = WebMessageBody...

Stumped by "The remote server returned an error: (403) Forbidden" with WCF Service in https

I have a WCF Service that I have boiled down to next to nothing because of this error. It is driving me up the wall. Here's what I have now. A very simple WCF service with one method that returns a string with the value, "test". A very simple Web app that uses the service and puts the value of the string into a label. A web server r...

WCF Hosting and SQL Server database

Is there anywhere I can host my WCF service and SQL Server database for free? ...

How to use Client Application Services with WCF?

Howdy, I followed these two tutorial to get Client Application services working using WCF instead of the traditional web services project: http://msdn.microsoft.com/en-us/library/bb398990.aspx http://msdn.microsoft.com/en-us/library/bb546195.aspx But when configuring the winforms project services tab with the wcf services location, ...

Visual Studio 2010 randomly unable to debug WCF service.

I'm running Visual Studio 2010 on a Windows 7 x64 machine, and occasionally VS is giving me the good old "The remote procedure could not be debugged.This usually indicates that debugging has not been enabled on the server" error that a lot of people ask about. My problem, though, is that it seems to only do this randomly(it can be anywh...

How to make my running .NET application be able to receive commands while it is running?

How can I make my already running C# Windows Form Application be able to receive commands from the command line while it is already running? For example: if my application is playing a video now then I want to be able to type on the command line "MyApp /stop" so that while the application is still running it stops the playing the video ...

Get generic type object (e.g. MyObject<T>) from remote machine

I have two applications that are communicating through WCF. On the server the following object exists: public class MyObject<T> { ... public Entry<T> GetValue() } Where Entry<T> is another object with T Data as a public property. T could be any number of types (string, double, etc) On the client I have ClientObject<T> that ...

WCF Authentication & Authorization using Windows Identity Foundation

Hello, I am working on a asp.net mvc application and a WCF service which will be accessed by the mvc app. I am using WIF based STS website to do authentication and authorization on mvc app. Now I want to achieve the same thing on each method of web service. I am thinking whether I can pass the claims info I have in MVC App to the WCF t...

WCF (REST) multiple host headers with one endpoint

I have an issue with a WCF REST service (.NET 4) which has multiple host headers, but one end point. The host headers are for example: xxx.yyy.net xxx.yyy.com Both host headers are configured in IIS over HTTPS and redirect to the same WCF service endpoint. I have an Error Handling behavior which logs some extra information in case of a...

Is Transport security a bad practice for the WCF service over the Internet?

I have a WCF service accessible over the Internet. It has wsHttpBinding binding and message security mode with username credentials to authenticate clients. The msdn says that we should use message security for the Internet scenarios, because it provides end-to-end security instead of point-to-point security as Transport security has. W...

How to work with POST/GET request variables (eg arrays) in C# WCF webhttpbinding?

How to work with POST/GET request variables (eg arrays) in C# WCF webhttpbinding? Tutorials, articles with code samples wanted, specialy for arrays. ...

Is it possible to create sessions (like php sessions) with C# WCF WebHttpBinding?

Is it possible to create sessions with C# WCF WebHttpBinding? (Something like like php sessions with cookies and so on) ...

Is there any tutorial on using C# WCF webhttpBinding on connecting to HTTPs from http and passing data over https?

What I need is wcf (webhttpbinding) service to log in into https from http and example of wcf service working over https So is there any tutorial on using C# WCF webhttpBinding on connecting to HTTPs from http and passing data over https? Any tutorials, blog articleswill be apreciated. ...

on wcf type is not expected even though its on ServiceKnownType(typeof(...))

i am using third party classes in my service, so i cant edit them. third party [Serializable] Class B : E [Serialazable] Class E : A service [ServiceKnownType(typeof(B))] [ServiceKnownType(typeof(E))] fun(A pic) client for some reason : proxy.fun(object) throw an exception that B is unexpected and add it to ...

WCF Method is returning xml fragment but no xml UTF-8 header

My method does not return the header, just the root element xml. internal Message CreateReturnMessage(string output, string contentType) { // create dictionaryReader for the Message byte[] resultBytes = Encoding.UTF8.GetBytes(output); XmlDictionaryReader xdr = XmlDictionaryRea...

Access external data from Silverlight application running in a webpart in Sharepoint 2010

I can read the SP lists fine and pull data out of the SP context, but I am trying to get data from an external database as well and I don't know exactly how to do that. Is is possible to add WCF communication to the webpart that will allow the Silverlight app to communicate to a WCF service? If so, any examples on how to do this? Or is ...