Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

More Problems with Client Assembly URI's RSS

8 replies

Last post Oct 27, 2007 06:28 AM by Psychlist1972

(0)
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    More Problems with Client Assembly URI's

    Oct 25, 2007 02:41 AM | LINK

    I am attempting to use a WebResource for my Client Assemblies so I am changing the XAML before it is handed back to the client by replacing:

    ClientBin/SomeAssembly.dll

    To:

    It looks like the = signs in the query string are screwing it up.  Is this a bug or do I need to UrlEncode or something before I use them in the XAML?  The complete XAML looks like (after replacement):

    <Canvas
     xmlns="http://schemas.microsoft.com/client/2007"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:RaterSilverlight="clr-namespace:RaterSilverlight;assembly=/WebResource.axd?d=roJQckDvdezRYJeZjC0LATVipcZoaC8oJi_5h_9JmM_074xmVc0fDFKHc80XadLv0&t=633288583835546880"
     Width="138" Height="23"
     Background="#00FFFFFF"
     x:Class="RaterSilverlight.Page;assembly=/WebResource.axd?d=roJQckDvdezRYJeZjC0LATVipcZoaC8oJi_5h_9JmM_074xmVc0fDFKHc80XadLv0&t=633288583835546880"
     x:Name="Page"
     >
     <Path Width="13.149" Height="16.499" Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FF000000" Canvas.Left="2.013" Canvas.Top="2.642" Data="M3.7701149,18.641124 L8.3781481,3.1418872 12.148323,17.593978 2.5134936,8.7969087 14.661837,8.7969087 z"/>
    </Canvas>

     

    Any ideas?

    (If this has answered your question, "Mark as Answer")

    Shawn Wildermuth
    C# MVP, MCSD, Speaker and Author

    Silverlight 3 Workshop
    Miami, FL: Oct 12-14th
    Portlant, OR: Dec 2-4th
    Atlanta, GA: Dec 7-9th
    http://silverlight-tour.com
  • Psychlist1972

    Psychlist1972

    Contributor

    6802 Points

    1079 Posts

    Microsoft

    Moderator

    Re: More Problems with Client Assembly URI's

    Oct 26, 2007 12:55 AM | LINK

    If I had to guess, I'd say it was the root reference. If you shove your SL app in the root and get rid of the slash in your assembly location, does it work?

    Pete

    Developer Community Program Manager - XAML, WPF, Silverlight, .NETMF/Gadgeteer
    10rem.net - Pete Brown's site and blog | twitter: @pete_brown
    I work for the Developer Guidance group in Microsoft. Opinions are my own.
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: More Problems with Client Assembly URI's

    Oct 26, 2007 09:10 AM | LINK

    They are both in the root, but i'll try and remove the leading / to see if it makes a difference.

    (If this has answered your question, "Mark as Answer")

    Shawn Wildermuth
    C# MVP, MCSD, Speaker and Author

    Silverlight 3 Workshop
    Miami, FL: Oct 12-14th
    Portlant, OR: Dec 2-4th
    Atlanta, GA: Dec 7-9th
    http://silverlight-tour.com
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: More Problems with Client Assembly URI's

    Oct 26, 2007 09:19 PM | LINK

    No, the root slash isn't the problem.  Its a parser error "Semicolon expected" so I'd guess that the ? and & in the URL is the problem..and probably just a bug or feature.

    (If this has answered your question, "Mark as Answer")

    Shawn Wildermuth
    C# MVP, MCSD, Speaker and Author

    Silverlight 3 Workshop
    Miami, FL: Oct 12-14th
    Portlant, OR: Dec 2-4th
    Atlanta, GA: Dec 7-9th
    http://silverlight-tour.com
  • Psychlist1972

    Psychlist1972

    Contributor

    6802 Points

    1079 Posts

    Microsoft

    Moderator

    Re: Re: More Problems with Client Assembly URI's

    Oct 26, 2007 10:31 PM | LINK

    Right. Probably the ampersand. if you escape it with &amp; that should address the issue, assuming that is the problem.

    Pete

    Developer Community Program Manager - XAML, WPF, Silverlight, .NETMF/Gadgeteer
    10rem.net - Pete Brown's site and blog | twitter: @pete_brown
    I work for the Developer Guidance group in Microsoft. Opinions are my own.
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: Re: Re: More Problems with Client Assembly URI's

    Oct 26, 2007 10:59 PM | LINK

    I think it'll require a change in the runtime, even with the &amp; it fails with a parser error (though a different one).

    (If this has answered your question, "Mark as Answer")

    Shawn Wildermuth
    C# MVP, MCSD, Speaker and Author

    Silverlight 3 Workshop
    Miami, FL: Oct 12-14th
    Portlant, OR: Dec 2-4th
    Atlanta, GA: Dec 7-9th
    http://silverlight-tour.com
  • Psychlist1972

    Psychlist1972

    Contributor

    6802 Points

    1079 Posts

    Microsoft

    Moderator

    Re: Re: Re: Re: More Problems with Client Assembly URI's

    Oct 26, 2007 11:07 PM | LINK

    Can you use a URL rewriter, perhaps?

    Pete

    Developer Community Program Manager - XAML, WPF, Silverlight, .NETMF/Gadgeteer
    10rem.net - Pete Brown's site and blog | twitter: @pete_brown
    I work for the Developer Guidance group in Microsoft. Opinions are my own.
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: Re: Re: Re: Re: More Problems with Client Assembly URI's

    Oct 26, 2007 11:14 PM | LINK

    I could but I want avoid that in this case...why?  This is for an example of how to do it for my students, so i'd rather wait for 1.1 to support this correctly than hack it together...it'd be interesting to get working but using URL re-writing (or my other issue with it in that I have to hack together the XAML to do it).  I'd like a better solution for it from MS as this is going to be a pretty standard use-case (taking a Silverlight control and wrapping it in an AJAX control. 

     This use-case works fine in 1.0 just 1.1 is lacking and I suspect they'll handle it in the beta.  I've posted this as a bug in that forum...but thanks for all the ideas!

    (If this has answered your question, "Mark as Answer")

    Shawn Wildermuth
    C# MVP, MCSD, Speaker and Author

    Silverlight 3 Workshop
    Miami, FL: Oct 12-14th
    Portlant, OR: Dec 2-4th
    Atlanta, GA: Dec 7-9th
    http://silverlight-tour.com
  • Psychlist1972

    Psychlist1972

    Contributor

    6802 Points

    1079 Posts

    Microsoft

    Moderator

    Re: Re: Re: Re: Re: Re: More Problems with Client Assembly URI's

    Oct 27, 2007 06:28 AM | LINK

    All good. I had assumed you need to get something working for real. Teaching workarounds for an alpha product is probably of ... limited use [:P]

    Pete

    Developer Community Program Manager - XAML, WPF, Silverlight, .NETMF/Gadgeteer
    10rem.net - Pete Brown's site and blog | twitter: @pete_brown
    I work for the Developer Guidance group in Microsoft. Opinions are my own.