Hi there
I am trying to develop a silverlight game to be deployed on facebook. This game needs to make use of a database to store information about the players stats.
At the moment i am just trying to get the silverlight wcf services working. By making a simple grid which must get information from the database.
I followed a tutorial on web services and I can get it working fine on my local host, while connecting to the database on the server.
My problem comes in when I deploy the website. I get this error message:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; FDM; .NET4.0C; .NET4.0E; Tablet PC 2.0)
Timestamp: Wed, 18 Aug 2010 12:18:25 UTC
Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at Dbconnection.CustomerService.CustomerListCompletedEventArgs.get_Result()
at Dbconnection.MainPage.client_CustomerListCompleted(Object sender, CustomerListCompletedEventArgs e)
at Dbconnection.CustomerService.SampleServiceClient.OnCustomerListCompleted(Object state)
Line: 1
Char: 1
Code: 0
URI: http://www.facebookml.zar.cc/Silverlight.js
Now i also found that you need to tell it where the service resides.
The folder structure of the server is 2 folders and another called wwwroot.
This is where my default page resides as well as the service file (.svc)
<client>
<endpoint address="http://localhost:58622/SampleService.svc"
binding="customBinding" bindingConfiguration="CustomBinding_SampleService"
contract="CustomerService.SampleService" name="CustomBinding_SampleService" />
</client>
my question is do i change the address to: http://www.facebookml.zar.cc/SampleService.svc
or to: http://www.facebookml.zar.cc/wwwroot/SampleService.svc
I have actually tried both of these and have had no luck. Am i missing something?
Even better, is there a way to do the database transactions without using a wcf service?