wcf

WCF Service Binding using allowInsecureTransport=true causes Update Service Reference in Client to fail

This is my service configuration in web.config: <binding name="statefulSessionWithUsernameOverTransport"> <security authenticationMode="SecureConversation" requireSecurityContextCancellation="False" allowInsecureTransport="True"> <secureConversationBootstrap authenticationMode="UserNameOverTransport"/> </security> <binaryM...

WCF Data Contracts DTO

In my application I am making a service call and getting back populated WCF Data Contract object. I have to display this data in a grid. Is it good practice to bind the data contract to the grid ? Josh ...

WebDav troubles for restfull WCF web service

Hi all, I created a WCF restfull service in .NET 4 and I published it under IIS 7.5/windows 7 x86. The verbs GET and POST worked fine, but the DELETE and PUT gave an error: Error: The remote server returned an error: (405) Method Not Allowed. After googling (a lot), I've found out that the problem is caused by WebDav module which ...

WCF OnNewSession?

Im having a self-hosted WCF service in a WPF-app with a textbox for logging activity on the host. First I used a Singleton-model, created my service-instance and attached a handler to a custom Message-event on my service-class so that activity on the service is logged to my textbox. But now I need to use the PerSession-model so Im usin...

Asynchronous Communication Between Two Applications

I'm writing a simple little game for my kids - it doesn't really matter what it does, though I couldn't tell you anyway, since I/they haven't quite decided yet! However, I think it will have a server component and a number of client components, and I'm looking at ways that the clients can communicate with the server. ALL my previous ex...

set Response to client from SOAP Envelope

Hi, I have a WCF client with a custom behavior that intercepts the SOAP request. In BeforeSendRequest in the client I get the SOAP request and pass it to another WS as parameter. The other WS posts the SOAP envelope to the real service that client wants to invoke and returns the SOAP Response back to client. So in BeforeSendRequest the ...

WCF maxBytesPerRead limit to 4096

I am using basic WCF web service in steaming mode to download files from server. I have specified binding on server side as <basicHttpBinding> <binding name="DBUpdateServiceBinding" closeTimeout="23:59:59" openTimeout="23:59:59" receiveTimeout="23:59:59" sendTimeout="23:59:59" maxReceivedMessageSize="...

wcf returning a list from wcf sservice

How is it possible to return some kind of list from a WCF service, this the method in my WCF service. My interface: [OperationContract] [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "Locations")] IList<Location> GetLocations(); public IList<Location> GetLoc...

WCF: XmlNode as a parameter in method (or property in contract)

At this moment I try to move from ASP.NET WEb Services to WCF (using basicHttpBinding). In asmx services I used XML node as a parameter in my methods, but now it is a problem. I get DataContract Serializer Exception - xmlnode can't be serialized when I try to provide XMLNode parameter in DataContract. Is there any way to use XML node as ...

Is there a way to change EntityKey and ExtensionData access to protected when using Linq-to-entities and WCF?

I have been looking at using Linq to entities with WCF for some projects that we are doing. Everything so far has worked out great but there is one thing that I am not so sure about. Linq-to-entities is creating objects which have EntityKey and ExtensionData properties. I am happy about their access in the service but concerned about the...

WCF Service - Custom Principal

In the constructor of my WCF service class I am setting the current principal to be that of the principal passed in the header of the message: Thread.CurrentPrincipal = OperationContext.Current.IncomingMessageHeaders.GetHeader<BBPrincipal>("bbPrincipal", "ns"); This seems to work fine, however when I come to reference the principal in...

ASP.NET - Security Vulnerability (Cryptographic Oracles) and web services

Just reading about this ASP.NET security vurnerability. Just wondering if this could be used to attack a WCF service hosted under IIS to get to its web.config or if its a pure ASP.NET vurnerability ...

Create MS-Word 2003 in WCF Error???

I built WCF solution about reporting by using MS-Word 2003 API(Microsoft.Office.Interop.Word) but I got this error : 2010-09-17 16:31:39,218 [21] ERROR ERROR [(null)] - Error : Generate 0900000a80395799 System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) at Sys...

Wrong URL in WSDL hyperlink when using WCF (https)

I got my WCF Service running with HTTPS, It shows the Infopage, but the URL below "To test this service, ... with the following syntax:" is: svcutil.exe https://servername.group.service.com/MyService.svc?wsdl (full address of the server) Instead of the correct URL https://my.service.com/MyService.svc?wsdl (assigned hostheader), how can...

authentication in wcf Rest

I have one solution and it is made of two kind of project one is asp.net and it's using .net membership for authenticate the users another project is WCF REST (Odata) , how I can authenticate the user in wcf project? ...

WCF Windows Service not releasing resources/memory after every call.

I have created WCF application which is running on Windows Service. It was installed using Windows Installer. I have followed procedure mentioned in following article for same. http://msdn.microsoft.com/en-us/library/bb332338.aspx#msdnwcfhc_topic4 Most WCF properties are kept as default for net.tcp protocol, per call instance and so on...

json in java getting the correct values from a list

I am using the package org.json package: I need help with getting the corect data from the json in java. this is the string I have in json: {"GetLocationsResult":[{"ID":82,"Name":"Malmo","isCity":true,"isCounty":false,"isDisctrict":false,"ID_Parent":null,"ID_Map":35,"ZipCode":"7000"},{"ID":82,"Name":"Trelleborg","isCity":true,"isCounty"...

WCF client and server timeouts

Hi I want to know about timeouts and how it is applicable in client/server side. Regards Raju ...

WCF: Serialization? Streaming?

Hi guys, I need to understand how does WCF works when sending a message. Does WCF serialize everything before sending it? My other question is which will be the benefit of using Streaming? Is it better for bigger messages, lets say between 1Mb to 2Mb? Can I send a complex object serialized, and then be able to deserialize it in the oth...

How do I Unit Test NServiceBus.Configure.WithWeb()?

I'm building a WCF service that receives requests on an external IP and translates them into messages that are sent via NServiceBus. One of my unit tests invokes Global.Application_Start(), which performs the configuration of the application, and then attempts to resolve the web service to validate that the container can build up all of...