wcf

Another - HTTP request is unauthorized error

Whenever I try to consume my web service through WCF, I receive this error: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLMnProviders'. I know I have Kerberos setup correctly for this environment (it's calling SharePoint 3.0 services...

ServiceHost's conflict on address when unit tested

I have a small WCF hosting engine that I am writing that will dynamically create ServiceHosts based on the .config file. The general idea is to allow us to remove existing services, as well as add new services, at runtime without having to bring all of our services offline. I ran into a problem unit testing that indicates this may not b...

Does requiring POST plus custom Content-Type prevent CSRF?

My team is building a site that uses AJAX calls to WCF services for all state changes. Those services only accept a request if its method is POST and its Content-Type is 'application/json'. Assuming that our site has no XSS vulnerabilities, is this sufficient protection against CSRF for our WCF services? Is it possible for an attacker...

Is it possible to debug both a Silverlight and WCF project at the same time?

I have 3 projects in my solution: 1) A silverlight Application Project 2) ASP.Net Web Application Project 3) A WCF Service Application. Projects 1&2 have a service reference to project 3. The binding type is basicHTTPbinding. If I set project 2 as the start-up project, I am break points set in both project 1 & 2 are hit, but not break ...

wcf rest starter kit preview 2 error: requires VS 2008 SP1

Hi, I'm trying to install the WCF REST Starter Kit Preview 2, but that fails with the message that I need Visual Studio 2008 SP1, which I actually do have installed: Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM Microsoft .NET Framework Version 3.5 SP1 Does anybody know what the problem is? Thanks, regards, Miel. ...

webHttpBinding using webMessageEncoding: how to configure?

I have a REST WCF service. Its using a webHttpBinding and the configuration looks like this: <service name="IndexingService.RestService" behaviorConfiguration="IndexingService.Service1Behavior"> <endpoint address="" binding="webHttpBinding" bindingConfiguration="CustomMapper" contract="IndexingService.IIndexi...

Enums And WCF - Meaningful Error?

I'm trying to overcome a problem with WCF and enums, where I'm trying to pass an object from the server to the client (or another server), which contains an enum. The enum starts with 1, on purpose. Everything goes fine when the enum is initialized and when the value is defined in it, but when it's not defined in the enum, I get this won...

Hosting WCF service in IIS 7 (WAS) with net.tcp binding on TWO tcp ports

By default IIS 7 Web site has net.tcp binding with "808:" binding information string. If i add another net.tcp binding with "xxx:" exception occurs: This collection already contains an address with scheme net.tcp. There can be at most one address per scheme in this collection. Parameter name: item How can i solve this problem and li...

Adding behavior to wcf basichttp in biztalk 2006R2

Hi I am using a wcf basichttp adapter in biztalk using ESB guidance 1.0 i made a test without biztalk involved calling an asmx service and i ended up with this configuration file : Now i have to add the behavior in the wcf basichttp dynamic port i am creatin. According to...

Async End<Method> not called in WCF

I have the following situation: My WCF service allows a client to register to wait for some event. The waiting is asynchronous on the service side, that is, the waiter is registered and when the process is finished, the waiter is notified. At the moment, it's simply a ManualResetEvent. Now I want to expose this method via WCF. I tried t...

Can calling Abort() on an IClientChannel proxy throw an exception?

Based on documentation and articles it is recommended to call Abort() on a client proxy if an unexpected exception/fault is encountered. See the following (simplified): MyServiceClient proxy = null; try { proxy = new MyServiceClient(); proxy.DoSomething(); proxy.Close(); } catch (Exception ex) { if (proxy != null) ...

Transaction across WCF and REST

We are having a business logic which involves call to services. The application is built in c#.net and the business logic needs to make a call to the fallowing 1)Internal database call to update few fields 2)call to REST WCF service to store a document 3)call to web service to store data in queue I want the above 3 steps to be Transa...

WCF WS static Proxy concurrent calls, why it won't work?

I have found this example on http://www.codeproject.com/KB/WCF/WCFThrottling.aspx. My goal was to test multiple WS clients and i run into this issue. My question have two parts, 1) I am just curious why it's not possible to call one webmethod in parallel on one static ProxyObject (when I do it works but it behaves as if it would be cal...

Why does my client send request so slowly?

I have WCF client to send request to a service. And my business code call the client API to send 300+ requests per second. But my client only sends about 50 to service according to te performance counters of my service and WCF ServicePoint. And I have increased ServicePointManager.DefaultConnectionLimit to 1000 in code, and setted maxCo...

WCF methods with large result sets - visually tracking transfer progress

I have a WCF services that has to return some data sets that can be as large as 10mb or more, I want some visual feedback for the user on progress, is there a way to track the download progress? My client is Silverlight 3 and ultimately I would like to be able to bind a progress bar to this; any ideas? EDIT: After the bounty SO automat...

What is the purpose of WCF Service Library?

What is the purpose of WCF Service Library? I understand if you build an IIS hosted service you create a web project, if self-hosted - create an .exe. What is a real life scenario to use WCF as DLL? Thank you ...

Access To Restricted URI Denied (Trying to Call a WCF Method from XMLHTTP)

Hi. I have a web solution that looks something like the below - a web project, a web service, and a service library. Web Solution1 - Web Project -- test.aspx - WebAPILibrary -- trade.cs -- TradeService.cs -- ITradeService.cs - WebAPIService -- trade.svc Now, I am trying to retreive a JSON string produced by a trade.svc method using...

WCF - WSDL or pre-compiled Proxy

this is B2B scenario, one client (at least for now). Server environment: WCF service, IIS6, .NET v3.5 Client environment: dev shop is .NET 2.0/VS2005. Will be calling my WCF service. Question: should i (a) open WSDL gen for the client(not desirable for security reasons) (b) send a WSDL file(s) to the client (c) pre-compile Proxy int...

WCF DataContract

If I don't keep Service Contract, proxy and Service in separate assembly, Service contracts and Proxies resides in Client assembly, And service resides in Service assembly. If I do not keep data contract in a separate assembly, where should it reside, Client side or Service side? Can Data Contracts reside in both assemblies? ...

WCF Authentication Access Group

I have 2 WCF services, (A and B), where A calls B. WCF Service A runs using identity ServiceUserA (as set in application pool). WCF Service B runs using identity ServiceUserB (as set in application pool). WCF Service B needs to allow access to users in AD group ServiceBAccessGroup. ServiceUserA is part of ServiceBAccessGroup. When Ser...