views:

29

answers:

2

I am writing a silverlight Line of business application and wanted to use the Subsonic DAL. The Silverlight Project will not allow me to Add the Subsonic reference with the followng error "You can not add the Subsonic.Core.Dll as it was not built against the Silverlight Runtime". I assume that I could create a webservice and add the Subsonic to that, but I would like to just add it to the Silverlight Project. Has anyone done this and if so how. If not is there an easy way to expose the DAL through the Webservice.

+1  A: 

You don't want to access your database directly from your silverlight application. This will create a big security hole. Remember that the silverlight client runs on the clients machine and the traffic between the client and the server can easily be tampered with.

For easy access, to a server side API, you can try .NET RIA Services.

gautema
A: 

To clarify the error message: Silverlight is based on .net, but you can't just run any .net assembly in silverlight. This is because a lot of stuff in normal .net is simplified, not allowed or not supported in client-side silverlight, which makes binary compatibility difficult or even pointless.

jdv