wcf

ContextSwitchDeadlock when running unit (integration) tests

We get the following error when running at test: ContextSwitchDeadlock was detected Message: The CLR has been unable to transition from COM context 0x344b0c0 to COM context 0x344b230 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running op...

Connection interrupted when using WebHttpBinding in Transport SecurityMode

I want to expose an implementation of a contract over a WebHttpBinding with SecurityMode: transport (SSL). However, when I try to access the site via Firefox, I only get The connection to localhost was interrupted while the page was loading. The config file is as follows: <configuration> <system.serviceModel> <services> ...

Calling webservices from Silverlight 3 when running out-of-browser

We have this nice Silverlight 3 application that communicates with a web server running some WCF web services. It works well when it is running in the browser, but at soon we try to run it outside the browser it doesn't call our webservices. I have tried to find out why this is happening, but I can't find any explanation. When attach...

WCF WebInvoke problem getting WSDL

Hi, i got a webservicedefinition like this: [OperationContract] [FaultContract(typeof(Exception))] [WebInvoke(ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Xml)] SearchResponse SearchXML(SearchRequest req); and a Service config ...

Should i decorate my classes/properties as DataContract/DataMember when i use them in WCF?

I have a framework with objects and data access code. This objects are mapped to the database using NHibernate. For example my framework has class Customer and Order: public class Customer { private Guid _id; private string _name; private IList<Order> _orders; public properties... } public class Order { ...

Transmitting the least amount of data over the wire with WCF

My project has a netTCP WCF service. This is the app.config for it: <?xml version="1.0" encoding="utf-8"?> <configuration> <system.serviceModel> <bindings> <netTcpBinding> <binding name="NetTcpBinding_IIndexer" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:1...

WCF REST issue: where is service.basic.svc.cs

I just started to use WCF Rest project template to design a REST service, for example Collection REST WCF Collection service. One thing I noticed that the Service.basic.svc.cs file is no longer under the Service.svc as its partial or dependent class file. I tried to find the definitions for CollectionServiceBase and ICollectionService i...

Debugging a netTcp WCF binding

I have a netTcp WCF service running in a windows service on a remote machine. The windows service is running as user mydomain\u2 The .config file for the windows service hosted WCF is <security mode="None"> <transport clientCredentialType="None" /> <message clientCredentialType="None" /> </security> Now when ...

Integrated security in connection string.

I just tried to move one of WCF service to windows authentication. using this connection string <add name="MembershipConnection" connectionString="Data Source=DBADDRESS ;Initial Catalog=aspNetMembership;Persist Security Info=True;Integrated Security=SSPI;"/> WCF service is hosted in IIS (2003) and the user I have setup under 'Directory...

REST kit for .Net?

I just started to explore RESTful service by using .Net C#. At CodePlex, there is WCF REST Startkit available. I watched several Screen-casts by Pluralsight. The demos are very cool but they are based on the Startkit Preview 1. I downloaded the newest version of Preview 2. It looks like that some classes such as Service.basic.svc.cs is ...

How to best utilize hardware resources in an WCF application?

One of my application, which is a service application developed using WCF, is being production released. It uses a SQL Server express internally. Since the service will play an important role and has to be up 24x7, I planned to deploy 2 machines: One machine will be operational and serve the requests. It will also hold the SQL Server ...

Serializing Linq2Sql over Wcf - bug or misunderstanding?

Working with Linq2Sql as a driver for a Wcf Service. Lets go bottom up.... Down at the bottom, we have the method that hits Linq2Sql... public virtual void UpdateCmsDealer(CmsDealer currentCmsDealer) { this.Context.CmsDealers.Attach(currentCmsDealer, this.ChangeSet.GetOriginal(currentCmsDealer)); } That gets used b...

Wcf in Medium / Partial Trust (Mosso) - odd problem / config error...

Whew! Ok… I solved my Wcf / Linq errors (and learned a lot – a series of blog posts will follow next weak). Now I need to deploy. We run on the Mosso / Rackspace cloud, and for the moment that environment runs in a partial trust environment. To make it simple, I added a method to my Wcf service that does just about NOTHING. public str...

Silverlight 2, Cannot Update Service Ref with New Service

In Silverlight 2, I am attempting to add a new service which will return an object containing two lists from the WCF Service to the Silverlight app on the client. The svc and interface file already contain two contracts which work and are being used. After adding the new service, I click on the "Update Service Reference" option in the S...

Tcp Client two way communication help

I want to communicate between two applications or winforms in C# using clients and server its like i want a server continiously listening to incoming messages from a client or clients and when the msg is received i want to reply back to the client that sent the information for processing can any one help with code example ...

WCF service to accept a post encoded multipart/form-data

Hi, Does anyone know, or better yet have an example, of a WCF service that will except a form post encoded multipart/form-data ie. a file upload from a web page? I have come up empty on google. Ta, Ant ...

jax-ws: setting Content-Type of request

Hi. I've been trying to consume a .net WCF rest service using JAX-WS lately. Due to security of the service, I've have to set a custom HTTP header Authorization with some signature in it. This I've solved by doing something like this: BindingProvider bp = (BindingProvider) port; bp.getRequestContext().put(MessageContext.HTTP_REQUEST_HE...

Microsoft Velocity - best way to share cached data on single server

Hi there, I have several WCF services and ASP.NET application both accessing data via shared service layer. Inside this layer I'm performing all required data access and caching. Now I need to share cached object between WCF ans ASP.NET. What's the best way to configure Velocity to work on a SINGLE server. Also how can I disable object ...

Should network DTC be enabled for oracle transactions

I have a WCF based web service hosted in windows sever 2003 machine. The database is Oracle 10G on solaris. The web service uses transactionscope extensively and ado.net transactions in some places. Most of the transactions involve only one resource (multiple oracle stored proc calls). Some of them are two resources (MSMQ and oracle stor...

Authentification in WCF service.

I have a WCF service deployed on another machine and I want to authenticate the client against the WCF service. I have done the following things : 1) In IIS I have unchecked the Anonymous access and checked the "Integrated Windows Authenfication" check box. 2) My Web config <authentication mode="Windows" /> <bindings> <basicH...