wcf

FoxPro oledb driver wont allow writes accross servers (WCF)

Ok we have a WCF service running on one machine on IIS6 + server2003 r2 this service needs to write and read to/from a fox pro database that is located on another machine on the network - windows 2003 (probably r2). After playing with permissions (both on the fox pro file and impersonation in WCF) we have finally managed to read from i...

WCF method sending POST instead of GET

I'm trying to create a WCF client that accesses a REST API. The API requires that a GET be used for a certain call, so I'm using the [WebGet] attribute for the method. However when I call the method, the actual call that is produced is a POST (viewed by using Fiddler). My contract is as below: [OperationContract] [WebGet(UriTemplate = "...

Caching WCF ChannelFactories for multiple ASP.NET users

I have an enterprise system that is used by a handful of WinForms clients and a public-facing ASP.NET site. A backend WCF service provides several services to be consumed by each of these clients. The services require message credentials, which in the case of a WinForms app is supplied by the user when the program first starts. I cach...

WCF with Http Basic Authentication

I'm building a webservice that needs to be accessible to a variety of potential platforms, including a number of older ASP and ASP .NET applications. After some research, I settled on a WCF service with both a REST (webHttpBinding) and SOAP (wsHttpBinding) endpoint (that way, I can support a wide range of platforms and still make the .NE...

MessageSecurityException, UsernamePasswordValidator, and HttpWebRequest Problem

Hello everyone, is there a better way to return back the standard "Invalid username/password" message to clients that connect to a WCF service requiring credentials? I have the following code, which causes an exception when I connect to my WCF service with invalid usernames/passwords. Ideally I'd like back just a simple string, but to ...

WCF Service returning Response.Write

Hi, I have a WCF service that will be called from a HTML form located in the customer's network. When the same form is posting the exact same data to an ASP page it expects a response like: Response.Write "SUCCESS" & vbnewline How can I send the same response from my WCF service? Thanks. ...

IIS6 hosted WCF service in SSL on nonstandard port, WebInvoke vs WebGet

I have a WCF service hosted in IIS6 with a method called DoSomething that I can access like https://mysite.com:8888/mysvc.svc/DoSomething (note its using https not http..and on a nonstandard port) I have setup wildcard mapping in IIS6. If I decorate DoSomething with a WebGet Attribute in the interface, I access the service method via ...

REST Post request gives end point not found error

[OperationContract] [WebInvoke(Method="POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json, UriTemplate= "SignIn/Username/{Username}/Password/{Password}", RequestFormat= WebMessageFormat.Json)] string SignIn(string Username,string Password); My config fil...

Is there a way to enable both session and streaming in netTcpBinding?

Hi I writing a WCF Service that need transfer large files, so i using streaming, but from the other hand i need to do username specific initializations. The problem is that getting the username and perform initialization every time is very expensive. If i could turn on session, i could just save initialized data in local variables in t...

C# WCF works inside corporate firewall but not outside...

I am running into an “interesting” error with my WCF JSONP web service. It is the only one I have and it only exposes one method. If I hit my service via web browser internally it pops up with a message that, effectively, MEX is not enabled (true). If I hit it from outside our network (like you would unless you were on a machine in my...

Creating WCF objects using Activator.CreateInstance

I have a silverlight application with a service reference back to a Silverlight-Enabled WCF service. When I try to "new up" the WCF objects I get an exception about not having a constructor when I do the following. Activator.CreateInstance(type, true); However; this works: Activator.CreateInstance(type); Any idea why? ...

Isn't HttpContext.Current supposed to be null in a WCF service?

I thought HttpContext.Current is supposed to be null in a WCF service (even if aspNetCompatibilityEnabled is enabled). MSDN: HttpContext: Current is always null when accessed from within a WCF service. from http://msdn.microsoft.com/en-us/library/aa702682.aspx I have this in my web.config: <serviceHostingEnvironment aspNetCo...

wcf - disposing proxies properly

I am using wcf 4 and trying to use some Ioc container to resolve service dependencies. I was looking at Castle Windsor and StructureMap. I haven't use any of them with wcf. The scenario is that I have IService1 and Iservice2. Service1 is using service2: public class Service1 : IService1 { public Service1(IService2 service2) { ...

How to build a messaging system in .NET?

Hi, I'd like to write a program where you can have 2 clients that talk to each other in realtime. I've been looking into WCF services and Duplex messaging, data contracts etc but now I'm confused. Basically I see it as: [Client] --- msg --> [Server] --- msg --> [Client] and vica versa. The server will just act as the messenger. Coul...

WCF - Contract Name could not be found in the list of contracts

Hello, I am relatively new to WCF. However, I need to create a service that exposes data to both Silverlight and AJAX client applications. In an attempt to accomplish this, I have created the following service to serve as a proof of concept: [ServiceContract(Namespace="urn:MyCompany.MyProject.Services")] public interface IJsonService {...

Custom UserNamePasswordValidator with Silverlight 3.0

I have implemented a WCF service that uses a TransportWithMessageCredential binding and a custom UserNamePasswordValidator. I have a Silverlight 3 client connecting to this service. If I set valid credentials it works perfect, however, in the username validator I throw a SecurityTokenException if the username and password does not match...

How to find out how many concurrent connections to WCF service exists?

Hi everybody I need to determine how many users are connected to a WCF service. I am using the NetTcpBinding. Thank you. ...

How to enable WCF server side caching?

Is it possible without writing your own proxy? I have thought of using an open source proxy but it would only work with http bindings. ...

WCF list all client endpoints that implement a certain contract

Is there a way to list all the WCF client endpoints in an application config file? I need to establish multiple client connections to different servers and want to find a way to still maintain all the client connection information in the application config file. ...

SvcUtil.exe Generate multiple wsdl files

I've made a project in Visual C# 2008 Express with several interfaces with a service contract. I generate a WSDL from this using the scvutil.exe tool. All this works perfectly: I get a nice and working WSDL file. However I would like the tool to generate separate WSDL files for the different interfaces. Now it puts everything together in...