Re: Re: Re: RC0 - Having Trouble creating Proxy for Silverlight-enabled WFC Service.
I think Ken's reply is address a different issue we had during the beta, that we fixed during the final release.
I have a couple of questions, to help me try to reproduce this (it doesn't happen on my machine).
dbaechtel, if you open the reference.vb file(turn on show all files in the solution explorer), is it empty like what fkhoury is seeing in his response. I assume it is not because you can see it in the object browser. You shouldn't need to add references to system.servicemodel or anything, that should be added automatically when you add the service reference. To call it you should be able to just call "dim proxy as new ServiceReference1.ServiceClient". It is not under the web namespace. then you can call proxy. I included some sample steps below
Do you have team foundation server installed by any chance?
fkhoury, can you check to see if you have any compile warnings or errors? If you are trying to add a service reference to a regular wcf service (one the use wsHttpBinding, not a Silverlight enabled wcf service(one the uses basicHttpBinding), then this is not supported, but you should have a compiler warning.
Here are some sample steps to get a basic Silverlight app working (in vb)
Create new vb Silverlight app
Add Silverlight enabled wcf service to project
Build
Add service reference
Add <TextBlock x:Name="t1" Text="Hello, Ed" /> to page.xaml and the following code to the code behind
Public Sub New()
InitializeComponent()
client = New ServiceReference1.Service1Client()
client.DoWorkAsync()
End Sub
Dim WithEvents client As ServiceReference1.Service1Client
Public Sub test(ByVal sender As Object, ByVal e As ComponentModel.AsyncCompletedEventArgs) Handles client.DoWorkCompleted
t1.Text = "completed"
End Sub
Hope this helps,
-Ed Smith
Microsoft Visual Studio team