By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,436 Members | 2,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,436 IT Pros & Developers. It's quick & easy.

Is there a way I can have my code handle "Directory Browsing"? Thanks!

P: n/a
For example, I have a virtual directory - "wfile", I would like user access
http://mysite/wfile, but I want to handle it with my own code instead of
turn on "Directory Browsing", how can I capture that request? IHttpHandler
or IHttpModule?

Thanks!

--

David WENG

Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Probably the easiest way is to put a default.aspx page in that folder.
The code inside of it would iterate the files/folders in that folder.

--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net

"davidw" <da****@affinisys.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
For example, I have a virtual directory - "wfile", I would like user
access
http://mysite/wfile, but I want to handle it with my own code instead of
turn on "Directory Browsing", how can I capture that request? IHttpHandler
or IHttpModule?

Thanks!

--

David WENG

Nov 19 '05 #2

P: n/a
Thanks for your reply.

Right, that works if user types in http://mysite/wfile/ , but not work if
user type in http://mysite/wfile, right? I can not control the url.
Any suggestion?

--

David WENG
Memlink Architect
"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message
news:OX**************@TK2MSFTNGP10.phx.gbl...
Probably the easiest way is to put a default.aspx page in that folder.
The code inside of it would iterate the files/folders in that folder.

--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net

"davidw" <da****@affinisys.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
For example, I have a virtual directory - "wfile", I would like user
access
http://mysite/wfile, but I want to handle it with my own code instead of
turn on "Directory Browsing", how can I capture that request? IHttpHandler or IHttpModule?

Thanks!

--

David WENG


Nov 19 '05 #3

P: n/a
it will work for both
"davidw" <da****@affinisys.com> wrote in message
news:ed**************@TK2MSFTNGP15.phx.gbl...
Thanks for your reply.

Right, that works if user types in http://mysite/wfile/ , but not work if
user type in http://mysite/wfile, right? I can not control the url.
Any suggestion?

--

David WENG
Memlink Architect
"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message
news:OX**************@TK2MSFTNGP10.phx.gbl...
Probably the easiest way is to put a default.aspx page in that folder.
The code inside of it would iterate the files/folders in that folder.

--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net

"davidw" <da****@affinisys.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
> For example, I have a virtual directory - "wfile", I would like user
> access
> http://mysite/wfile, but I want to handle it with my own code instead
> of
> turn on "Directory Browsing", how can I capture that request? IHttpHandler > or IHttpModule?
>
> Thanks!
>
>
>
> --
>
> David WENG
>
>
>




Nov 19 '05 #4

P: n/a
Thanks for reply! But the issue has not been solved.

I am implementing a webdav, so I need map * to my httphandler, but once I do
that, I can not capture the default call, it neither goes to the
default.aspx(which is reasonable) nor goes to my httphandler, not even my
httpmodule. Any idea?

Thanks!

--

David WENG

"Showjumper" <kds> wrote in message
news:Oo*************@TK2MSFTNGP09.phx.gbl...
it will work for both
"davidw" <da****@affinisys.com> wrote in message
news:ed**************@TK2MSFTNGP15.phx.gbl...
Thanks for your reply.

Right, that works if user types in http://mysite/wfile/ , but not work if user type in http://mysite/wfile, right? I can not control the url.
Any suggestion?

--

David WENG
Memlink Architect
"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message
news:OX**************@TK2MSFTNGP10.phx.gbl...
Probably the easiest way is to put a default.aspx page in that folder.
The code inside of it would iterate the files/folders in that folder.

--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net

"davidw" <da****@affinisys.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
> For example, I have a virtual directory - "wfile", I would like user
> access
> http://mysite/wfile, but I want to handle it with my own code instead
> of
> turn on "Directory Browsing", how can I capture that request?

IHttpHandler
> or IHttpModule?
>
> Thanks!
>
>
>
> --
>
> David WENG
>
>
>



Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.