473,503 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
4 1889
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3526
by: Ed | last post by:
Hello All, I posted earlier about a problem I was having with editing or pasting/deleting files in the "Home Directory" of my web server. I just noticed that the "Home Directory" option in the...
0
1601
by: Hamed | last post by:
Hello I develop a solution in VS.NET 2003 containing multiple projects. I want to put all my sources in a separate directory to make backup of sources easier. I can simply change the Output...
4
12934
by: hamacher | last post by:
I have a particular need to an application . . . I need users to specify a directory (with path) on their filesystem on an HTML page. All I need at the server is a string representation of the...
1
3952
by: webonomic | last post by:
A number of topics ask how to solve the "Cannot use a leading .. to exit above the top directory" error. I am having the same problem with an asp.net 2.0 website. The site works fine on...
1
1641
by: Casper Stendal | last post by:
Is it some how possible to handle a "directory not found" error through ASP.NET (or ASP), without having to make speciel a setup for the application in IIS, when it comes from an URL without...
8
6262
by: lawrence k | last post by:
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid...
21
7795
by: comp.lang.tcl | last post by:
set php {<? print_r("Hello World"); ?>} puts $php; # PRINTS OUT <? print_r("Hello World"); ?> puts When I try this within TCL I get the following error:
6
6786
Markus
by: Markus | last post by:
I'm adding to my script a section that allows a thumbnail to be created and saved. I get this error: Warning: imagejpeg() : Unable to open '../uploads/thumb/' for writing: Is a directory in...
4
3271
by: k3pp0 | last post by:
Hey. I've got a very basic newbie question, I hope you can understand me. Sorry for asking it, first of all. I see a lot of sites (e.g. communities) with a url-structure like this:...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.