wcf

Retrieving call source for a WCF service

Hello, I'm fighting since two days with a simple question : Is there a way to identify the source of a WCF call ? I'm trying to find a realiable .Net property that will let the service know the address (URI) of the calling Web Service. Especially in the case where two Web Services are hosted on the same machine. Thanks in advance. ...

How do I get the local port my WCF service runs on?

I'm using multiple self-hosted WCF services on the same machine. I need to open each of them on a different port (obviously), so I used "net:tcp://localhost:0" as address since I figured it would assign a free port this way. Now I need to know which port was assigned actually. This code runs on the server, so I need the local port. How ...

WCF Streaming Service that returns Stream Length and includes Input Parameters

I am trying to create a WCF Streaming Service. I have two requirements that I seem to be stumbling over trying to get this to work: Length of stream size Input parameters My message contract looks like this: [MessageContract] public class MyStream { [MessageHeader] public long StreamSize; [MessageBodyMember] public Stream Stre...

Firewall blocking wcf lan client

I have hosted my WCF windows service on WINDOWS 7 OS and have client application on windows-XP PC. WIN-7 firewall is blocking my XP client app, when I disabled firewall on Win-7, client app is working nicely. how I can overcome this problem. I am using security mode="none" for all lan based client app. Client side config file <system.s...

Self-hosted WCF service: How to access the object(s) implementing the service contract from the hosting application?

I am self-hosting a WCF service in a WPF client. I want to show the data the service receives in the user interface. Every time some data is received the user interface should be updated. The code in "App.xaml.cs" looks like private ServiceHost _host = new ServiceHost(typeof(MyService)); private void Application_Startup(object...

Expose 3rd party interface (over WCF) to Silverlight

Hi. I searched a lot, apologies if I missed something obvious. And thanks for reading the looong text below. I have a 3rd party (read: No way to access/change the source) application here. It consists of a server (Windows service) and an API, that talks to the server via remoting. For several reasons I'd like to expose this API over WC...

WCF client connection problem

I am consuming a web service in .NET application with WCF client. The Endpoint's address of the service is over port 4338, and it is over HTTPS, secured with WS-Security standard. So the address is something like : https://[servername]:4338/[servicename]/ I was not able to communicate to the service with just running the application...

Customize WCF Add Service Reference Behavior ?

Is there any way to customize or control which type of collection class types are created in the WCF client Side interface Types when using the default "Add Service Reference" menu option in Visual Studio? Our WCF service is such that when the automated "Add Service Reference" runs, it creates DataSets for all the server side types tha...

Seeking WCF Duplex "TwoWay" Subscribe+Callback Example

Renewing the bounty AGAIN because I really need to know how to get this to work, or a definitive answer about why it won't. I've added an alternative explanation of the problem here. Having a hell of a time getting a two-way (IsOneWay = false) WCF client-server to work in .Net 3/3.5. After the client successfully enrolls with the serv...

WCF with shared objects and derived classes on client

I have a WCF serivic and Im sharing types with a client in a shared assembly. If the client create a derived class will it be possible to pass back the derived type to the service so that I can read the added properties through reflection ? I tried but having issues with KnownTypes since the service dont know how to deserialize the deri...

SQL Server 2008 - Stored Procedure Gets Stuck When Called From WPF Service Using a SqlDataAdapter

This has me pulling my hair out. We have a workflow, hosted as a WCF service, which makes a call to another WCF service which then calls a stored procedure. Store procedure calls a merge, then iterates through a cursor that calls another sproc. The cursor count is the same as the source count in the merge. If the source count is high...

How to recreate faulted WCF proxies stored within a presenter/controller?

Question regarding patterns involving Model-View-Presenter, IOC and WCF (although I imagine the same would apply to MVC): Working on a large-scale Windows Forms implementation using a MVP (Supervising Controller) pattern plus IOC, where Presenters get their dependencies injected. One common type of dependency is a WCF Client Proxy, crea...

LINQ to XML in a WCF Service

I am using VS 2008. I have to create a wcf service and inside the service i have to do some basic operations on a xml file using LINQ to XML. I have to host the service in IIS 7.0 and consume it. As part of the LINQ to XML I have to do the following tasks : find all the questions in all the Enquiry that answers are no modify the quest...

NHibernate CallSessionContext vs ThreadStaticSessionContext

Is someone able to explain NHibernate's CallSessionContext, and contrast it to ThreadStaticSessionContext. The best explaination I have been able to find, has been from the NHibernate documentation : NHibernate.Context.CallSessionContext- current sessions are tracked by CallContext. You are responsible to bind and unbind an ...

Silverlight application authenticate with WCF without IIS

I've been struggling with this for a few days, and I hope someone can suggest some solutions. I have a self-hosted WCF service, the main interface to this service will be a Silverlight application that is hosted in a non-IIS, potentially shared, environment. I'm aware of the TransportWithMessageCredential and a custom authentication va...

When I publish a WCF rest service in IIS the services do not work?

Im using WCF REST 4.0 meaning to say their is no .svc file.. So I have 3 different service classes in one service WCF Rest Application project. And I registered all these services in the Global.asax What im trying to do is that I have a set of Business Functions from a lower framework e.g: .NET 1.0/2.0 where in i use datasets and not ca...

WCF client console application deploying

Assuming serviceUrl is read from exe.config ( app.config in IDE ) var binding = new WSHttpBinding(); ... client = new ContentServiceClient(binding, new EndpointAddress(serviceURL)); Do I just need exe itself ( given no dependencies ) and exe.config for this client to invoke service on other box. I generated service reference...

How do I supply a specific instance of a class, to expose as my WCF service

I have a class that implements a plugin for an existing application. I also have exposed that class as a WCF service. That part is working so far. The problem I am running into is that the application I am plugging into creates the instance of my class that I want to use. Is there a way to pass an existing class instance to the WCF s...

WCF DataContract IsReference = true and .NET 1.1

I have a WCF service which basically returns [DataContract(IsReference = true)] public class Person { public Person[] relatedPersons; } As you can see, it has a cercular reference, but ofcourse, IsReference = true solves the problem. Almost. Among numerous clients, there is a .NET 1.1 application, which calls this service throu...

User synchronization in WCF web service performing database operations.

Hi, I am new to wcf and I have written a wcf web service that performs operations on database like an update. The service is consumed by silverlight clients. When multiple users try to make certain change to an object, I want the wcf service to manage it. e.g. if a certain object is acknowledged(update operation in db) by one user, anoth...