wcf

WMI to change logging levels in WCF?

I see a bunch of articles on MSDN on how WMI can do all kinds of things, and even a mention of how I can use AppDomainInfo to change the logging and tracing levels at runtime using WMI, but no code examples or implementations anywhere. Has anyone done this? I'm using .net 4.0.. ...

WCF Streamed/chunked upload?

I would like to add uploading files to my WCF REST web service, but I don't want an entire file to be uploaded - only 16kb portions of the file at every 256kb need to be uploaded. So the user of the REST service doesn't have to faff around doing this, is it possible for a WCF service to only recieve certain portions WITHOUT uploading th...

WCF hosting in Windows Service?

Sometimes I see people hosting a WCF Service using Windows service and sometimes WCF Service hosted using IIS? What is the big difference? In which scenarios we need to go with method 1) and in which scenarios we need to use method 2) ...

Wcf System.InsufficientMemoryException. Failed to allocate a managed memory buffer of 536870912 bytes.

Hi guys I have a WCF service method that returns a big byte[] array around 2 mb in size. However when i run that method from the WcfTestClient, I get the following exception. System.InsufficientMemoryException Failed to allocate a managed memory buffer of 536870912 bytes. The amount of available memory may be low. I have searched on ...

WCF Https vs Http.

Hello, There are two samples: for http: using System; using System.Net; using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.ServiceModel; using System.ServiceModel.Description; using System.ServiceModel.Security; namespace ConsoleApplication1 { internal class Program { private s...

Self-hosted WCF service has HttpContext.Current == null despite the fact that AspnetCompability allowed

I'm using self-hosted (programmatically hosted) WCF-service in Web Application. I placed the [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] attribute to the SampleService class and placed <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false"/> e...

Can we upload a file size of 500MB uisng WCF Service?

I have written a WCF Service to upload a file. So far i am able to upload a file size of 300MB. When i tried further i am receiving an error mentioning "The underlying connection was closed: The connection was closed unexpectedly." I have increased the buffer size to 2GB in WCF service as well the client DLL[Uisng Channel factory] . A...

Get the username that runs the executing AppPool

In ASP.NET or WCF is it safe to use ServiceSecurityContext.Current.WindowsIdentity.Nameto get the current username that executes the current thread? I want to ensure that the correct user is impersonated in my WCF Service. ...

WCF WebService Security: How do I use security on a WebService?

I created a simple .NET WebService (it just passes back a string). How do I modify the server side (and possibly the client side) so that it also uses a username/password to validate before sending a response? Client Code: static void Main(string[] args) { UpdateClient client = new UpdateClient("UpdateSOAPIIS"); client.ClientC...

Can WCF handle a non 200 response?

Perhaps I'm overlooking something, but can client WCF not handle a server response that isn't a 200? For example, I'm trying to consume a service that returns a 400 when you asked for something naughty, but the body of the response is still a perfectly good and consumable SOAP message. It does the same for requested data that doesn't exi...

WCF logging not working, trying to get ANY information on why services don't work

Hi, I have deployed a few WCF services to a server via a web setup project they are being hosted in an IIS Application, which appears to be running fine. However when i try to navigate to the wsdl, nothing is found. I am trying to set up diagnostics logging, to get some information. I have followed the advice from here: http://stacko...

Error 407 when calling WCF web service via a Windows-authenticated proxy

I have the following setup: Server machine running a WCF service exposed via an IIS application that requires Windows authentication. A proxy server (Squid) requiring Windows authentication. A client machine running a Windows service which tries to make a connection to the WCF service through the proxy server. The service is set with a...

Having problem with WCF Service with static data.

Update: with help from Henk, determined that public Dispose() is being called, which in turn calls private Dispose(true). This is my first implementation of IDisposable interface, so not sure if it is correct. I don't call Dispose explicitly anywhere. It seems that WCF architecture is calling it on exit from each OperationContract mem...

How can I check if two different URL's point to the same resource?

Lets say I have a web site hosted on a computer named "linux" and it is part of two different networks with the addresses 192.168.1.1 and 10.1.1.1. When working locally on "linux", I can access this web site through the following URLs : http://192.168.1.1/ http://10.1.1.1/ http://linux/ http://localhost/ http://127.0.0.1/ Working o...

When I use "Add Service Reference", I can't see optional method parameters.

I'm working on a WCF Service. I have one service operation Function getValues(Optional verbose as Boolean) as List(of String). This works: ' First, add a file reference that contains the iRM interface. Dim ep3 As EndpointAddress ep3 = New EndpointAddress("net.pipe://localhost/RM/RMPipe") Dim netPipeR...

How do you add content to a tab control dynamically in wcf?

How do you add content to a tab control dynamically in wcf? I mean add content to the display area that comes visibile when clicking on the tab control. Allow me to rephrase this. I have a WCF app. In this app, I have a tab control that id defined in the XAML. It is easy to add content to the pages of the tab control in the XAML. H...

400 Bad Request HTTP Response using a WCF POST via JQuery

Having trouble getting my JQuery POST to be accepted by the WCF Service. Here's the POST from the javascript: function jqueryPost() { var url = "/LoggingTest"; $.post(url, { message: "test message" }); } This is how I'm accepting the POST, via an Interface: [OperationContract] [WebInvoke(Method = "POST", U...

How to secure WCF with Third party certificates?

I am hosting a secured WCF service (transport level security) which needs to authenticate users with third party client certificates. To accept those client certificates, I have binded my IIS7 with third party Server Certificate. Theoretically speaking this should work perfectly. But it is not, It continues to give error as The HTTP req...

[WCF] REST, how to send data from the client to the server using POST?

I am struggling sending data from my rest client to my rest server... I have created a rest server sending xml to the client, and that works well. However, sending data from the client to the server, I am having a hard time. Client: _httpClientRead = new HttpClient("http://127.0.0.1:8000/"); var form = new HttpUrlEncodedForm(); form.A...

Questions about common patterns in WCF, in a layerd architecture

We're about to set off our first larger WCF project, and we're having some concerns on how to layer our application correctly and where all the patterns go. The services will primarily be consumed by applications on the Intranet, and secondly by customers over the Internet. Our idea was to layer the application this way, inspired by DD...