In enterprise-level application systems, the difficulty of using WCF + silverlight3 is not development, but deployment is a headache. Next I will share my deployment practices, I use silverlight3 + WCF. the SL host uses iis6.0, And the WCF host serves windows:
First, check whether ASP. net2.0 is installed in your IIS. Run the following command to install the support for ASP. net2.0. In the command line, enter:
C: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_regiis.exe-I
I will not talk about cross-origin access between WCF and Silverlight here, but I will not be able to view my examples.
Start deployment below:
1. Create a WCF Service InstallationProgram
Note that the cross-origin access policy file must be manually added.
Start the service after installation.
2. Deploy Silverlight to IIS:
(1) Add the MIME type. XAML application/XAML + XML and. xap application/X-Silverlight-app to IIS.
(2) Pay attention to the address of the WCF Service in servicereferences. clientconfig of Silverlight:
If it is localhost, no matter how you deploy it, you can only access it on the local machine, and the Local Area Network cannot access WCF, let alone the internet.
If Silverlight is accessed only in the LAN, you can configure localhost as your lan ip address.
If Silverlight requires both LAN access and Internet access, replace localhost with the Internet IP address and map it to the local machine on the vro. Or use tools such as peanut shells.
By now, the WCF Service has been enabled, and you can use an Internet IP address to access Silverlight.