xap and httphandlers
Last post 05-04-2008 8:32 PM by Ryan7979. 6 replies.
Sort Posts:
04-23-2008 9:07 PM
xap and httphandlers

i have a silverlight(.xap) in my web server and want to embed any page no matter it comes from,

for xap file url safety ,i wrote a class "XapHandler" and setting <httphandlers> in web.config file as below

 <add verb="*" path="*.mykey" type="XapHandler"/>

i've set configure ".mykey" in iis and set source tag  in embed page as below

<object data="data:application/x-silverlight," type="application/x-silverlight-2-b1">
    <param name="source" value="XXX.mykey"/>
    <param name="EnableHtmlAccess" value="true" />

 it works actually, but when i modify the source tag as below

<param name="source" value="http://www.aaa.bbb/XXX.mykey"/>

it can't find the xap file ,

 

so i want to know does any setting i miss or there's another way to hide xap file url ?

Thanks!!


 

Ryan7979

Joined on 04-18-2008
Posts 9
04-24-2008 4:04 AM
Re: xap and httphandlers

Could it be looking for it not in the root?  E.g. does "/XXX.mykey" work?  If that doesn't help, i'd take this to the ASP.NET forums as this is more of an issue with HttpHandlers than Silverlight 2 and they might be able to provide more help than you'll get here.

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

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 2 Workshop
May 12-14, 2008 - Atlanta, GA
May 28-30, 2008 - San Francisco, CA
http://www.silverlight-tour.com

swildermuth

Joined on 10-13-2003
Atlanta, GA
Posts 1,058
04-24-2008 4:49 AM
Re: xap and httphandlers

Thanks your reply,Shawn

but it couldn't be looking for if xap file in root("/XXX.mykey"),

 

Ryan7979

Joined on 04-18-2008
Posts 9
04-24-2008 6:20 AM
Re: Re: xap and httphandlers

I thought the idea was to have the HttpHandler hand off the xap file for you no matter where it was specified?

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

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 2 Workshop
May 12-14, 2008 - Atlanta, GA
May 28-30, 2008 - San Francisco, CA
http://www.silverlight-tour.com

swildermuth

Joined on 10-13-2003
Atlanta, GA
Posts 1,058
04-25-2008 2:19 AM
Re: Re: xap and httphandlers

m..

i just want to hide the path of xap file for everyone who embed my silverlight in their page and don't let them unzip xap file easily,using httphandlers I can change file name and extension,

in my web server, i can use <param name="source" value="XXX.mykey"/> and it works, but for other web site , they have to use
<param name="source" value="http://www.aaa.bbb/XXX.mykey"/>
unfortunately it didn't work

btw,one strange thing is I can use http://www.aaa.bbb/XXX.mykey this url to download XXX.mykey by ie but silverlight couldn't reach it

 

Ryan7979

Joined on 04-18-2008
Posts 9
04-29-2008 5:27 AM
Re: Re: xap and httphandlers

Hi:

  I cannot reproduce this problem. Do you get any exception?

Thanks

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Allen Chen – MSFT

Joined on 03-16-2007
Posts 717
05-04-2008 8:32 PM
Re: Re: xap and httphandlers

Allen

There's no exception , sl just don't show up , i think it can't reach xap file after changed httphandlers.

Ryan7979

Joined on 04-18-2008
Posts 9