Enable directory browsing in WCF

1.6k views Asked by At

Does anyone knows how to do directory browsing using WCF and app.config file. I tried doing

<system.webServer><directoryBrowse enabled="true"/></system.webServer>

but it did not helped. I need to make one directory within my Server available for users to download their files and I am implementing self hosted WCF services. I can share the files using IIS but it would be good if I can do it from WCF alone.

2

There are 2 answers

0
Brian Mains On BEST ANSWER

Directory browsing is a feature in IIS. IIS makes it available; when you use WCF self hosting, you don't have all of those options unfortunately. But it's possible to make a folder in your self-hosted folder structure a virtual directory in IIS so that they can get it there instead, if a hybrid is an option.

0
Lex Li On

A possible way to achieve that is to also self host Katana.