|
-
Aug 8th, 2009, 01:13 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Silverlight External Image
I'm trying to dynamically load an image into an Image control using code. As long as the image resides within the Silverlight solution, all is well. However, when the image resides outside the solution I get an AG_E_NETWORK_ERROR error.
Note: the image I'm trying to load resides in a UNC share (\\server\share\image1.jpg) and not on another web server.
-
Aug 12th, 2009, 01:08 PM
#2
Hyperactive Member
Re: Silverlight External Image
Just a question but did you try adding it through the image popup box for an image control. What I mean by that is did you try and get it to show up by adding an image control then click the ... button and browse for the image through the share. The reason I ask this is because it may not be available. However, if it does work like that take a look at the code that it created to do it and just duplicate it in code.
If I helped you please rate me.
-
Aug 12th, 2009, 01:41 PM
#3
Thread Starter
Frenzied Member
Re: Silverlight External Image
Doesn't work that way. If you browse for the image, it adds it to the project resources and you refer to it directly. Otherwise, I can add an external absolute http reference easily. It's the local network, UNC reference I can't figure out.
-
Aug 12th, 2009, 02:17 PM
#4
Hyperactive Member
Re: Silverlight External Image
oh yeah i forgot about it loading it as a reference lol (long day). Have you tried connecting to is using the ip address? if you dont know it you can ping the machine.
If I helped you please rate me.
-
Aug 12th, 2009, 02:28 PM
#5
Thread Starter
Frenzied Member
Re: Silverlight External Image
I know the machine and its IP address, that's not the problem. What I can't see how to achieve is dynamically bound the source of an image to an existing image shared in the network.
For example, with HTML you'd use an IMG tag with something like this:
Code:
<IMG src="file://server/share/image1.png">
Can you do the same with Silverlight dynamically?
-
Aug 12th, 2009, 02:33 PM
#6
Hyperactive Member
Re: Silverlight External Image
This is a quote from the silverlight forums:
Silverlight doesn't allow arbitrary access to the file system or shares.
If you are running a website on the server I would suggest just putting the file somewhere you can access it from the server and then point it to that location in your silverlight app.
If I helped you please rate me.
-
Aug 12th, 2009, 02:42 PM
#7
Thread Starter
Frenzied Member
Re: Silverlight External Image
Super. 
It's small things like that that turn me down. I'm willing to bet that the workaround would be to communicate between Silverlight and Javascript and have a client-side js dynamically load the image into a frame. Another level of indirection and (again) Javascript proves to be king of the hill.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|