Skip to main content
Home Forums General Silverlight Installation and Setup RTW Install problem on IIS Server
13 replies. Latest Post by markcaz68 on October 29, 2008.
(0)
markcaz68
Member
1 points
6 Posts
10-24-2008 4:01 PM |
Hi,
I can't get my IIS Server to work properly. Browsers that connect to it are constantly asked to update to the new version of SL, even thou they already have it. My mime types are fine.
When creating a project in VStudio it creates 2 pages to run my app: .aspx and .html. The .html file with the <object> works fine on my server, however the .aspx file is what causes the problem. (Both work fine on my dev machine) I uninstalled the SDK, and re-installed it - but that didn't help. The .aspx is below - I think it's a problem with System.Web.Silverlight or System.Web.UI.SilverlightControls, but I'm not sure where to start with this. The bin directory has System.Web.Silverlight in it.
I appreciate any help! Thanks.
<%
<
</
SteveWong
Contributor
6343 points
1,281 Posts
10-25-2008 12:58 AM |
Which version are you using? the RC0 or the beta2?
10-25-2008 12:59 AM |
change your version code to be 2.0.30923.0
10-25-2008 10:43 AM |
I'm running RC0, or RTW, or whatever "SDK 2.0" is. I don't have Visual Studio on my server, so I only installed the latest SDK. I had Beta-2 on there, but I uninstalled it before getting the new SDK.
Changing to 2.0.30923.0 didn't work.
One clue I just noticed is the object tag that's getting generated by asp.net still has -b2 in it....
//<![CDATA[Sys.UI.Silverlight.Control.createObject('Xaml1_parent', '<object type="application/x-silverlight-2-b2" data="data:application/x-silverlight-2-b2," id="Xaml1" style="height:100%;width:100%;">\r\n\t<param name="MinRuntimeVersion" value="2.0.31005.0">\r\n\r\n\t</param><param name="InitParams" value="Mode=Student">\r\n\r\n\t</param><a href="http://go2.microsoft.com/fwlink/?LinkID=114576&v=2.0"><img src="http://go2.microsoft.com/fwlink/?LinkID=108181" alt="Get Microsoft Silverlight" style="border-width:0;" /></a>\r\n</object>');//]]>
How does asp.net know how to generate this <object> tag? How do I make sure it's using the right System.Web.Silverlight as seen below?
<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %>
Thanks
10-25-2008 11:17 AM |
I think first of all, the mime type should be application/x-silverlight
And then, for the aspx, the object type and data, at least for me using Silverlight 2 RC0
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2"...>
10-25-2008 12:26 PM |
Yes, my mime types are all fine.
The <object> tag gets generated automatically by asp.net, but somehow it's putting the beta (-b2) in there. I don't know why this is! My mime types are fine, my /bin directory has System.Web.Silverlight.dll version 2.0.30825.0 from 10/5/2008 2:53 am, and there's no .refresh file there to overwrite it. I even removed any older System.Web.Silverlight.dll versions.
The <object> tag is generated fine by asp.net on my development machine. It's only my server that has the problem (it doesn't have Visual Studio, so I only installed the Silverlight 2 SDK).
10-25-2008 12:37 PM |
You mean you didnt install VS or Tools?
Sopheap Ly
Participant
902 points
205 Posts
10-25-2008 1:15 PM |
The ASP.NET Silverlight control is old. You should try installing the new Silverlight RTW Tools for Visual Studio, removing and adding the reference to System.Web.Silverlight.dll and recompile your asp.net application.
If nothing works, you should just embed the Silverlight in html object tag.
10-25-2008 1:47 PM |
I did install the RTW for Visual Studio, and my development environment is great. I don't know why you say the Silverlight control is old - Visual Studio adds it to the default .aspx pages it generates.
It's totally a problem on my IIS server machine which doesn't have Visual Studio.
Yes, I can use an html object tag, however I need the .aspx file to work.
10-25-2008 1:57 PM |
What do you mean by no VS for the IIS?
Try this one and edit the blue one
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;"><head runat="server"> <title>SteveSL</title></head><body style="height:100%;margin:0;"> <form id="form1" runat="server" style="height:100%;"> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <div style="height:100%;"> <asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/SteveSL.xap" MinimumVersion="2.0.30923.0" Width="100%" Height="100%" /> </div> </form></body></html>
10-25-2008 2:47 PM |
No, your IIS server does not need VS to serve Silverlight application properly.
The issue obviously lies in the ASP.NET Silverlight control. It spits out legacy object tag code for Silverlight Beta 2 or earlier.
Yi-Lun L...
All-Star
25052 points
2,747 Posts
10-27-2008 12:46 AM |
Hello, something to check. Any chance you had added Beta 2 System.Web.Silverlight to GAC on the server? By default, it's not added to GAC, but you still need to check it out...
Also check your web.config file. Are there any references like this one?
By default, there's no such a line. If you have, make sure the Version and PublicKeyToken refers to the latest version (you can simply delete it if you like). When no reference is found in web.config, the runtime will search for the bin directory for the referenced assemblies.
jamlew
2830 points
432 Posts
10-27-2008 12:42 PM |
Purge the copy of System.Web.Silverlight.dll from your website's bin directory on the server, and replace it with the new version from the SDK. This should fix the issue and it should start generating the correct markup.
10-29-2008 3:39 PM |
Thanks Yi-Lun!
Yes - it somehow got into the GAC - probably when I installed an earlier beta version and ran into problems. Works fine now