If you have noticed Silverlight and IIS 6 do not go well by default. When we come to think of it, din't Silverlight come a long time after Windows Server 2003? Yes, but that doesn't mean that they do not support each other totally. It's just that the MIME types needed to run Silverlight are not present by default on IIS 6. So here's how to do add them:
--> Open up IIS manager
--> Right-click Server Name
--> Properties
--> Mime Types
--> New
and add the following 3 entires one after the other:
Extension : .xap Mime Type: application/x-silverlight-app
Extension: .xaml Mime Type: application/xaml+xml
Extension: .xbap Mime Type: application/x-ms-xbap
Once done with this, you should be good to go ...
Oh by the way, you would have to do the same if you are still running the RTM version of Vista (IIS 7). From Vista SP1 onwards this was taken care by default. More info at iis.net
Have Fun!
2 comments:
thanks a lot!
This is how you setup IIS 6 to run .Net 4.0 as the default framework and support Silverlight 4.0.
Run:
C:\Windows\Microsoft.NET\Framework\1033\aspnet_regiis.exe -u
C:\Windows\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis.exe -u
C:\Windows\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -u
C:\Windows\Microsoft.NET\Framework\v2.0.50215\aspnet_regiis.exe -u
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -u
C:\Windows\Microsoft.NET\Framework\v3.0\aspnet_regiis.exe -u
C:\Windows\Microsoft.NET\Framework\v3.5\aspnet_regiis.exe -u
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
A few of the CMD's may return an error file not found.
You also have to add the MIME types for Silverlight:
.xaml – application/xaml+xml
.xap – application/x-silverlight-app
.xbap – application/x-ms-xbap
A new site will be created as .Net 4.0 default and update all current websites to .Net 4.0 as the default framework. IIS 6 configuration mappings will show 4.0.
Please share with your readers. This is a 100% will work solution.
Post a Comment