wcf

WCF - How can i make this config cleaner

I am new to WCF ,i have this config file and i really want to make it cleaner. <?xml version="1.0" encoding="utf-8"?> <configuration> <system.serviceModel> <services> <service behaviorConfiguration="warConfig" name="Service.WarService"> <host> <baseAddresses> <add baseAddress="net.tcp://localhos...

Creating an ADO.NET Entity from primary key-less view (or stored procedure)

Using either a view and/or stored procedure, I can return the results of executing an MDX query against SQL Analysis Services (using OPENROWSET against a linked SSAS Server into SQL). Unfortunately, the resultset doesn't include a PK field...or for that matter, even a column which COULD act as a PK if I were to hack the model. Can an...

ContextSwitchDeadlock with WCF communication

I have a system consisting of two parts: WCF server (console) and client (WinForms). Server publishes a service for remote access to the database, and client connects. Everything runs smoothly, client is able to read database documents, attachments and so forth. However, after 60 seconds running in debugger, the following client problem ...

What are the Advantage of WCF Service Over WebService 2.0 in Performance?

I Want to know the Advantages of WCF Service and Webservice 2.0 in performance wise, Please give me some imprtant links to know more about this. ...

SvcUtil.exe creating its own class name for service contract implementation class - WCF

Hello I've written a WCF service and hosted in IIS 6.0. When i try to create the proxy using the following command svcutil.exe /language:cs /out:MyProxy.cs /config:app.config /a http://serviceurl it is creating its own class name in MyProxy.cs. Why is that? I was trying to step in to the service for debugging and i was not able to ...

Silverlight application running on FF gets CommunicationException during accessing a web using WCF through SSL, but not IE nor Chrome

Hi, I know this exception is pretty popular for SL and WCF developers since I saw tons of posts asking solutions, but I can't find a similar question to my situation, so could anyone help me? I have a SL app which uses the WCF accessing an IIS 7 through SSL. Basically it works well, but when I run it on FireFox3.6.6, it gives me the Co...

WCF - Transport Authentication - Get Credentials of Authenticated User

Hi, I have a NetTcpBinding with SecurityMode.TransportWithMessageCredential. Transport.ClientCredentialType is set to MessageCredentialType.Windows, but I'm considering MessageCredentialType.UserName. Then there's a class DataStoreServerProxy for fetching database data which implements IDataStoreContract. It contains methods such as ...

WCF base address not found

My service can work with normal WCF calls, but to expose metadata (the wsdl file) I have to change configuration in such a way the normal WCF host fails. I've spend countless hours on google trying to solve this, big problem there is that hosting a service inside a website is never discussed (yes this is different). requirements: Run...

WCF service migrating from VS2008 to VS2010

Hi, I have migrated WCF services from VS 2008 to VS2010. The service is not working and it is throwing exception when i am trying to access the service URL. <%@ Application Codebehind="Global.asax.cs" Inherits="NHSIC.Sutton.Web.Global" Language="C#" %> [HttpException]: Could not load type 'Web.Global'. at System.Web.UI.Templat...

WCF service to return JSON-formatted faults

Is it possible to get a WCF service to return a 'fault' to the client? I'm led to believe this is possible when using SOAP, but I'd like to be returning JSON. Ideally, the HTTP response code would be set to something to indicate that an error occured, and then details of the problem would be available in the JSON response. Currently, I...

Custom SOAP Fault has wrong namespace http://schemas.datacontract.org/2004/07/...

Hi there I've defined a custom schema for a soap fault which looks like this: ... ... I've genereated code in VS 2008: [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3053")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("...

Do I need to close a .net service reference client when I'm done using it.

I'm trying to find out if it is neccessary to close a .net service reference client when you are done using it. Almost all of the examples that I have come across on the net don't seem to, but the client that is generated implements IDisposable and since it does open a connection to a service, my intuition tells me you need to close tha...

Mixing RIA services and standard WCF services

Is it possible to have a mix of RIA WCF services and custom WCF services hosted in the same project? At the moment I have a server project hosting 2 RIA service classes, both of which work fine, and 1 WCF svc file, which loads up fine in the browser (e.g. http://localhost/services/service.svc) but when I access it through code in the Si...

#if SILVERLIGHT and #else blocks color change in WCF

Hi Guys, I am facing a problem with WCF connectavity with silverlight. In my interface I wrote the DoWork method for asynchronous and normal calls. #if SILVERLIGHT [OperationContract(AsyncPattern=true)] IAsyncResult BeginDoWork(bool opt, AsyncCallback callback, object state); string EndDoWork(IAsyncResult result); #else ...

Self tracking entities return Unchanged in my WCF service

I've set up a little n-tier web application using MVP (Model View Presenter) in the front-end, a WCF service on the backend, which communicates with the BLL an behind that the DAL, which communicates with the EF4.0. This is all working quite nicely, I've created several Get and Add methods which all work. Now I wanted to create several ...

Webservices vs WCF

I am working on an asp.net application (.net 4 framework) design and was wanting to know what are the pros and cons and best practices for using webservices vs WCF techology? This application will eventually be used by outside clients to consume data. When would you use WebServices and when would you use WCF? Is one more scalable than t...

WCF and plain-text credentials: Custom SecurityAlgorithmSuite?

So out of the box, WCF doesn't allow me to send WS-Security credentials plain-text as they are expected by CXF on the receiving end. It seems as though different SecurityAlgorithmSuite which doesn't actually encrypt anything would do the trick, but I don't know where to begin as far as what values should be returned by the various prope...

Visual Studio "Add Service Reference" keeps adding "extendedProtectionPolicy" to my config file

When I add a Service Reference in Visual Studio to a service, it keeps adding this extendedProtectionPolicy to my Security Bindings, which on my Win7 machine it works fine. But when I deploy to Server 2003 it errors out saying unrecognized element in configuration file. Removing the line <extendedProtectionPolicy policyEnforcement="Neve...

MSDTC not initiating WCF operation.

I have a windows XP machine CompA in which I have windows form application that is acting as client that will access WCF service operations installed on CompB which runs windows 2008 server. For testing purpose I have only one service on CompB with has a simple operation called WriteName that writes to a single field in a table in the o...

Check availability of WCF Callback Service

Hi All I have a service that uses callback operations to call back its client. Is there a away to notify the client when Service goes down? An exception is raised when client goes down during callback, but with service goes down the subscription is lost but client is not notified. Does WCF support some heartbeat operation to check the ...