Skip to main content

Microsoft Silverlight

Answered Question RTW Install problem on IIS ServerRSS Feed

(0)

markcaz68
markcaz68

Member

Member

1 points

6 Posts

RTW Install problem on IIS Server

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.

 

<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"

TagPrefix="asp" %>

<!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>Test2</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/Test2.xap" MinimumVersion="2.0.31005.0" Width="100%" Height="100%" />

</div>

</form>

</body>

</html>

SteveWong
SteveWong

Contributor

Contributor

6343 points

1,281 Posts

Re: RTW Install problem on IIS Server

Which version are you using? the RC0 or the beta2?

Regards,
SteveWong (HongKong)
Please mark post as answer if they help you

Client App Dev

SteveWong
SteveWong

Contributor

Contributor

6343 points

1,281 Posts

Re: Re: RTW Install problem on IIS Server

change your version code to be 2.0.30923.0

Regards,
SteveWong (HongKong)
Please mark post as answer if they help you

Client App Dev

markcaz68
markcaz68

Member

Member

1 points

6 Posts

Re: Re: RTW Install problem on IIS Server

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&amp;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

SteveWong
SteveWong

Contributor

Contributor

6343 points

1,281 Posts

Re: Re: Re: RTW Install problem on IIS Server

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"...>

Regards,
SteveWong (HongKong)
Please mark post as answer if they help you

Client App Dev

markcaz68
markcaz68

Member

Member

1 points

6 Posts

Re: RTW Install problem on IIS Server

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).

SteveWong
SteveWong

Contributor

Contributor

6343 points

1,281 Posts

Re: Re: RTW Install problem on IIS Server

You mean you didnt install VS or Tools?

Regards,
SteveWong (HongKong)
Please mark post as answer if they help you

Client App Dev

Sopheap Ly
Sopheap Ly

Participant

Participant

902 points

205 Posts

Re: Re: Re: RTW Install problem on IIS Server

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.

markcaz68
markcaz68

Member

Member

1 points

6 Posts

Re: RTW Install problem on IIS Server

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. 

SteveWong
SteveWong

Contributor

Contributor

6343 points

1,281 Posts

Re: Re: RTW Install problem on IIS Server

What do you mean by no VS for the IIS? 

Try this one and edit the blue one

<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
    TagPrefix="asp" %>

<!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>

Regards,
SteveWong (HongKong)
Please mark post as answer if they help you

Client App Dev

Sopheap Ly
Sopheap Ly

Participant

Participant

902 points

205 Posts

Re: Re: RTW Install problem on IIS Server

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 Luo - MSFT
Yi-Lun L...

All-Star

All-Star

25052 points

2,747 Posts

Answered Question

Re: RTW Install problem on IIS Server

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?

<add assembly="System.Web.Silverlight, Version=..., Culture=neutral, PublicKeyToken=..."/>

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.

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.

jamlew
jamlew

Contributor

Contributor

2830 points

432 Posts

Microsoft

Re: RTW Install problem on IIS Server

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.

---------
If this post has solved your problem, please select 'Mark as answer'

- Jimmy Lewis
Microsoft SDET
Visual Web Developer Team

markcaz68
markcaz68

Member

Member

1 points

6 Posts

Re: RTW Install problem on IIS Server

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 Party!!!

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities