Thanks. that was part of the problem.... I'm also using Apache not IIS, and couldn't succesfully locate the ROOT folder for the web app hosting the service. I switched to IIS, and, got it working which is enough for me for now. Thanks again
pisanis
Posts
-
WebClient usage from Silverlight not working fo me (Security?) -
WebClient usage from Silverlight not working fo me (Security?)Hi, I have a strange problem I cannot seem to solve. I'm using, in Silverlight, and WebClient to invoke a REST service that returns an XML document. (the example below shows this document as being accessible via the url: "http://localhost/persons.xml" This is the callback code from a button defined in my XAML : Private Sub getdata_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Dim wcProxy As New WebClient() Dim Uri As New System.Uri("http://localhost/persons.xml") 'setup delegate AddHandler wcProxy.DownloadStringCompleted, AddressOf wcProxy_DownloadStringCompleted ' invoke service wcProxy.DownloadStringAsync(Uri) End Sub Private Sub wcProxy_DownloadStringCompleted(ByVal sender As Object, ByVal e As System.Net.DownloadStringCompletedEventArgs) Dim doc As New XDocument doc = XDocument.Parse(e.Result) <<< ERRORS HERE <<<< ... ... End Sub The error on the line marked above says: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. and: e.Error.InnerException.Message says: "Security Error" Not sure why this is. In at atempt to fix this, I have defined a file called 'clientaccesspolicy.xml' in my ASP.NET Web Application, with te following contents: However - I'm not 100% sure if I need this at all, and even if I did, if I implemented it correctly. I've made no other changes to the default .WEB project that the Silverlight 'New Project' creates for me. Thanks - S.
-
Databinding in Silverlight with databases other than with SQL ServerHi, I am evaluating Silverlight as a UI for a new application and I'm looking for some advice. I'm fairly new to Silverlight. Background: I am working with a database that provides it's own ADO.NET native adapter. Using this native provider, I can define ADO.NET Commands ith SQL Statements and run ExecuteQuery methods against the database to retrieve datasets. This all works fine when building a traditional client/server thick client. Now to Silverlight.... I am of the understanding that Silverlight (any version) will need to call a WCF web service (typically hosted by a ASP.NET Web application on a web server somewhere) right ?. A proxy class built on the Silverlight side is what is used to drive the web service, and controls are bound to this class. I have managed to build a simple Silverlight application that takes the input of two integers and displays the sum. This is done by calling an AddIntegers web method exposed by the web service, which returns the sum as a result. So far so good. However ... How do I go about gettings rows of information, like, a resultset from my database and into SL ? Within by web method (say, ContactNames()), I can execute ADO.NET type commands to interact with my remote database, but once I get that dataset, I do not know how to return it to silverlight for populating into a grid... Any help would be greatly appreciated, articles, sample code, .. anything ... Thanks