473,385 Members | 2,003 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,385 software developers and data experts.

Need .htm to go to both ASP.NET and for files

Hi;

This appears to be a bit of a problem. Our portal's help system is composed
of .htm files. So if the requested file is application/help/datasource.htm,
that is a file on disk that should be returned by IIS.

We also have htm files (reports) that are stored in the database. Those are
returned using:
<httpHandlers>
<add verb="*" path="report-view.*" type="ReportView"/>
</httpHandlers>

And for these we have to set it in IIS that .htm files are passes to ASP.NET
and do not require that the file exists.

However, when we set this in IIS, then the help.htm files are not returned.
How can we set it that if an httpHandler handles it. it returns the .htm file
but otherwise it looks on disk for the file.

It seems to me there must be a way to do this because this must be a common
need - htm files returned by both HttpHandlers and as files on disk.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Mar 16 '07 #1
3 1186
On Mar 16, 9:33 pm, David Thielen <thie...@nospam.nospamwrote:
Hi;

This appears to be a bit of a problem. Our portal's help system is composed
of .htm files. So if the requested file is application/help/datasource.htm,
that is a file on disk that should be returned by IIS.

We also have htm files (reports) that are stored in the database. Those are
returned using:
<httpHandlers>
<add verb="*" path="report-view.*" type="ReportView"/>
</httpHandlers>

And for these we have to set it in IIS that .htm files are passes to ASP.NET
and do not require that the file exists.

However, when we set this in IIS, then the help.htm files are not returned.
How can we set it that if an httpHandler handles it. it returns the .htm file
but otherwise it looks on disk for the file.

It seems to me there must be a way to do this because this must be a common
need - htm files returned by both HttpHandlers and as files on disk.
Try to add

<add path="/application/help/*.htm" verb="*"
type="System.Web.StaticFileHandler" />

Mar 16 '07 #2
awkard but it works - thanks

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


"Alexey Smirnov" wrote:
On Mar 16, 9:33 pm, David Thielen <thie...@nospam.nospamwrote:
Hi;

This appears to be a bit of a problem. Our portal's help system is composed
of .htm files. So if the requested file is application/help/datasource.htm,
that is a file on disk that should be returned by IIS.

We also have htm files (reports) that are stored in the database. Those are
returned using:
<httpHandlers>
<add verb="*" path="report-view.*" type="ReportView"/>
</httpHandlers>

And for these we have to set it in IIS that .htm files are passes to ASP.NET
and do not require that the file exists.

However, when we set this in IIS, then the help.htm files are not returned.
How can we set it that if an httpHandler handles it. it returns the .htm file
but otherwise it looks on disk for the file.

It seems to me there must be a way to do this because this must be a common
need - htm files returned by both HttpHandlers and as files on disk.

Try to add

<add path="/application/help/*.htm" verb="*"
type="System.Web.StaticFileHandler" />

Mar 17 '07 #3
Hi Dave,

As long as you've add the ".htm" extension mapping (in IIS virtual dir
configuration setting) to aspnet_isapi.dll, those .htm requests will be
handled by ASP.NET runtime rather than IIS's original static file
extensions. Therefore, if you haven't a dedicated handler for those
configured extensions(and want to serf them as normal static documents),
you need to add the "StaticFileHandler" for them in web.config
<httphandlerssection

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 19 '07 #4

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

Similar topics

0
by: lawrence | last post by:
Dear Peter, Do we know anyone else who writes PHP code? There is too much work to do, especially if Costin and I are going to join our software together. The easiest way for us to join our...
9
by: TPS | last post by:
I have a virtual directory where all posted files are stored. The ASP app does not have rights to the share on the other server where the vir dir resides. What is the best way to give the asp...
6
by: Wayne Wengert | last post by:
I am using VSNET 2003 to build an ASP.NET/VB set of pages. There are currently about a dozen aspx pages. When I make even a minor change to one page I currently rebuild the solution, copy the...
5
by: HSP | last post by:
hi. i need to restore an old database. The db was backed up using a DLT drive, using 2 volumes. The content for the tapes was copied to file onto Solaris machine using rsh and dd (for backup...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
2
by: Kidan | last post by:
I built a small application that took export files from a sales application, and transformed them into the format necessary for importing by an accounting application. Both the Sales and the...
8
by: Lloyd Sheen | last post by:
I have a list of JPG's which are found in a SQL Server database. When the page selects a certain piece of data it will refer to the file system (resident on IIS server with a virtual directory)...
5
by: Chuck Anderson | last post by:
I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC (Windows XP). One of the scripts that I run daily needs to access a secure URL (https://..............). When I am running Php4,...
0
by: dihola | last post by:
Hi all, I am developing 2 websites (A and B) that share a lot of pages and classes, and I wonder if I am doing it the right way. I have extracted the common classes and created master pages for all...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.