wcf

Would you use WCF Linq and JSON for an API

Ok Im building AN API but also wanting to have that API used by my own Application. I am pondering WCF, LinQ and JSON for my Webservices and Data and Silverlight for my application. I have a few questions. 1) would you recommend XML over JSON or Json over XML? a) is Json going to transfer and deserialize faster natively or is XML g...

NHibernate on WCF Dependency Injection

Hi, I would like of inject a wrapper of my sessionfactory in my wcf service, but my service is in other server and I want set nhibernate in my site asp.net. I have a interface as: public interface ISessionBuilder { ISession Current{get;}; void Close(); } public class SessionBuilder : ISessionBuilder { static SessionBuilder() ...

WCF, ASMX Basic HTTP binding and IIS

Hello, I have been doing a lot of work with WCF "self" hosted applications. I recently was requested to write a web service where the calling client was a Linux based program named "WGET". I would like to use WCF instead of a traditional ASMX web service. The web service is returning a standard XML response. I am not sure of the underli...

Using threads and event handlers within a WCF Web Service

While making a WCF Web Service, I came across a problem while using a method with a webbrowser control. The method starts a thread and uses a webbrowser control to fill in some forms and click further, waiting for a event handler to fire and return a answer I need. The method is tested and works within its own enviroment, but used in a W...

HTTPS WCF web service on cloud

Hi, I want to create a HTTPS WCF web service on azure and want to use it in a desktop application. Can any one guide me in right direction to achieve this? ...

Wrap MemoryStream in a using block REST WCF

I'm learning REST to implement some Services with WCF. I implemented an example with a MemoryStream. Because MemoryStream is Disposable I wrapped it in a using. When I do this I sometimes can see the xml response in the browser (IE8) and sometimes it will just show me the following Errormessage: The download of the specified resource h...

Use Azure Appfabric on a local system

Hi there, we want to use the azure appfabric for our software. But not every customer wants to buy an expensive azure account. Is it possibile to define and use an azure interface in our software but to connect the server and client local? Mimefilt ...

How to configure WCF service in IIS7: HTTPS, Sessions, wsHttpBinding (SOAP)

The situation: We have Windows 2008 web serverse with IIS7, (.NET4) We can comminicate with the webserver only through the default HTTPS (443) port There is an ASP.NET website hosted on the servers, the service is part of the website code. Some clients (desktop applications with WCF support) want to communicate with our new WCF ...

Weird Visual Studio Bug - Recurring Exception Thrown

I've encountered some very strange behaviour when debugging in VS 2010 with a WCF Service. Here's a snippet: public MapFileInfo[] ListFiles(string user, string pass) { return s.ListFiles(user, pass); } I want an exception to bubble up to the main application if authentication fails. However, what actually happens during debug mod...

WCF Service : WSHttpBinding

Hello, I've created the test self-hosted wcf application and tried to add support https. Code of server application is: using System; using System.Security.Cryptography.X509Certificates; using System.ServiceModel; using System.ServiceModel.Description; using System.ServiceModel.Security; namespace SelfHost { class Program { ...

Problem with Silverlight/wpf in scrolling html div.

Hi all, I have a Silverlight object sitting at the bottom of a scrollable div. This object is submitted to a wcf backend via a javascript button. The problem is, as the silverlight is at the bottom of the scrollable div it is not viewable until you have scrolled down. This is generating an error when the javascript button is clicked ( ...

WCF: 'Update Service Reference' hoses my files.

Every time that I make a change to the contract of my WCF service, I need to have Visual Studio update the service references in all of my client projects. This process regenerates my client's app.config file and, since I have hand-tuned the "bindings" section of the file, I need to back-up my file and then restore it each time I have...

Silverlight solution builds in VS2008 but fails with MSBuild

I have a Silverlight solution that I want to create a build script for. I have a simple script that looks like this call "c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" msbuild %CD%\V1\Incentive.sln /target:Rebuild /property:Configuration=DEBUG;WarningLevel=2 msbuild %CD%\UI\IncentiveUI.sln /target:Rebuild /propert...

WCF: Comparisons between not closing ChannelFactory vs. constantly recreating the ChannelFactory and closing it

I have a WCF service that I consume in my code and generated as a ChannelFactory class. I know that the proper way to consume the WCF is to create the ChannelFactory (let's call this AwesomeClient), do the work, then call Close() on it. Here's my snippet: public static void DoSomething() { var client = new AwesomeClient(...

How to catch 'exceptions' for out of order execution in Workflow Foundation 4?

Hi, I am attempting to model a worklfow using a "WCF Workflow Service" in .net / vs 2010 that needs to handle out of order execution gracefully (but not allow it - if thath makes sense!?) For example I have 2 receive activities one called Initialize and the other called GetValue inside a FlowChart. In most cases Initialize should be c...

How to generate a client certificate from configuration.svcinfo file

Hi, I am new to WCF and trying to create a WCF client. I created a project in VS 2008 and added the reference of WCF web service and it generated the WSDL,configuration.svcinfo and other relevant files. Now i would like to know how to create the client certificates based on these available files? In the .svcinfo file, i see that there a...

.NET Web Service (asmx) Timeout Problem

I'm connecting to a vendor-supplied web ASMX service and sending a set of data over the wire. My first attempt hit the 1 minute timeout that Visual Studio throws in by default in the app.config file when you add a service reference to a project. I increased it to 10 minutes, another timeout. 1 hour, another timeout: Error: System.Tim...

Hosting WCF app in IIS 6 - localhost replaced with machine name

Hello again, I've recently moved my Silverlight solution off of Casini (one for service, one for SL app) and over to IIS to simulate production. It's one website on a port (localhost:2002) containing two web applications, one for my SL app and one for my WCF service. Everything works fine in Casini with a clientaccesspolicy xml file, bu...

WSE 3.0 Client calling WCF Service with Username Token - Example

Can someone please provide a complete example of the following scenario with code: WSE 3.0 client - consuming WCF service. WSE client is using username token in code. WCF service needs to authenticate username token. Thanks ...

WCF configuration for WebHttpBinding(Restful) for supporting both HTTP and HTTPS

We are using AJAX Cascading dropdown and AutoComplete functionality with Restful WebService Services providing data. With one endpoint(non-secured) eveything was working fine, until we tried same web page with https. Our Webappplication needs to support both. Our of very few articiles/blogs on this issue I found 2 which applies to my req...