Note: This post is written for Silverlight 1.1 Alpha version.
One interesting question came up in Silverlight forum that I actively participate lately. You can read the original question here.
The question is ~
I want to host a silverlight site in a entwork with no internet connection. If someone opens the silverlight site you see an message to download silverlight. But with no internetConnection this won’t work. How can i Change the link where this message leads me to download silverlight plugin. Can I change it to a path like c:\tools\silverlight.exe?
I think this question is very interesting since I worked a place where the internet connection is extremely slow or doesn’t work all the time. He wants to host the Silverlight application on the web server within the LAN where there is no internet connection. He wants to provide the way to download the Silverlight installers for those who don’t have Silverlight installed on their machines within LAN.
So, I gave him the following steps to solve his problem.
- Download the Silverlight installer (AFAIK, there are three types of installers for Windows, MacIntel and MacPPC)
- Upload the Silverlight installers to your web directory of your local IIS server. let’s say your silverlight.exe is under the following path.
- Open the Silverlight.js in VS 2008 or your favorite text editor.
- Find Silverlight.fwlinkRoot in that file. (Just press Ctl+F to find the string)
- You will see this code below
- Replace with Silverlight.fwlinkRoot=”http://localhost/silverlightinstallers/”
- Find b=”92800″ in that file again.
- You will see this code
"if(c=="Windows")b="92800";else if(c=="MacIntel")b="92812";else if(c=="MacPPC")b="92811"")
- Replace with the following code
if(c=="Windows")b="wins/silverlight.exe"; else if(c=="MacIntel")b="macintel/silverlight.exe";else if(c=="MacPPC")b="macppc/silverlight.exe"
That’s all. Remember that you will be able to download the installer based on what OS you are using. For example, you can’t download the installer for MacIntel if you are not using Mac Intel machine.
Feel free to let me know if you have any question or comment. Don’t hesitate to contact me if you have any issue with the steps that I mentioned in this post.