wcf

Restricting WCF configuration in code

We would like to keep the WCF in the configuration file. At the same time we would like the code to refuse a request if the data will be sent over the net unencrypted. Something like: if the request is basichttpbinding without https, throw exception. Is there any way for the service code to know how it is being called? EDIT From the ...

WCF ServiceModelReg.exe erased system.serviceModel section in machine.config

The problem (after much head scratching) is fixed now, so I'm just trying to understand what went wrong with my WCF settings. I just had a problem where I ran ServiceModelReg.exe to fix some .svc handler mappings in IIS7 and started getting HTTP 500 errors and event log entries like this: WebHost failed to process a request. Sender Info...

Self-hosted WCF REST service and Basic authentication

I've created a self-hosted WCF REST service (with some extra's from WCF REST Starter Kit Preview 2). This is all working fine. I'm now trying to add Basic authentication to the service. But I'm hitting some rather large roadblocks in the WCF stack which is preventing me from doing this. It appears that the HttpListener (which self-host...

WCF service with ConcurrencyMode.Multiple and InstanceContextMode.Single behavior and multithreading safety

I have a service configured with following attributes [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.Single)] public class UserService : IUserServiceContract {} Should I use in this scenario locking mechanism for methods implemented in the service? If yes, is this the proper im...

WCF to Entity Framework converts my datetime into local time - how to stop?

Hi there, I've got a WCF service which receives records with datetime values, and saves them to an Azure SQL db, using Entity Framework 3.5, SP1. Running it locally, the records get saved to the database, all is well However, my IIS hosting is in a different timezone. When I upload the site to there and call the same service (with the ...

wcf Service could not be activated

It's a .svc IIS hosted service with ssl and membership. My wcf client reports: System.ServiceModel.ServiceActivationException was unhandled Message="The requested service, 'https://www.greenjump.nl/WebServices/OrderService.svc' could not be activated. See the server's diagnostic trace logs for more information." Source="mscorlib" ...

Is is possible to inspect the actual XML data before it is encrypted with wsHttpBinding?

I have created a WCF proxy (with svcutil) that sends data to the server with wsHttpBinding. Is is possible to show the XML before it is encrypted to see the actual data/values? ...

Needing guidelines about the use of Windows Communication Foundations (WCF)

Hello: I need to know if Windows Communication Foundations (WCF) can completely and easly help to solve the next scenario: I need a server program which constantly receives events that, according to the content of the signal, helps to trigger one or many processes; this server program will run as a Windows Service. These events will b...

Better to serialize NHibernate DetachedCriteria or LINQ-to-NHibernate expressions over WCF?

What I'd like to do: 1. Create an arbitrary LINQ query based on user-selected criteria that will 2. Query against a proxy collection (facade) that 3. Converts the query to NHibernate DetachedCriteria and serializes OR just serializes the LINQ expression and then 4. Sends the serialized query to the server via WCF, where 5. The service im...

WCF Service browser.

Hi, What is the best way to achieve something like the SQL Server Browser but for WCF services running on the local network? I don't necessarily want to be able to browse for any and all WCF services, but rather for a service which has been coded to be browse-able. ...

Using Http Pipelining for Rest on IIS

Given a workflow that I support, there is a high chance that there would be at least a hundred consecutive calls to the same resource done in rapid succession. I started looking into batching calls for Rest and ran into people suggesting Http Pipelining as the solution. My understanding is that the client will be able to make dozens of r...

WCF Authenticating clients within multiple services

Hi there, I have multiple NET.TCP services that provide access to my apps bussiness logic layer. I want to authenticate clients with username & password, within all the services, from one dedicated authentication service. I have thinked that I can generate a custom authentication ticket when the authentication service logons the user ...

Does WCF supports Peer-to-peer implementation?

I'm trying to implement peer-to-peer messaging and file sharing utility within LAN, So does WCF supports p2p? Does any one tried file sharing trough WCF? ...

WCF Service 405 Method Not Allowed Exception

I'm writing a WCF service in Visual Studio 2008 to be hosted on a Windows 2008 Standard server. I've created a new Web Site in IIS7 with its own application targeted to ASP.NET 2.0. I added .NET 3.0 Framework features to the server role. I've already gone through all of the steps involving *.svc extensions and the aspnet_isapi module. I...

Multiple DataContract Callbackcontract

Greetings, in our company we are developing wcf service. This is used as a server and it works quite well. Hover there is a wish from customer that after they login to application they would like to see which users are logged in too. I read about CallbackContract (based on some wcf chat application). How can we achive this goal? ...

The simplest way to check if host is online (listening on a port) in C#

What's the simplest way to check if anything is listening on net.tcp://localhost:8801/ Preferably using WCF ...

How to set the ASP.NET SessionState read-write LOCK time-out?

I have a WCF web service that uses ASP.NET session state. WCF sets a read-write lock on the session for every request. What this means is that my web service can only process one request at a time per user, which hurts perceived performance of our AJAX application. So I'm trying to find a way to get around this limitation. Using a re...

Why can't I get my Azure, WCF, REST, SSL project working? What am I doing wrong?

I'm trying to get SSL, WCF and REST under Azure, but the page won't even load. Here are the steps I followed: 1) I mapped the www.mydomain.com CNAME to my azuresite.cloudapp.net 2) I procured an SSL certificate for www.mydomain.com and properly installed it at my azuresite.cloudapp.net hosted service project 3) I deployed my WCF REST...

(401) Unauthorized error : WCF security/binding

I have a WCF web service, and a client both on the same machine. Accessing the WCF web service directly using the browser works, but the client can't connect; error message below. Any ideas? Integrated Windows Auth in IIS is used for both client and server. The remote server returned an error: (401) Unauthorized. Description: An unhan...

WCF - How to configure netTcpBinding for NTLM authentication?

I know how to configure basicHttpBinding for NTLM authentication, but can't figure out a way to do the same for netTcpBinding. Does netTcpBinding support NTLM? If so, how to force WCF service to use NTLM? BTW a well known method using identity element for some reason didn't work at all. I am looking for something like this - clientC...