wcf

There are 6 entries for the tag wcf

Debugging Wcf Services in Silverlight 2

The current Beta 2 release of Silverlight 2 is not very informative when there is an error from a Wcf service that you have referenced. Currently all errors materialize in a http 404 no matter what their origin and you will end up seeing something like this: To get the real exceptions you will need to wait for the final version of Silverlight 2, but for now you can use WCF diagnostics to help you out. In your web app that is hosting the service, right click on web.config and select Edit Wcf Configuration (I don't see this...

Silverlight Wcf: The remote server returned an unexpected response: (404) Not Found.

EDIT:  See http://www.bbits.co.uk/blog/archive/2008/09/12/debugging-wcf-services-in-silverlight-2.aspx for further help on this.  Keep getting this error on a Silverlight 2 B2 project that is referencing a WCF service in a Web Site (not web project). There doesn't seem to be any reason for it, and it happens intermittently, however the workaround I have for it currently is to simple open up the cs class for the service and make any edit (e.g. just add a comment line) and then build.  This seems to fix it for a while. Hope there is a better solution long term, or a fix for this somewhere... Ian   Technorati Tags: Wcf,Silverlight

Bridging Web Service Calls in Silverlight

For security reasons, the Silverlight version 2 runtime restricts access to certain classes of URLs from the WebClient and HTTP classes in the System.Net namespace.  The main requirement is that the services you want to use should implement either crossdomain.xml (which is the Flash policy file) or clientaccesspolicy.xml (which is the Silverlight one).  If the service you want to use does not implement one of these then you can't use Silverlight to access it. However such restrictions are not present when using WebClient on the server, so you can easily create a bridge service that your Silverlight client can use....

WCF: "a non-empty contract name must be specified"

This error had me baffled today, and I could find little reference to it from Google or Live Search. It was the result of creating a simple WCF Service with two methods as follows and then trying to add a reference to it from Silverlight 2: [ServiceContract] public interface IWcfService { [OperationContract] string HelloWorld(string name); [OperationContract] List<Person> GetPeople(); }   public class WcfService : IWcfService { public string HelloWorld(string name) { return "Hello World " + name; } ...

Silverlight ObservableCollections from WCF and Linq to Sql

I have a ListBox in a Silverlight 2.0 app that is bound to some data coming from a WCF service that is returned from Linq to Sql.  The service is simplicity itself:   public List<CourseSection> GetCourseSections() { CoursesDataContext db = new CoursesDataContext(); return db.CourseSections.ToList(); }   Note: you have to mark your DataContext Serialization Mode as Unidirectional for the above to work (as shown)   I added a Service Reference to this from Silverlight and bound the data to a ListBox: private void Button_Click(object sender, RoutedEventArgs e) { CoursesService.CourseServiceClient client = new CourseBuilder.CoursesService.CourseServiceClient(); client.GetCourseSectionsCompleted +=          ...

Missing WFC Service Configuration Editor?

When you create a WCF Service in  VS 2008, it writes the service config into web.config. Usually you can right click on web.config in Solution Explorer and select Edit WCF Configuration. However I have noticed that the context menu item does not always show up.  The answer: Select Tools > Wcf Service Configuration Editor instead; this will bring up the editor with nothing loaded, so you will then need to open the relevant config file.  However, just starting the editor seems to be enough to remind Visual Studio about that context menu item, so just exit the editor and go back and...

«September»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789