Friday, September 21, 2012

How to get all ".xaps" from ClientBin Folder

How to get all ".xaps" from ClientBin Folder

My program is divided in modules, which are implemented in different silverlight projects. I would like to create a view (note that i'm doing this on SL side )and associate a module name to a xap from ClientBin directory. To do this, i need to list all the ".xaps" that exists on this directory(probably i will create a listbox with them).

I've tried to do this with Directory methods, but my access is always denied. I've also tried with Path methods, but i failed too.

Is this possible?

Thanks in advance!

Answers & Comments...

Answer: 1

Try to run Visual Studio with administrator rights ?

If your Web application is configured to use IIS, the identity of the Application Pool must have rights read/write on the solution folder.

by : Joffrey Kernhttp://stackoverflow.com/users/1268670

Answer: 2

The server needs some kind of a web service for your SL app. That web service will have access to the server file system and you can use normal DirectoryInfo to read the files from the directory.

by : Rolandhttp://stackoverflow.com/users/265739

Answer: 3

Take a look at Prism. It contains a modularity framework that supports scenarios similar to yours. The XAP modules are listed in a special "modules.xml" catalog that the Silverlight application loads. The Silverlight application then has access to module metadata and can load modules on demand.

by : borishttp://stackoverflow.com/users/874831




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog