wcf

Callback function is not executed in an asynchronous call

I am trying to make a simple asynchronous call with WCF, but the callback function is never executed. Can anyone tell me what is wrong with the code? I am using visual studio 2008 with .Net 3.5 You can download a visual studio 2008 solution from here: http://dl.getdropbox.com/u/419244/AsyncCalls.zip Service code [ServiceContract] pu...

How to connect implementation and contract assemblies with WCF assembly?

I tried to use separate assemblies for the implementation, contract and WCF service library but starting the service in debug produced an error because it couldn't find the service/contract. If I move them into the same assembly it works. What is needed to wire up the WCF when it's in different assemblies? ...

Moving Data access layer to WCF service

I am at a stage of building a wcf service for my application that will provide the products.. I have, the domain model and persistence layer under the application. For the service I will also need a similar domain model and persistence layer. I don't want to duplicate things and I don't want to also share libraries and couple the applic...

Should I Use Entity Framework, DataSet or Custom classes?

Hi Guys, I am really having a hard time here. I need to design a "Desktop app" that will use WCF as the communications channel. Its a multi-tiered application (DB and application server are the same, the client goes through the internet cloud). The application is a little complex (in terms of SQL and code logics) then the usual LOB appl...

Bitmap.Tag is not serialized when using with WCF.

On the server side, i assign Bitmap.Tag = "a string", but on client side, i always get the Tag == null. Where am i doing wrong? ...

Session Handling in WCF with a Java Client

Hi all What's the best way to implement Session Handling in a WCF Service if the client that is using the service is not a WCF client but a Java client ? Is it possible to use the integrated Service model? Thank you! Dominik ...

How to call a WCF service from a unit test as an anonymous identity?

I've a SecurityService that has a AutoLogin method, that uses the ServiceSecurityContext to find out which windows identity is calling and then tries to find the related user account in the database. This is working fine when it is called from a web site that uses impersonation and requires integrated security in IIS. The call is using t...

WCF call with windows authentication

We have a system where the users access a web server, the web server then calls a WCF service. We would like the call to the WCF service to be made in the security context of the windows identity of the application pool on the web server. What is the best way to do this? Can it be done purely through configuration in the web.config fil...

Stateful WCF Web Service

I'm new to WCF and I've been trying to use the Session state in Web Services, which I managed to get working with a number of articles. But these articles all follow the .net 2.0 approach, as the new WCF Service References do not have a CookieContainer by default. What is the new school way of using stateful web services? (Without us...

NHibernate and WCF Serialization(Unidirectional)

Object graph for type '[type]' contains cycles and cannot be serialized if reference tracking is disabled. I have a simple class hierarchy setup using NHibernate as my persistence layer. For example: public class Parent { public virtual IList<Child> Children{get;set;} } public class Child { public virtual Parent Parent{get;se...

The underlying connection was closed: The connection was closed unexpectedly

When working with WCF many times the exception massage doesn’t help us to solve the problem. The above massage is usually a symptom for one of the following problems: The return values are bigger than the value which was defined in the config file. There is a problem with the endpoint setting There is a problem with serialization of t...

WCF client proxy initialization

I am consuming a WCF service and created its proxy using the VS 2008 service reference. I am looking for the best pattern to call WCF service method Should I create the client proxy instance every time I call the service method and close the client as soon as I am done with that? When I profiled my client application, I could see tha...

get underlying response stream from WebOperationContext

How do I get access to the underlying response stream from a WebOperationContext? ...

WCF Server Push connectivity test. Ping()?

Using techniques as hinted at in: http://msdn.microsoft.com/en-us/library/system.servicemodel.servicecontractattribute.callbackcontract.aspx I am implementing a ServerPush setup for my API to get realtime notifications from a server of events (no polling). Basically, the Server has a RegisterMe() and UnregisterMe() method and the clie...

Make an interface structure appear in a WSDL

Hi all, I've exposed a method on a web service to return an interface and sending back conrete classes using the [ServiceKnownType] attribute which works very well. However, the wsdl description does not display any of its properties or any xml structure for this interface, this is the same when i send back List it gives it a default t...

Authenticate every call in WCF

Hi, I have a silverlight application that calls my wcf services so its a basichttpbinding. and we use forms authentication. I want to do a authentication check for every call that I receive except for the "AuthenticationService" (as this is the method which will do the basic authentication for login) so after user logs in and tries to c...

What are the impacts of setting establishSecurityContext="False" if i use https?

My WFC service uses wsHttpBinding configured with: <security mode="TransportWithMessageCredential"> <message establishSecurityContext="True" clientCredentialType="UserName"/> <transport clientCredentialType="None" proxyCredentialType="None"/> </security> One of our partner is trying to invoke our services using the java the Me...

Consume a WCF service from a console app as part of a SQL job?

I'm working with one WCF service which will be consuming records I queue up for it with another. Service A will package up an object containing a series of records (I guess an XML document, haven't nailed down the format yet) queried from a database, and submit it to Service B for processing. Service B is on a separate department's sys...

Are WCF Ajax Calls blocking calls?

We have a simple ASP.Net WCF Ajax enabled webservice which is called via the generated Javascript proxy. The service does a Database Stored Procedure call to return an integer count of records. When the call is invoked from the client (IE8 on Windows 7) and the DB call takes while, I cannot call any other Javascript functions. For exampl...

Shared data object between WCF service and Silverlight app

I have a custom data entity (data object) that is exposed via a WCF webservice. The WCF service lives in a web application. I then have a Silverlight application with a service reference to that WCF service. When i add the service reference a proxy is generated, and that includes a version of the custom data entity. How should i structu...