wcf

How Do I get returned value from ASMX Service ?

I have an ASMX service. I want to receive a response from it. My code is below: public class UserService : System.Web.Services.WebService { [WebMethod] public string GetPassword() { return "123"; } } ...

Workflow Foundation - Unable to access WCF service

Hello, I'm trying to create a Workflow that need to access a few WCF services. Everytime that I try to add a specific WF In receive de following error : Error 1 Unable to resolve the type 'http://schemas.microsoft.com/netfx/2009/xaml/activities:OutArgument(Dictionary)' referenced by Property 'GetParameterSetResult'. Ensure that the ...

Unit testing WCF

Hi, I am new to WCF. I wrote a service and consumed the service in client application. Now I want to write unit tests for both the server and client. What are the guidelines I should fallow to write unit tests for WCF. I googled and came across different ways to Unit test WCF. But really not sure which one is better. I am using vs20...

WCF service aync pattern feedback on failed transmission

I am working in Silverlight 4 and implementing a Polling Duplex service with an asynchronous pattern used to update the clients. // interface for messages back to client [OperationContract(IsOneWay = true, AsyncPattern=true)] IAsyncResult BeginSendMessage(byte[] MessageData, AsyncCallback callback, object State); void ...

WCF 4 throws an exception when using FormsAuthentication within the containing website.

I have a WCF 4 REST WebService within a folder in my ASP.Net MVC 2 project. JSONP is also enabled on the service using the 'crossDomainScriptAccessEnabled' binding option. The site and service work great. But, I just noticed that if you are signed in to the website (meaning you have a cookie) and then you 'test' an API method by hitting ...

Can we have 1000 operations contracts in one service contract in a WCF service.

Please can any one tell me that we can have 1000 operation contracts in one service contract in a WCF service. Does it affect maintenance when we make changes to these operations contracts? ...

Manage frequently called WCF connection

Maybe I'm missing something basic here, so please correct me if I am. I have a local service and a WinForms app that communicate via WCF, but I seem to end up with a lot of copies of this code in my application: Public Shared Sub MyLocalMethod1() Dim tcpBinding As New NetTcpBinding tcpBinding.SendTimeout = New TimeSpan(0, 0, 5) ...

WCF Windows Service. Can connect locally, but not remotely

I spent two days trying to figure this out and I am stumped. I have a WCF servers running as a service on Windows. A client can connect to it on the same machine, but as soon as I move try to connect to the service from another machine I cant. So if the client and host are on the same machine, no problems. If the Host and Client are ...

WCF client behavior passing token to a service via client behavior not working

I have done the following steps: Client interacts with an STS, which will issue the token. The client uses some other services. The client needs to present the token to any service it interacts with. For this reason I used the client and service behavior. Every time the client calls the service, I put the SamlSecurityToken into the m...

Name attribute on the <wsdl:definitions> tag

I am writing a WCF service and need to control the value of the name atttribute on the wsdl:definitions tag in the generated WSDL document. The ServiceBehavior and the ServiceContract attributes do nothave any property on them that dictates the output value of the name in the definitions tag. Changing the service implementation class nam...

Using NetDispatcherFaultException in OnDeserializing event

I have converted my asmx web service to a wcf service. I have some datatmembers in my datacontract which are to be marked as IsRequired. Now, if the client does not provide me with the required element value, the wcf service throws a System.ServiceModel.Dispatcher.NetDispacherFaultException. But I want to throw a custom error message to ...

WCF Problem with Windows server 2008

i have a weird problem, i have a wcf hosted in a Console Application now i tried it on 3 pcs all running windows 7 it worked fine, but when i take it to the server (windows server 2008) it doesnt work , now i checked firewall and everythings ,i cant seem to get it to work no matter how hard i tried , im not sure if this is has anything t...

I need my custom MembershipProvider to throw an exception on ValidateUser

I created a custom Membership Provider which is now working in production just fine validating my WCF calls. I do have an issue every now and then that for some unknown reason my provider cannot validate the user. In those cases I do not want the ValidateUser function to just return false, so I thought of throwing and excception with a ...

Best practice authentication when working with WCF web services

I am looking at adding a custom authentication for my WCF web service and is wondering which the "industry standard" best practice for web service authentication is? I need the web service to be supported from many different coding platforms with minor configuration. Thanks! ...

What is the difference between N-Tier and SOA architecture

As per my understanding regarding N-Tier and SOA architecture. N-Tier N-Tier means dividing application into layers, Example I am developing application in asp.net and I pushed total DB Layer to WCF then it is called N-tier.[Tightly coupled] SOA[Loosely coupled] As per my understanding regarding SOA its very generic term and how well...

WCF data boundaries design

Hi, this is more of a design question: lets say that I have some internal type definitions that I absolutely want to keep secret (not exposed to my service consumers. However, i do need to exchange data with the service users. some of the types I want to share with the users are exactly the same as the internal ones while others are ...

Passing DTO's from a seperate Project to UI Layer WCF RIA services

Hi, I have a solution that I have designed with 5 layers. They are: UI/Presentation Layer Service Layer Business Logic Layer Data Access Layer DTO/Common Layer (IQUTECHDTO) I want to pass the DTO to the UI. Below is the service layer that exposes a method GetVendors which I want to return the VendorDTO. This object will populate a...

Error when porting WCF project from VS 2008 to 2010

I am getting a strange error after trying to compile under 2010. The compiler doesn't seem to understand my [DataMember] attribute: error CS0246: The type or namespace name 'DataMember' could not be found (are you missing a using directive or an assembly reference?) Shouldn't this all be defined in System.Runtime.Serialization? Any in...

Does "Add Service Reference" in VS 2010 Bring in a .NET 4.0 Dependency Even when Targetting .NET 3.5?

I have some concerns about using the "Add Service Reference" dialog in Visual Studio 2010. When I look at the files it generates, they contain references to 4.0.0.0. However my project is targeted to .NET 3.5. Is this going to be a problem? Or is it just the generation tools using .NET 4.0? Examples: configuration.svcinfo <?xml versi...

Function evaluation timed out

Hi, I am using linq to sql in a Silverlight application and I keep getting this debug error.. http://www.freeimagehosting.net/uploads/bf4055b4ee.jpg This code runs when the application is started up without problems. When I call it the second time, I only get a few of the results. When I add a breakpoint to the WCF service I get the fo...