Silverlight application , access folder in the web server how to ,

Hi i am getting an error when trying to access files inside a folder in a webserver...how can i access the images inside that folder in my web application .. The error msg I am getting is in the screenshot ... Directory.Getfiles(http://localhost:1441/images/) this is the folder I am trying to access how can I do it?
1.JPG
fatihdiAsked:
Who is Participating?
 
feddasCommented:
If this webfolder is the same folder your Silverlight application is in you should not be including the http://.  Rather you should be referencing the files with a relative uri, in your case this looks like it would be just Directory.GetFiles("/images/");
0
 
feddasCommented:
This may not work, but it's worth a shot.  It may be an issue with trusting the source.  To allow trust to remote sources close VS 2010.  Then open the %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config file in any text editor and add the loadFromRemoteSources element as follows:

 


reference: http://social.msdn.microsoft.com/Forums/en-US/webdevelopmentprerelease/thread/ea9b9cab-cbfd-496d-8a81-7b3dd06e8c23
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.