A Silverlight application cannot connect to the database directly. There is no ADO.NET library in the Silverlight CLR that can do this. It is also bad practice to expose the database directly on the internet - bad performance, security, etc.
You
can dynamically configure the URL of the DevForce Business Object Server (BOS), however. You do this by modifying the
IdeaBlade.Config.Instance.ObjectServer node in the application prior to any EntityManager operations.
If the XAP file and the BOS are hosted on different URLs you will also need to deploy a clientaccesspolicy.xml file to the root of the IIS Server that hosts the BOS. This is a sample file:
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*" >
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
Once you get this file working, you will want to change the domain uri and resource path nodes to be more restrictive for security purposes. You can google/bing clientaccesspolicy.xml for examples.
For disconnected scenarios, you can run the Silverlight application disconnected from the source of the XAP, and it should still be able to communicate with the BOS to get its data.
Is your requirement for this because your clients want to maintain control of their data, but want you to maintain the application?