wcf

WCF Data Svcs, Silverlight client BeginSaveChanges does not work with stored procedure as UpdateFunction of a View as entity in the entity model?

Hi, WCF Data Services and Silverlight client BeginSaveChanges does not work with stored procedure as UpdateFunction of a View as entity in the entity model? I have specified stored procedure as UpdateFunction in the entity model specified as update function of a view. From the Silverlight client I call WCF Data Service. I also have a M...

Am I deadlocking? Why?

I have a Silverlight 3 application which needs to call WCF service. The WCF service in turn calls an ASMX web service. When the WCF service call completes, the silverlight UI needs to be updated. WCF is being called in async. The thing is that the Silverlight app needs to call the WCF method(which later calls asmx internally) hundreds ...

Why would I need WCF for building RESTful services?

I've recently discovered a way to implement RESTful services using Global.asax (by handling the Application_BeginRequest event). Basically, I am saying it is possible (and easy) to implement a RESTful web service in classic ASP.NET, without any need for WCF. It takes approximately 30 lines of code to figure out which method you want to ...

WCF Data Services UpdateObject not working

Hi, I have a Silverlight client with a grid getting data from WCF Data Service. Works fine. However if I want to update some changed grid row, the service data context UpdateObject is not working: DataServiceContext.UpdateObject(MyGrid.SelectedItem); foreach (Object item in DataServiceContext.Entities) { // } ...

Should I use WCF or raw sockets?

I wish to develop a client-server application in .NET that functions as follows: Clients connect to a central server. The server needs to keep track of which clients are connecting, and it must allow only those it knows (I have a repository of allowed clients). This is because in my application, it's critical to know who all are presen...

Add New Row to a DataGrid in Silverlight WCF RIA Services...

Some guidance with Silverlight WCF RIA Services... DataGrid and detail view on the same page Control layout DataGrid Detail View [Add New Row (button)] If I wanted to add a new row from a button then pick that new row in the datagrid how would I do that? I have tried: DetailViewTest.Web.Services.Mode1DomainContext ctx = (Mode1DomainCon...

send image via web service

I want to write one program by visual studio 2008 (C# and ASP) that has web application and windows application. I want to get clients images in web app(upload) and store them in DB (mysql) then send these images to windows app via web service (so i new web service, not web site). But i have 2 problems: I have 2 ways to store image...

Singletons in web- or WCF-services

Hello, for a while I wonder if it is a good idea to store some data in a singleton when writing a web-(or WCF)service. The goal is to reuse this information in different calls of the service. I wonder what's the lifetime of those singletons, because for example when the application pool is recycled, the singleton is gone. Next Question ...

Why does adding a service reference generate the same class twice

I'm trying to create a simple RESTful interface to my data. I've created a WCF web service and decided to use LINQ to SQL to connect to the database. Instead of making simple pass through objects, I decided to try just serializing the objects created by my LINQ to SQL dbml. I changed the Serialization Mode of the dbml to Unidirectional t...

WCF RequestFormat for WebGet and WebInvoke

I have WCF services exposed using WebGet and WebInvoke that require the data to be wrapped in xml. I would prefer to be able to return raw data without it being wrapped in xml and also allow clients the ability to invoke my service without needing to wrap the request in xml. I'm serializing the data using protocol buffers and convertin...

Silverlight 4 HttpWebRequest throwing ProtocolViolationException

I'm invoking a REST service via http which returns a stream as the response. My client code looks like so: Uri uri = new Uri(remoteAddress); var webRequest = (HttpWebRequest)WebRequest.Create(uri); webRequest.Method = "GET"; webRequest.ContentType = "multipart/mixed"; ...

How to browse through the deserialized object

Hello, I'm receiving deserialized object using WCF (trying to get latitude and longitude using google api) however after that I need to get inside that object I received and obtain values for two properties which I'm interested in: public double Lat { get; set; } public double Lng { get; set; } Those are nested inside the object. Her...

Silverlight WCF service calling exception

Hi; A Silverlight 3.0 application tries to call WCF service but the application can not even establish connection to the endpoint. I had checked URLs etc. and every thing seems ok. Accessing the service from other tools like browser works. When I debug application in Visual Studio when the first call to the service is made below output i...

WCF: How to use AllowInsecureTransport

Within the context of .NET 4 WCF, I am attempting to use the new AllowInsecureTransport attribute so that I can use my custom authentication without using SSL (in our development environment only - we are using SSL in production). My bindings config looks like: <bindings> <wsHttpBinding> <binding name="CustomAuthentication"> ...

Error hosting a WCF REST Service on Apache Webserver

hey guys, I have a problem hosting a WCF REST Service on a Apache Webserver. When I call the Service locally on the Server where the apache runs I have no problems but when I try to call the Service from a remote Computer I get the following error: No protocol binding matches the given address... . Protocol bindings are configured at t...

How to ship WCF application with certificate requirement?

We have created a client-server system WCF, and implemented custom validator as described here: http://blogs.msdn.com/b/pedram/archive/2007/10/05/wcf-authentication-custom-username-and-password-validator.aspx . In order to enable username and password authentication server part must have a certificate. Following another tutorial, we've c...

WCF Authentication using basicHttpBinding and custom UserNamePasswordValidator

My first question is, is it even possible to use a custom UserNamePasswordValidor with basicHttpBinding? I have a asp.net web site using Forms authentication and a custom membership provider. I realise that I could use the built in System.Web.ApplicationServices.AuthenticationService to authenticate my client (a WPF app) but I don't wa...

WCF: Windows service cannot find endpoint when hosted in Winforms application.

Hi I require a Windows Service to make WCF calls to a service hosted in a WinForms application. Unfortunately when attempting the call the Windows Service fails to discover the Endpoint. I have tried changing the Log On properties for the Windows Service to allow interaction with the desktop, however this did not help. I have used th...

Adding WCF Service Reference doesn't generate code

Scenario: Web Site project under .NET 3.5 Visual Studio 2010 WCF Service reference Problem: I'm trying to extend a class marked with the DataContract attribute. I though the generated class was declared partial, so that i could easily extend it. I tried declaring a partial class within the same namespace with the same name, bu...

Accessing ServiceHost in WCF from another Servicehost C#

I have 2 contracts hosted in two servicehosts i need to have a singleton object in the first contract so when the other servicehost try to create an object from that class it just retrieve the same object from the first servicehost, which might mean i need to find away to access the servicehost and get the object from it instead of cre...