wcf

How to send Linq data class via WCF and bind input control with this class property?

For strongly-typed & type-safe solution, I have to do the following step. Create some Silverlight application. Binding input control to Linq data class. Validate data by using rule from attribute of data class. Send data to server via WCF. But, I have some question. How to bind input control with linq data class property? How to d...

stop the execution in wcf request

i'm trying to reply a wcf request in 'AfterReceiveRequest' method of message inspector (implements IDispatchMessageInspector) XmlReader xmlReader = XmlReader.Create( new StringReader(string.Format(@"<{0}Response xmlns='{1}' />",methodName,namespace))); Message replyMsg = Message.CreateMessage(request.Version, request.Headers.Ac...

WCF with netTcpBinding and Certificate transport security

I need to secure a WCF service that uses netTcpBinding and connects directly with a Windows Forms based application. I only need it to be secured at the transport layer. I'm pretty sure that I have it working locally, i.e. I can run the service locally, and connect to it with the client. When I try to setup the service so that it is r...

wcf: adding username to the message header is this secure?

I'm connecting to a WCF service in an ASP.NET app. I'm logging in using one username and password and passing the actual username of whoevever is logged into the ASP.NET web app in a message header as below. using (OperationContextScope scope = new OperationContextScope(myService2.InnerChannel)) { Guid myToken = Guid.NewGuid(); ...

WCF REST tutorials for POX

can anyone tell me where to find good WCF REST tutorials? using (POX) this one is ok http://msdn.microsoft.com/en-us/library/aa395208.aspx but i want to use something a little simpler i cant seem to find anything decent that uses webget/webinvoke attributes etc... i dont want to use the REST Starter kit ...

WCF Windows credentials without a domain?

Is it possible to use Windows client credentials for transport security between a windows forms-based client and self-hosted WCF service if the two machines are not in a domain together? ...

WCF -> How do you Capture caller host name in HandleError method of IErrorHandler implemenation

Hello, I've implemented IErrorHandler in a custom fault error handler on my WCF service and am trying to figure out how to capture the caller host name when credentials are not set properly. I can capture the host name correctly for other exception types when they pass through the ProvideFault method, but when you don't enter credential...

Anonymous clients connecting to WCF

This article from Microsoft details how to implement transport security with an anonymous client. http://msdn.microsoft.com/en-us/library/ms729789.aspx I'd like to know if it is possible to achieve the same goal, using netTcpBinding instead of WsHttpBinding and hosting the service as a Windows Service. ...

Web Service Security: What are the pros and cons of WSE3.0 and WCF?

I'm developing a new set of web services at my company. My manager asked me to provide a greater level of security for this, as the web services will handle sensitive informations. I've searched the net for resources about how to secure an web service and the two runner ups are WSE3.0 and WCF. But I have no idea which one is the best ...

.Net Remoting without using .Net remoting?

After some advice more than anything. I have the following example. Appication1.exe - Has object MyList Application2.exe - Needs to gain access to MyList and interfact with the object as if it was created from Application2. My question is - should I be using .Net Remoting (ie 2.0) or WCF or another technology stack? What framewor...

Exception Logging for WCF Services using ELMAH

We are using the excellent ELMAH to deal with unhandled exceptions in an ASP.NET 3.5 web application. This works extremely well for all of the site apart from WCF services which are being consumed using the REST features. When an exception occurs within the operation methods that is not handled by the application code, WCF handles it in ...

NHibernate session management in WCF application

I am building a WCF application, using NHibernate for the persistence layer. A lot of documentation thats out there is about using NHibernate with ASP.NET applications. But very little on the best ways to manage NHibernate Sessions in a WCF application. After reading up on Instance Management Techniques in WCF applications, I am going...

Determine wsHttpBinding at runtime with WCF

I have a web application that exposes web services using WCF and wsHttpBindings. It is possible to have the application on different machines and different urls. This would mean the WCF service location would be different for each. I am building a Windows Service that will reference each application and perform a task. Each task needs t...

Passing extra parameters to the EventHandler

Hi I am trying to iterate over a list of custom buttons which I have created. It makes a call to a WCF Service to get some info from the DB. foreach (LevelButton l in ls) { WayFinderDBService.WayFinderDBServiceClient client = new SilverlightNav.WayFinderDBService.WayFinderDBServiceClient(); client.GetLevelDescriptionCompleted...

Use ISAPI filter to trace and time a WCF call?

I'm building a web application using WCF that will be consumed by other applications as a service. Our app will be installed on a farm of web services and load balanced for scalability purposes. Occasionally we run into problems specific to one web server and we'd like to be able to determine from the response which web server the reques...

WCF: Adding Nonce to UsernameToken

Hi, I'm trying to connect to a web service, written in Java, but there's something I can't figure out. Using WCF and a customBinding, almost everything seems to be fine, except one part of the SOAP message, as it's missing the Nonce and Created part nodes. Obviously I'm missing something, so if you could point me into the right directi...

Error in WCF client running under IIS 5.0 with server on Windows 2008

I have a .Net 3.5 SP1 WCF service running under IIS 7 on a Windows 2008 machine. When I try to connect to this service from an IIS hosted WCF service running under IIS 5.0 (Windows XP) .Net 3.5 SP1, I get the following error: The token provider cannot get tokens for target: http://(URL for WCF service) I've built a simple console appl...

WCF naming conventions for extending methods.

I have a method exposed as an OperationContract for my WCF service that i would like to rework. The previous programmer had written something like: public ReportResultObject GetReport(string stringContainingParameters) I would like to have a method that is something more like this: public ReportResultObject GetReport(int[] someIds, ...

Supported bindings for WCF streaming transfers

Hi, I was using basicHttpBinding for streaming transfer, When I change binding to netTcpBinding , Service start to throw exception... Please help me to understand the fastest binding to transfer streams... Thanks a lot! ...

Problem with WSDL generated from Generic Service Contract in VS 2008

[Edit] I figured out a way to make it work, comments in the code. I have dozens, and will soon have hundreds of workflows with the following contract: [ServiceContract(Namespace = "http://schema.company.com/messages/")] public interface IBasicContract<TRequest, TResponse> where TRequest : class where TResponse : class { [Operatio...