wcf

Can everything be done programmatically in WCF or are configuration files for certain features?

I have a strong preference for working in code, leverage IntelliSense and opening up all of the power of the C# language to work with WCF but I want to make sure that I'm not moving in a direction that ultimately will limit the WCF feature set I can access. My experience is so limited with WCF that I don't understand the benefits of usi...

Get listing of web services referenced in WCF application?

Hi, Could anyone out there give some pointers on how to go about getting a listing of all the web service references used by a WCF application - the pseudo code I'm envisioning might look something like: For each ws in MyWebServices Console.WriteLine("Service Name: " & ws.Name) Next How to build the MyWebServices object is what I ...

Add event handler for WCF concrete class instance

Is it possible to retrieve the concrete class instance from the ServiceHost, so that I can add an event handler for the events of that class? Public Class Widget Public Event MessageCalled(sender as object, e as EventArgs) Public Sub DoSomething() '-- do a whole lot of stuff --' RaiseEvent MessageCalled...

Clientaccesspolicy.xml randomly not being requested

Hello there, I have a silverlight 3 application running on a seperate domain that my WCF services. Using both fiddler and Web Dev Helper I am able to see that when I make a web service call SOMETIMES a request is made to clientaccesspolicy.xml and everything works great. The issue is that is doesnt always make this request. When it d...

StructureMap (or any IoC) and WCF

Where would one bootstrap StrucureMap in a WCF service? Completely lost here at the moment.... ...

WCF Serialization Return - Noob

I have an object which I serialize nicely into this: <?xml version="1.0" encoding="utf-8" ?> <people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" userID="AX12345"> <group groupID="1234_ABCD"> <person name="Name 0" id="0" /> <person name="Name 1" id="1" /> <person nam...

How to generate SOAP message from a WCF service?

Hi All, Is there any way programmatically or any tool by which i can generate SOAP messages from WCF services ? ...

WCF Disable Deserialization Order Sensitivity

I have a recurring problem when passing Serialized objects between non-.NET Clients, and .NET WCF Services. When WCF Deserializes objects, it is strictly dependant upon the order of properties. That is, if I define my class as: public class Foo { public int ID { get; set; } public int Bar { get; set; } } Then WCF Will ser...

Sending raw SOAP XML directly to WCF service from C#

I have a WCF service reference: http://.../Service.svc(?WSDL) and I have an XML file containing a compliant SOAP envelope <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt; <soapenv:Body> <MyXML> ... Now, I would like to send this raw data directly to the service (and receive the response) ...

Deploying a WCF service to the shared host environment

I created a very simple WCF class library and added this project to the solution that has a web project. I added a reference to the service from the web project. Locally, everything works as expected. When I do a copy site to my hosting provider, I get all sorts of errors. Currently I have this error: Parser Error Message: The binding ...

WCF DataMember Serializing questions

Ok, so I was part way through the long winded process of creating DTOs for sending my model over the wire and I don't feel like I'm going down the right route. My issue is that most of the entities in my model are not much more that DTOs anyway. I basically have an anaemic domain model, which is fine but it also make me wonder if I nee...

WCF, client can't connect unless on same machine

Hello, I have a simple ASP.NET web app which uses a WCF Client to talk to a simple WCF backed Windows Service. All worked fine in local environments. We deployed to dev, which also worked fine. However on DEV - the Web server and App server are on the same machine. Now that we have deployed to QA, we get the 'The socket connection was...

WCF Problem Sending Object To Client

Background Converting from using .Net Remoting to WCF. Most of the methods on the WCF server are working fine, but ran into one that isn't working today. This is the service contract: [ServiceContract] public interface IMyService { [OperationContract] generated.Response.ACS_Response Check(generated.Request.ACS_Request request); }...

Make a single WCF service support both SOAP, REST and WSDL

I'm trying to build a C# service in .NET 3.5 that supports both SOAP - and shows the WSDL - and REST. The SOAP service and WSDL generation was easy enough to do using the ServiceHost and a BasicHttpBinding classes. Got that working and the client was happy. Because the SOAP calls all used simple parameters, the client developers reque...

Ajax call using large querystring value fails

I have a Ajax call using asp.net scriptmanager. Which behind the scene takes the data and adds it into url as query string and making get call. But when that data is very large it fails. I think if i can increase querystring maxwidth it will be resolve. How can i change maxquerystring size in asp.net. Also error is not due to browser ...

WCF String DataMemeber fails with special characters.

Hi guys, I have a simple DataContract structured in this way: [DataMember(EmitDefaultValue = false, IsRequired = true, Name = "TablePath", Order = 1)] public string TablePath { get; set; } The Value that I try to insert is something like that: %PATH%\%SPECIAL%\file.txt And I receive this message using the WCF Test Client UI...

Error using WCF and DataContractSerializer

I have a fairly complex object model that I'm trying to serialize using WCF. I'm running into a problem where I can create a new instance on the server and return it to the client, then trying to pass that same object back or even serialize it using the DataContractSerializer throws an exception. Test method Server.Service.Test.Seriali...

'Microsoft.Web.Services3.Addressing.Address' cannot be serialized

I'm trying to write a WCF wrapper web service for a WSE3/ASMX web service. [The ugly reason why is that a 3rd party vendor won't support SSL and that is what's needed for BizTalk 2009 WCF adapter to work with WS-Security. So if the vendor doesn't change - I need to call a local WCF web service...] I followed this article to get the ...

Self-Hosting WCF with Self-Hosting WebServer (HTTPListener) on the same port. Possible?

Hi, I'm working on an app and I need to provide a web interface to it. I was thinking about using WCF to provide a service for the web interface, and self-host both with my app (no IIS). Now, if those two are not using the same port, the browser will complain about XSS... Is this possible? Is this a good idea? EDIT After some investig...

How to keep a WCF site online?

I have an WCF site on IIS 7. The site is rarely being accessed which causes the application to unload. How can I keep the application (WCF) up all the time? ...