So you want to develop and deploy a Silverlight 5 application that has elevated permissions but runs in-browser, so you can access file system and use DLLs and all those other things a web app shouldn't really be doing. Well here is what you need to do:
1) First go to the properties of your Silverlight app and the Silverlight tab to ensure the "Required Elevated trust when running in browser" is enabled. You don't need the out of browser check box ticked.
2) Next go to the Signing tab and choose a certificate or create a test certificate if you don't have an existing certificate and then tick the Sign the Xap File.
3) Export and save the certificate you have just created, you'll need this later for deployment. Do this by clicking More Details, then on the Details tab choose Copy to File. Follow the wizard and select export private key and save the .PFX file. Don't forget to use a password you will remember when prompted.
4) Now build your app and copy the following files from the associated web project of your Silverlight app to your web server. This can be IIS or Apache, so either the wwwroot folder for IIS or htdocs folder for Apache:
a) the html page hosting your Silverlight app
b) Silverlight.js
c) the ClientBin folder and its contents which is your xap file.
5) Now we are already at the server end, time to move to the client which can be the same machine.
6) If you are using IE now is a good time to add your site to the list of Trusted sites. You need to do this because even though the Silverlight app is granted elevated permissions, IE will run in a protected mode and prevent access to the file system etc. The app can end up in a partial trusted state where it thinks it has Elevated Trust but some operations will still fail. This doesn't seem to be necessary with Firefox.
7) The final step is to install your test certificate that your saved early to the .PFX file.
This needs to be installed in the Trusted Publishers Store. This
link describes deploying certificates, especially if you are using a test certificate. Make sure you follow all the steps, especially no.12 if your certificate is self-signed as a test certificate will be.
8) You should be able to browse to your host page and see your app run with elevated permissions.
Your app can check to see whether Elevated Trust is available with the call:
Application.Current.HasElevatedPermissions
9) To host Silverlight apps in Apache you just need to add the following entries to the mime.types file in the Apache2.2\Conf folder:
application/xaml+xml xaml
application/x-msdownload dll
application/x-silverlight-app xap