Search code examples
silverlightsilverlight-4.0

SQL Server install with Silverlight 4.0 OOB


I have a Silverlight app which needs to talk to a local SQL database, we plan on deploying this Silverlight app to Azure. Users will navigate to the app and install the app using the Out-of browser feature.

How should we plan on installing the SQL database on the local user’s machine in such cases? This app runs in offline mode for the most part except when synchronizing with the remote server, so a local SQL database is required.


Solution

  • You won't be able to use anything like SQL Express or similar on the machine from an OOB application (unless you are running elevated) as you will still be constrained by the sandbox and the libraries available to you in Silverlight are limited.

    Instead consider using a compact database that can be stored in Isolated Storage, something like Siaqodb, vistadb, or silverdb.

    One other thing to look at is the forthcoming Sync framework for Silverlight, which is designed to offer offline support for data from SQL or SQL Azure. See this webcast: Building Offline Web Apps using Microsoft Sync Framework.

    If you are running elevated, then you can use COM to interact with the local system, so you would be able to access a full-fledged database that way. However, making sure the prerequisites were in place and dealing with managing the database would be a lot of work. I wouldn't recommend it for your scenario.