wcfservice

How do I configure a WCF service that calls other services behind a load balancer?

I haven't deployed behind a load balancer before. My customer has a WCF service built and tested on servers using a service model configuration that is relatively straightforward. It provides a service to return an image of a map for another application. To get the map, it calls other services. The service was built in Visual Studio 201...

How to make the data from my WCF Service to get stored inside my Silverlight application?

I have Silverlight application that retrieves data from the database through a WCF Service. What my application have to do is to display the referent data anytime a button gets MouseOvered. I did it in a way that that when a button gets MouseOvered, I called my service and retrieved the data, but it generetad a big delay. Now, I think th...

WCF Services - Create multiple instances on startup?

Apologies if this has been asked before, but I've searched and can't find an answer We have a WCF service that provides upto 100 instances - as there are 10,000 clients but the calls are very quick. The only performance overhead we've noticed is on the first call to an instance...e.g. the first time any of the instances is called (or a...

Does WCF execute the operations in a Singleton WCF service in the same thread?

I've service which is marked with the ServiceBehavior attribute [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)] Is there any chance for the operations in this service to be executed by same thread? I'm storing an important data in ThreadLocal variable, which is to be us...

Retrieving the currently authenticated user in a WCF service.

Today, I implemented a custom authentication provider for my WCF service. It is able to determine if my user is valid or not, just as expected. So, now I have this class: public class MyCustomValidator : UserNamePasswordValidator { public override void Validate(string userName, string password) { User apiUser = User.Log...

Difference between the different DuplexChannelFactory<TChannel> constructors

Hello =) what is the difference between the three following constructors, and when do i use each of them. sorry for this basic question : DuplexChannelFactory(InstanceContext) DuplexChannelFactory(Object) DuplexChannelFactory(Type) http://msdn.microsoft.com/de-de/library/ms585874.aspx Thanks! regards thomas ...

Delphi 7 Soap WCF Service using basicHttpBinding

I added a basicHttpBinding to an existing Service I have in production in order to expose it for use in Delphi. When I try to use the WSDLImporter from Delphi 7 on the wsdl file, it doesn't work right. A section in the resulting tlb says // ************************************************************************ // // The following ty...

Serialization/Deserialization of Parameters - WCF Service Call doesn't work

I have a simple WCF service method: [OperationContract] public SetupGameResult SetupGame(long player1Id, long player2Id, long myPlayerId) { if(player1Id == 0 || player2Id == 0 || myPlayerId == 0) { throw new ArgumentException(); } ... // other code } I call this Service just in one ...

WCF Data Services throws NULL Reference Exception

I am invoking the DataServiceContext methods through reflection. I have introduced a partial class to generated Data Service Context class. The partial class has a method : GetCustomers public partial class NorthwindDataSvcContext { Customer[] GetCustomers() { return this.Customers.ToArray(); } } I invoke the above ...

WCF service error when using MySql.Data.MySqlClient

I have a fully functional WCF webservice hosted in iis7 on Win Server 2008 machine. The problem is when I try to implement mysql calls to a method in the service. The method works fine when debugging in vs, all the mysql methods and the call to the database works as it should, but when deploying it to the server I get "The server enc...

push message to biztalk orchestration from webservice

Hi all, I have created a BizTalk orchestration that sents a message to a wcf webservice, the webservice creates a task on sharepoint, and the orchestration receives a response (just a string "succes"). Now I also created an eventhandler in sharepoint when someone changes a task to "complete" some code can be executed. I want to be able ...

What do you do with 'You've created a service' wcf help page?

Hello, When you created a wcf service, hosted it in IIS and then opened service page in browser you will see a default wcf help page. This page says 'You've created a service'. What do u do with page? Do u hide it? Or replace it with your own? Thanks ...

Common DTOs accross multiple web services in VS2010

Hi all, I have a collection of WCF web services that share a common DTO model. The problem is that when I add service references in Visual Studio 2010, the proxy generated for each of the web services has its own namespace (internal to the solution), meaning that I essentially have duplicate DTO's on each of the service references. I...

How to use single windows service to host multiple WCF Services instances from different folders. Each WCF Service has Reg-Free COM reference.

How to use single windows service to host multiple WCF Services. I have a mutiple instance of same WCF service in different folder, each instance has unique service name and port. WCFService has reference to Reg-Free COM Reference, i have Native.WCFService.manifest in each folder. Ex: WCFService1 is in "C:\WCFService01\WCFService.dll, ...

Why won't my Windows Service that is hosting a WCF Service run under LocalService or NetworkService accounts.

I have a simple Windows Service hosting a WCF Service. I want to run the Windows Service under the LocalService account (or even the NetworkService account). However when I try to start it under either of these accounts it starts then immediately stops. It starts and runs OK under the LocalSystem account. Any thoughts as to how to wo...

How to reuse service layer in WCF and standard ASP.NET scenarios

I'd like to be able to create standard POCO service that I can use in two distinct workflows: in-process i.e. consumed by my ASP.NET webforms application remotely via an exposed WCF endpoint to be consumed by other applications Is there a way to re-use the same service and its return data types in both scenarios above? Ideally, my co...

Best Practices for Designing a Simple Web Service w/ Return Codes

I'm designing a WCF service that will return a response code (such as 0 for success, or another number for errors). Also, all methods of the web service will perform several common validations (such as authenticating an apiKey). I am wondering if there is a best practice approach or organizing and retrieving these response codes and mes...

Windows Service hosted WCF over HTTPS

I've created and configured an SSL certificate as per these instructions from MSDN. I'm getting the error message that this question lists, but am not sure how to map the accepted answer in that question to my App.config file. The content of the config file, and the service itself worked correctly over http, it's just over https that the...

Omit meta-data from oData response

I'm experimenting with writing Javascript/JSONP queries against an WCF oData API. For performance reasons, I'm trying to keep the responses succinct. The default seems to be for the oData endpoint to return uri and type metadata with every returned result. This information can take up a significant portion of response payload. Is there a...

WCF Data Service, serialize additional properties on from Entity Framework partial classes

I'm on the process of creating an API in much the same way Hanselman showed it could be done for Stackoverflow. I have a bunch EntityObject Entity Framework generated classes and a DataService thingy to serialize them to Atom and JSON. I would like to expose some generated properties via the web service. Think FullName as generated by co...