vb.net - How do I properly set up a Silverlight-Enabled WCF Service? -


edit : I voted a closed vote because I resolved this issue . I was doing everything fine, but a reference to the ASP URL was written that I was downloading and uninstalling some time ago was a reference in IIS. Posted by this forum (with one step) tracked me down by accident. When I launched the run command, IIS told me that this (obviously) rewrite DLL could not be found. I removed the reference and after that the app got cured.


I'm following the tutorial. What I am currently trying to do, but I am walking in a wall under the title "Create Web service " (about half way down).

First of all, when I add a new creation service to the solution, the tutorial indicates that three files should be created; IService1.vb , Service1.svc , and Service1.svc.vb . I can not find the IService1.vb file when I add a service to the solution. I have a copy of the project they provided, and the Service1.svc.vb file is in it, so I manually added one and copied the contents of the file. The tutorial says that this is a VB tutorial, but this can be a problem in the screenshot simultaneously.

When I make all the files as tutorials (copy / paste to ensure that I have no error writing), I can add service reference and try to get the following error:

type KeyboardControl_Web.Service1 service class both defines a ServiceContract type .IService1 a ServiceContract heritage KeyboardControl_Web. The legacy of the contract can only be used between interface types. If a class service is marked with content attachments, the service should be the only type of hierarchy with content attack. Consider typing KeyboardControl_Web.IService1 ServiceContractAttribute on a separate interface to write KeyboardControl_Web.IService1 tools.

I tried googling different parts of the message but found not very useful. Here is the code for the "IService1" Information

There are files class name change:

  // IService1.vb import SystemkServiceModel 'Note, you Vebsonfig The references to "iisis 1" must also be updated. & Lt; ServiceContract () & gt; _ Public interface IService1 & lt; Operation Contract () & gt; The _ function GetAllLocations () list (address) end interface //Service1.svc.vb Imports Microsoft.VisualBasic Imports System Imports System.Collections.Generic Imports System.Linq import System.Runtime.Serialization Import System.ServiceModel Imports System.Text Note ': If you change the class name "Service 1" here, then you should refer to the web in the context of "Service 1". In the config and also in the 'related SSCC file' update should also be done. Public Class Service1 Implements IService1 public function GetAllLocations () list (address) as implemented in IService1.GetAllLocations Dim db As New DataClasseslDataContext () Dim client matchingCustomers = db.userControlDemos Customer 'return (in matchingCustomers.ToList) end function end class  

I'm new in general, as well as Silverlight interface and services / WCO could you help me people get on the right track?

EDIT: I should add that I am using Vista Studio 2008, Windows Vista Business SP1.

If you have a Silverlight tool to install Visual Studio, use the default WCF template instead, "Silverlight-enabled consider using Dblusif Service" in which things simple for you and puts all the necessary configuration in place it was introduced in the new template beta 2 is still present (reference :).


Comments