wcf

WCF client proxy class renaming problem

Perhaps others have encountered the same problem. It seems the default class name for a WCF client proxy is Service1Client. When I delete the service reference and recreate it the name keeps coming up the same. (Although it does give me the opportunity to name the namespace.) When I chose Refactor/Rename on Service1Client (ie: the cl...

Authenticating a user via wcf

I have a java app with a .net application running in the java applications embedded browser. I want the java application to call a .net WCF or web service with a username and password. The wcf will set the user to authorized in forms authentication. In the java desktop application I will then load a .aspx page that was protected via f...

Silverlight WCF works with BasicHttpBinding, "HTTP 415 Unsupported Media Type" exception when using CustomBinding/BinaryMessageEncoding

I have a silverlight app that talks to a WCF service inside of an ASP.NET website. The following code works: var service = new ChannelFactory<IService>(new BasicHttpBinding() { MaxReceivedMe...

WCF WinService with Plugins

I have a win32 application that uses client side plugins and uses a Win32 Service via TCP/IP. I would like to also dynamically load assemblies on the WCF service based on the addition of new plugins. Currently I have to add the the ServiceContract and OperationContract to the Services class and IService interface and then re-compile. Is ...

Unit Testing WCF Authentication and ServiceContext

Hi guys, I have some methods that has RequireAuthentication and RequiresRole attribute and some methods that require authenticated user's identity (Which i will get from ServiceContext.User.Identity). How can I unit test these kind of methods? Thanks. ...

Streaming over WCF using NetTcpBinding

I can successfully use WCF streaming to xfer data from a server to client on the same machine. However as soon as I deploy my server to another machine, I get errors of the nature "A call to SSPI failed: The target principal name is incorrect". Has anyone come across this. I tried to set SecurotyMode.None on both sides but that gave m...

Using a shared cache in a Web farm environment for detecting replay attacks in WCF

Hello, I'm trying to figure out how to implement a replay attack detection mechanism with WCF in a web farm scenario. WCF provides such detection mechanism by using a nonce cache. Correct me if I'm wrong, but the only way to ensure to prevent this attack in a message security and web farm scenario is by using a nonce cache shared acros...

WCF Services - Create multiple instances on startup?

Apologies if this has been asked before, but I've searched and can't find an answer We have a WCF service that provides upto 100 instances - as there are 10,000 clients but the calls are very quick. The only performance overhead we've noticed is on the first call to an instance...e.g. the first time any of the instances is called (or a...

Using IErrorHandler and TCP Message Security causes a timeout

I have a WCF service with a custom IServiceBehavior attached used to return a specific fault on the client side. When I enable this code with TCP Message Security I receive a service timeout. Below you can see the full client and server code to reproduce the error. Server code: using System; using System.Collections.Generic; using Sy...

Does WCF execute the operations in a Singleton WCF service in the same thread?

I've service which is marked with the ServiceBehavior attribute [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)] Is there any chance for the operations in this service to be executed by same thread? I'm storing an important data in ThreadLocal variable, which is to be us...

Can i call a wcf service without knowing the port and not using discovery?

Can i call a wcf service without knowing the port and not using discovery? ...

Why is it more secure to prohibit the DTD when consuming web services with things like .Net WCF?

In the documentation for securely consuming web services with WCF they state that it is recommended that you prohibit the DTD when consuming the metadata. Why is the DTD a security risk? http://msdn.microsoft.com/en-us/library/ms734741.aspx ...

Oracle Instant Client with web application

I have a visual studio solution with an ASP.NET 3.5 web application (WCF host) and a test project. I wanted to use the Oracle Instant Client (v11, via NHibernate) to create Oracle connections without having the Oracle client tools installed on every "involved" machine (dev, CI server, test server, production server). The weird thing is ...

Socket connection was aborted - WCF

Hi everyone. I have a simple client server apps that uses WCF (netTcpBinding) when i'm launching the server and sending messages through the client everythings works fine , but when i'm closing the server manually and open it again (without closing the client app at all) the next time the client tries to send a message to the server i ge...

WCF invalidoperationexception

Hi to all. I encounter this strange problem while using wcf services along with L2SQL DAL. The server is hosted at the localhost and contains an implementation of the correspondent interface. The client is familiar with the interface and occasionally queries the database via the exposed service using tcp transport. When client runs loca...

Can I use SVCUTIL to create a Web Service reference for .NET 2.0 (i.e. NOT for a WCF Client)

Hi We have a WCF service exposing a basicHTTPBinding endpoint but need to consume it from a .NET 2.0 application. We have the WSDL files available. Can I use SVCUTIL to generate a web service reference compatable with .NET 2.0? Thanks ...

Exception using wsHttpBinding based WCF service when SignedXml used to verify Certificates

Hello, We are trying to authenticate the WCF request using Digital Certificate. This WCF service is actually a built through Biztalk WCF Adapter and hosted in IIS with wsHttpBinding. We are trying to implement message security and one of the feature requirement is to use certificates to authenticate. We are using SignedXml to check th...

Java equivalent to WCF Data Services

Is there anything in Java that's the equivalent of WCF Data Services ? Does Spring have the capabilities to expose databases as a RESTful web service like WCF Data Services ? Thanks ! ...

WCF service does not recognize my own data type

I am experimenting with creating a proof of concept upload WCF service. I have found the following partly in blog posts around the net: namespace GreenWebMediaService { [ServiceContract] public interface IMediaServer { [OperationContract] void UploadData(UploadFile data); } // Use a data contra...

Impersonation in WCF Service and propagating to COM object

I'm trying to create a WCF service to expose a some services. In one of contracts I have to impersonate to another user and call a COM object. I know that if I want to propagate impersonation into COM object I should call CoInitializaSecurity before any marshaling. int result = CoInitializeSecurity(IntPtr.Zero, -1, IntPtr.Zero, IntPtr....