wcf

How can I do WCF Non-HTTP Activation with .Net 4 ?

Hi, I have a .Net 3.51 service which uses Non-HTTP Activation. This works fine. I want to convert it to .Net 4. In Windows 7, if you go to Control Panel, Add Remove Programs, Turn Windows Features on or off, there is a "Microsoft .NET Framework 3.5.1, WCF Non HTTP Activation" item. How would I do this for .Net 4 ? Mark ...

ASP.NET/WCF: Why are logical/physical threads dropping on full GC cycle?

Hi, recently I record several hours of .NET Memory counters of a WCF service. The service is hosted in IIS on a Win2k8, 8 core, x64 with 20GB ram. I can see the GC being pretty healthy, performing a full collection only approx. every 2hrs! I noticed that in the very same time period, the number of physical and logical threads increase...

WCF: The remote server returned an error: NotFound.

I have written a very simple WCF service, that worked fine (code below), then I added a bunch of further methods (which are exatly the same, apart from the reference different tables). However for some reason, I get the error "The remote server returned an error: NotFound." when I try and call the new methods (I have refreshed the servi...

Specify HTTPS for custom WCF Binding

I have an custom binding defined as follows: <customBinding> <binding name="binaryHttpBinding"> <binaryMessageEncoding /> <httpTransport /> </binding> This is used for an endpoint that a Silverlight 3 application uses to connect to the service. This works fine under HTTP, but i would like to specify this binding to use HTTPS and ...

How to respond to HTTP GET with .net and XML

How to respond to HTTP GET with c#/.net and XML What I am trying to is when another service call posts to a get with say 5 parameters. This service would respond with an appropriate xml file. Is WCF the way to go? Any good examples out there? Is this way easier/faster on some other platform? ...

WCF service stop sending web requests once it's hosted in IIS

I have a WCF service that receive query from a silverlight client and send the query to a Search API (Bing, or Google), process the search results to return those back to the silverlight client. Everything works find in Visual Studio. Once I publish the service in IIS, I can access the service endpoint and the silverlight client to ta...

how to use the function in WCF RIA service in aspx code behind?

My silverlight application can use the RIA service perfectly, but now I need to have a aspx page to use the same functions in the RIA. the aspx is placed in the same project of RIA, how can I use them in aspx code behind? Thanks ...

How to cancel a long running WCF requests from silverlight 3

I have a silverlight 3 application that makes several long running requests to a WCF service. While these calls are in progress, any other later WCF calls are queued by silverlight 3 because it will only do two requests at the same time, thus making the application suck :( How can I cancel the long running blocking requests? ...

Adding a REST head to a WCF/RIA DomainService in November Beta release (VS2008)

I want to expose my RIA DomainService with a REST head as described in this tutorial by Brad Abrams: http://blogs.msdn.com/brada/archive/2009/07/15/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-part-5-astoria-add-reference-and-winforms.aspx It seems the tutorial was targeted at the July 09 RIA Services rel...

WCF REST + Windsor error handling

I want to handle application's internal exceptions in a consistent way so that REST web services return errors in a RESTful way. I'm using Castle's WCF integration and I couldn't find any good sources on how to do handle errors using WcfIntegration.WindsorServiceHostFactory. The only solution that comes to mind is to use Castle's inter...

WCF- Meta Data Exchange Configuration

I have defined two endpoints in my App.Config file as <system.serviceModel> <services> <service name="HostDirectAddress.ITestService" behaviorConfiguration="behaviorConfig"> <endpoint address="net.tcp://localhost:9000/ITestService" binding="netTcpBinding" ...

Is it possible to call an instance method from a static constructor in WCF service?

Is it possible to call an instance method from a static constructor in WCF service? Is there something like current context through which I can get the current instance of MyService? public class MyService : IMyService { static MyService() { //how to call Func? } private void Func() { } } EDIT: This q...

Can SynchronizationContext.Post or .Send lead to exceptions?

Hi I've read all recommended articles on SynchronizationContext, but there is one small question I did not find an answer for. In my case I have an event handler that calls a Log() method that outputs text to a TextBox. Log() is called from a WCF service. The event is raised from WCF client instances (threads). Usually, I check Control.I...

Windows Authentication using WCF and Self Hosting

Hi I've developed a very simple host and client which I wanted to use to test whether it would be possible for a WCF client to pass the logged on windows' user's credentials to the host service without requiring the user to re-enter their credentials or setup security. My host config looks like this: <configuration> <system.serviceM...

ASP.NET WCF Syndication Service : Firefox doesn't recognize RSS 2.0 feed

Hi, i have created new WCF Syndication Service Library in Visual Studio to publish web content in RSS 2.0 and ATOM formats. If i open xml feeds in IE it works ok and shows it human-friendly. In firefox works only with ATOM. RSS feed it show as an ordinal XML file. [ServiceContract] [ServiceKnownType(typeof(Atom10FeedFormatter))...

Using a ReceiveActivity in a Sharepoint Workflow

Hi, I've made my first little workflow in sharepoint and I am trying to access it from the outside using a ReceiveActivity. I have created a WCF svc file with <%@ ServiceHost Debug="true" Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory" Service="SharePointWorkflow.MyWorkflow, SharePointWorkflow, Version=1.0...

what is the URL for WCF post?

what is the URL for WCF post? I create a VS 2008, WCF method like this [WebMethod] public string TestMethod(string param) { return "param:" + param; } so then I go to http://localhost:57000/Service1.asmx?op=TestMethod But how do I do a post to this? On the test page it says HTTP POST The following is a sample HTTP POS...

Mono : Is it possible to host a web/wcf service from console application?

I know with .NET we can host wcf service from a console application without the need of webservers like IIS or apache. Is it possible to do the same with Mono 2.6.1 on a RHEL 5 or CentOS? Any links to any documentation will be highly helpful. ...

WCF Static Variable Getting Reset with Each Call

I have a WCF service that I am calling from multiple clients. I need to store and manage a value globally. On my service I have the following attributes: [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)] In my service I have something similar to this: private static int coun...

WCF - reading an xml file in a service using XElement.Load

Hi folks, i have a simple xml file in a wcf service that i am trying to load using Xelement.Load("sample.xml") which is not reading the file. What's the right way of doing this? The service is supposed to return an xml to an asp.net application. TIA ...