473,414 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

IIS letting ASP.NET do the work

I'm having a bit of trouble figuring out how to let IIS 6 pass on default
document requests for documents that don't exist to ASP.NET.

In a simplified version of my application, all of the "pages" are user
controls (.ascx files), and I have one "master page" (no, this is not 2.0)
that contains the template for the site. I have written an HttpHandler that
takes the URL, which would be www.mysite.com/test.aspx, and process it
through template.aspx, load "test.asCx" into the content of the template,
etc. This works beautifully, except when IIS has to put some forethought
into serving up the page.

When I request www.mysite.com/somedirectory/, IIS looks at the default
documents and I get the 'directory listing forbidden' error, because there's
no default.aspx in the folder (there is only a default.ascx).

This would work with my HttpHandler if I could get IIS to pass these types
of requests on to it. Is there a way of doing this without A) putting a
dummy default.aspx in every folder, and B) not letting IIS serve .ASCX files
directly in the event someone requested a .ascx URL?

Thanks,
Brandon
Nov 18 '05 #1
1 1187
Go to the old vbpj site and do a searh for "hierarchical URL". There is a
great article on making friendly URLs and redirecting to other pages. While
not particularly your issue, it shows you how to use a HttpHandler to
redirect non-existent requests.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
"Brandon Potter" <msnews@brandonpotter_nospam.com> wrote in message
news:uD**************@TK2MSFTNGP15.phx.gbl...
I'm having a bit of trouble figuring out how to let IIS 6 pass on default
document requests for documents that don't exist to ASP.NET.

In a simplified version of my application, all of the "pages" are user
controls (.ascx files), and I have one "master page" (no, this is not 2.0)
that contains the template for the site. I have written an HttpHandler
that
takes the URL, which would be www.mysite.com/test.aspx, and process it
through template.aspx, load "test.asCx" into the content of the template,
etc. This works beautifully, except when IIS has to put some forethought
into serving up the page.

When I request www.mysite.com/somedirectory/, IIS looks at the default
documents and I get the 'directory listing forbidden' error, because
there's
no default.aspx in the folder (there is only a default.ascx).

This would work with my HttpHandler if I could get IIS to pass these types
of requests on to it. Is there a way of doing this without A) putting a
dummy default.aspx in every folder, and B) not letting IIS serve .ASCX
files
directly in the event someone requested a .ascx URL?

Thanks,
Brandon

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bengt Richter | last post by:
We have where syntax in combination with suite expression syntax (bear with me, I think a good synergy will emerge ;-) ...
1
by: VM | last post by:
Is it possible for the bound data in a web datagrid to be displayed in links? The grid will show the client's first name and last name and, when the user clicks on the first or last name, I want...
1
by: Andre | last post by:
I've set up the accessKey for my Submit button to 'S'. The usual Windows method for letting the user know would be to underline the 'S' in Submit on the button text. How do I do this in the Text...
13
by: darrel | last post by:
I had a conversation with a friend today. I'm working on a project where I have an XML file that stores the site structure and some page-centric variables. I have a handful of controls that will...
19
by: | last post by:
Just seeking some advice (or solace)... Am I the only who's having trouble letting go of notation? Having extensive experience in C++ years ago (both before I jumped into VB3 in college and at...
8
by: Good Man | last post by:
Hi there I was wondering if someone could help me out with the following two situations. In a lot of my web apps, it seems that if i launch a PHP script that takes a long time to complete,...
4
by: BerkshireGuy | last post by:
I have a form, with a subform that changes AllowsEdits,AllowAdditions, etc depending on who is coming in. This is done by using the OpenArgs and is working fine. However, if the user is...
18
by: Frank | last post by:
I'm using Sleep(100) and that works OK. However, it would be better if my app continued to receive and process keyboard messages. How can I pause the execution of code in one routine while...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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,...
0
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
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...

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.