Warm tip: This article is reproduced from stackoverflow.com, please click
c# deployment iis silverlight

Deploy Silverlight application in IIS error occured ERROR Code 2105 Failed to load Silverlight Prere

发布于 2020-05-11 03:06:27

Configured IIS and Include silverlight mimetypes.Please help me to resolve. Image for Reference

Questioner
Anuja
Viewed
29
Anuja 2020-02-26 16:22
  1. Create a new folder called ‘XXX’ under the wwwroot of the production server.
  2. Form XXX.Web folder Copy the 'ClientBin' folder and paste it under the XXX folder in C:\inetpub\wwwroot. Please note that the ClientBin folder has the *.xap file.
  3. Copy the file silverlight.js, and paste under the xxx folder.
  4. Copy the web site *.aspx file and paste it under the xxx folder.

Folder Path

  1. Ensure the IIS Manager is installed. If it is not refer the link https://enterprise.arcgis.com/en/web-adaptor/latest/install/iis/enable-iis-2008-components-server.htm
  2. Configuring IIS for .NET Framework 4. .NET Framework 4 has already been installed then no need to make some additional configuration settings to IIS to get it to run properly.
  3. Open a cmd window (using Run as Administrator)
  4. cd to C:\Windows\Microsoft.NET\Framework\v4.0.30319 and run aspnet_regiis.exe -i. (this will install ASP.NET v4.0)
  5. Open IIS Manager and click on the Server name
  6. select ISAPI and CGI Restrictions and check that the ASP.NET v4 entries are set to Allowed
  7. Create a website in IIS Open run (windows key + R) and type inetmgr and press ENTER or Open the IIS in Administrative tools.IIS Manager opens.

    IIS

  8. Silverlight applications are downloaded by browsers through XAP files. These XAP files are essentially .zip files that contain the assembly manifest file, and one or more assemblies. Therefore, make sure the .xap, .xaml, and .xbap extensions are included in the MIME types for the IIS. For IIS 7, click on the server name in the left panel. In the right panel, choose MIME Types. MIME

  9. In the MIME Types dialog, click the Add button to enter the following MIME types.

.xap application/x-silverlight-app .xaml application/xaml+xml .xbap application/x-ms-xbap

If the above MIME types already exist, there is no need to add them again. 10. Then right click on Sites and click on Add Website. The Add website dialog opens.

• Fill in required details and select folder where compiled code is located. Eg: C:\inetpub\wwwroot\XXX • Select required port , default is 80. • Include Hostname ex: XXX.com Then click ok. A website gets created and it will show under Sites. Now right click on website name then Manage website and then click browse.