Skip to main content
Home Forums General Silverlight Hosting and Streaming Trying to Access a Class Library through a Silverlight 'Live' hosted app
3 replies. Latest Post by swildermuth on August 29, 2008.
(0)
DJOlson
Member
0 points
6 Posts
08-27-2008 12:53 PM |
I have a hosted webpage that invokes a SL xap file from the Silverlight 'Live' Streaming site. This runs fine, except when I'm trying to open a stream back on the hosted website to access a DLL to read in more content. I'm using the snippet as follows:
wc.OpenReadCompleted +=
wc.OpenReadAsync(
This fails. This runs fine if I run the Xap from the hosted website. I've also tried using a absolute uri to no avail. Is there a way to have the hosted SL 'Live' xap access the website dll (under clientbin) or am I able to put the dlls on the 'live' site to make it work that way?
swildermuth
Star
8320 points
1,546 Posts
08-27-2008 2:31 PM |
The URI indicates that you are downloading a file called "SilverlightClassLibrary1", shouldn't it be SilverlightClassLibrary1.dll or .xap?
08-27-2008 3:37 PM |
Yes, it should say 'SilverlightClassLibrary1.dll', my apologies for the typo.
Would it have something to do with a cross domain issue? It looks like if Im understanding this correctly the .xap file on the SL 'live' site runs in its own domain so I'm thinking I might need a web service to access the dll now. With that i'll need a clientaccesspolicy.xml file on the website too I think. Shawn, does that sound like a direction to follow through on?
08-29-2008 5:31 PM |
Likely not a cross domain problem but a problem with accessing .DLL's from a web server (which is usually expressly forbidden). You can confirm if the .dll isn't being served by the web service by trying to access the .dll directly (in a browser do http://yourservername.com/SilverlightClassLibrary1.dll) and see if its serving it. I expect that's the issue, not anything mroe complicated. So you either need to tell the server to serve .dll's (though I'd limit it to only your SL directory) or renamed it as Silverlight doesn't care what teh .dll is. Alternatively, .zip it up so you can get the assembly compressed across the wire for more performance.