wcf

Read from output file in installed WCF service

I included a text file as output in a WCF set up project. The text file is correctly located in the same folder with the dll, exe, and config file after the project is installed (C:\Program Files\KLTesting\KLTestApp). However when the program tries to read it, it looks under "C:\Windows\system32", what's the correct way to find & read i...

OData EndPoint/DataService Using IEnumerable<IQueryable>

I am using NHibernate with NHibernate.Linq, and have a bunch of dynamically loading modules each with their own POCO's and Mappings (ClassMap<POCO>). I have created OData services before, but normally with a datacontext and IQueryable as Properties/Getters. What I want is to create the service by passing in IEnumerable, into the constr...

WCF + NserviceBus Names notation

Hi. I trying to create WCF via NserviceBus. Create contract: [ServiceContract] public interface INotifyBusService { [OperationContract(Action = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/Process", ReplyAction = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/ProcessResponse")] ResultType Notify(Requ...

how to use MessageParameterAttribute in wcf

hello, I wanted to know what is the use of MessageParameterAttribute in wcf. In my function: [OperationContract] public float GetAirfare( [MessageParameter(Name=”fromCity”)] string originCity, [MessageParameter(Name=”toCity”)] string destinationCity); I dont use fromCity or toCity anywhere in the implementation or even while using a...

Nservicebus serization issue of derived types

Hi Guys, for the context setting, I am exchanging messages between my nServiceBus client and nSerivceBus server. its is the namespace xyz.Messages and and a class, Message : IMessage I have more messages that are in the other dlls, like xyz.Messages.Domain1, xyz.Messages.Domain2, xyz.Messages.Domain3. and messages that derive form tha...

Handling service unavailable errors in asp.net

Hi, I have an asp.net application which will always interact with wcf service to transact with the data. My question here is if the serivce is not running or some reasons got timed out. How do i need to handle the serivce exception from my consuming application. We are using faultcontract exceptions for handling any runtime exception...

wcf class implementing multiple service contracts

Hello, I have a class TestService which implements two service contracts called IService1 and IService2. But I'm facing a difficulty in implementation. My Code looks as follows: Uri baseAddress = new Uri("http://localhost:8000/ServiceModel/Service"); Uri baseAddress1 = new Uri("http://localhost:8080/ServiceModel/Service1"); ServiceHos...

WCF class implementing two operation contracts in different service contracts with same name

I have declared two service contracts as follows: [ServiceContract] public interface IContract1 { [OperationContract] double Add(int ip); } [ServiceContract] public interface IContract2 { [OperationContract] double Add(double ip); } I have a class which implements these two contracts. I have created two endpoints for ...

WCF Service Memory Leaks

Dear Devs I have a very small wcf service hosted in a console app. [ServiceContract] public interface IService1 { [OperationContract] void DoService(); } [ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)] public class Service1 : IService1 { public void DoService() { } } and its being called as ...

Memorystream and Large Object Heap

I have to transfer large files between computers on via unreliable connections using WCF. Because I want to be able to resume the file and I don't want to be limited in my filesize by WCF, I am chunking the files into 1MB pieces. These "chunk" are transported as stream. Which works quite nice, so far. My steps are: open filestream r...

WCF, Duplex callback, recieveTimeout netTcpBinding

Ive got a Host / Client WCF Service and client that is using netTcpBinding and a callback method. <bindings> <netTcpBinding> <binding name="tcp_Unsecured" receiveTimeout="00:01:00" sendTimeout="00:01:00"> <security mode="None" /> <reliableSession enabled="true" ordered="true" inactivityTimeout="00:10:00...

Silverlight data-driven application with NHibernate

Hi Guys, this is more of a subjective Question, but I'll ask it anyway. I'm about to develop a very data-centric application that has to run inside the browser. The frontend will be Silverlight, backed by a Fluent NHibernate service that runs server side. The problem here is: Wherever I look for data-driven silverlight app I wind up fi...

Stored procedure call in method with OperationBehavior attribute: problems with transactions

I'm using ADO.Net's ExecuteNonQuery to call a stored procedure, works like a charm stand-alone but when implementing it where it should be called I'm running into problems concerning transactions. For example System.Data.SqlClient.SqlException: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statemen...

WCF XmlSerializer assembly not speeding up first request

I am generating proxy classes to a clients java webservice wsdls and xsd files with svcutil. The first call made to each service proxy class takes a very long time. I was hoping to speed this up by generating the XmlSerializers assembly myself (based on the article How to: Improve the Startup Time of WCF Client Applications using the Xml...

SharePoint 2010 BCS passthrough authentication against web services

We are looking at creating a solution using SharePoint Foundation 2010 with forms-based authentication. The application will access business data by consuming a number of web services via SharePoint's business connectivity service. Both the web service and SharePoint will have access to the same database containing the user data for au...

Bind WCF webservice to specific network interface / IP

On a machine with multiple network cards I need to bind a WCF webservice to a specific network interface. It seems that the default is to bind on all network interfaces. The machine has two network adapters with the IPs 192.168.0.10 and 192.168.0.11. I have an Apache running that binds on 192.168.0.10:80 and need to run the webservice o...

Can't submit new object to WCF DataService because of Primary Key constraint

I've got a SQL database that uses Guid's for PK's and upon insert, it generates a NewId(). I have an EF data context setup pointing to that database with the primary keys setup with the Entity key:true, Setter:private and StoreGeneratedPattern:Identity because I want the DB to manage the keys and not have code set the PK property. I h...

How do I consume a self hosted WCF service with Compact Framework client?

Hello - I've been trying to figure out how to consume a self hosted WCF service from a Windows CE device. I've not found any good resources that walk through this process online. I've found some good samples for self hosting, and that part seems to be working fine, but not sure how to go about consuming on the compact framework. In th...

WCF Create service response from XML File

We are needing to test client functionality and performance against several web services. We have the XML soap requests and corresponding responses in several XML files. I am writing a mock service provider that will simply look at the request object, and then load the appropriate XML file and send it back, as the actual SOAP response. I...

WCF Error Deserializing body of request

I get the following error when attempting to consume a wcf web service with a wcf client: Error in deserializing body of request message for operation 'GetUpcomingRaces'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'GetUpcomingRaces' and namespace 'http://tempuri.org/'. Found no...