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

Send page requset of page.txt to IIS.ASP

Hi;

This works fine on my development system but fails on IIS on Win 2003. I
have requests for filename.txt, filename.rtf, etc that must go to my ASP.NET
code. I have the following in my web.config:
<httpHandlers>
<add verb="*" path="report-create.*" type="ReportCreate"/>
<add verb="*" path="report-view.*" type="ReportView"/>
<add verb="*" path="template-file.*" type="TemplateFile"/>
</httpHandlers>

And in IIS I went for my app to properties, Directory tab, Configuration
button, and added application exceptions for .txt, .rtf, etc giving them the
executable c:\windows\microsoft.net\framework\v2.0.50727\aspn et_isapi.dll

I then restarted IIS.

But, it still does not send those requests to my code. If I use an extension
of .aspx then I do get the request.

Any ideas?

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

Cubicle Wars - http://www.windwardreports.com/film.htm
Sep 15 '06 #1
6 1584
Hello Dave,

As for the Httphanders registering ,based on my experience, the path
attributre of httphandlers <addelement in web.config can only support
wildcard in the filename part, but not the document extension. Based on my
local test, so far we can get the following path to work when registering
custom httphandler for IIS hosted ASP.NET web application:

1) path="*", the handler will process all the comming ASP.NET requests

2) path="*.ext", the handler will process all the comming ASP.NET request
point to a certain document extension type.
For your scenario, you may need to explicitly add all those extension types
in the <httphandlerssection( *.doc, *.txt, .....).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 18 '06 #2
Hi;

Tried that - still no luck.

To repeat, when running under Visual Studio, then
<add verb="*" path="report-create.*" type="ReportCreate"/>
works great.

When running on Windows 2003/IIS then
<add verb="*" path="report-create.*" type="ReportCreate"/>
<add verb="*" path="report-create.txt" type="ReportCreate"/>
both do not work for report-create.txt. And report-create.aspx does go to my
code - but then IE thinks it's xml or html and says it's a malformed file.

And it returns very very fast when I go to report-create.txt so I am
guessing ASP.NET is never given the request. Is there something I need to do
beside the MIME types in IIS to have ASP.NET get files with this extension?

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

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


"Steven Cheng[MSFT]" wrote:
Hello Dave,

As for the Httphanders registering ,based on my experience, the path
attributre of httphandlers <addelement in web.config can only support
wildcard in the filename part, but not the document extension. Based on my
local test, so far we can get the following path to work when registering
custom httphandler for IIS hosted ASP.NET web application:

1) path="*", the handler will process all the comming ASP.NET requests

2) path="*.ext", the handler will process all the comming ASP.NET request
point to a certain document extension type.
For your scenario, you may need to explicitly add all those extension types
in the <httphandlerssection( *.doc, *.txt, .....).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 21 '06 #3
Hi;

I already did that. I set it for "Web SItes", "Default Web Site", and
"portal" (which is the website of my app). I am using the .NET 2.0 filter
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspn et_isapi.dll and for verbs
I selected ALL.

Still doesn't work. Any other ideas?

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

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


"Steven Cheng[MSFT]" wrote:
Hello Dave,

Thanks for your reply.

the VS 2005 Test server is a manged application which will intercept all
the requests from client browser, and pass it to ASP.NET runtime engine.
While for IIS hosted scenario, all the requests first arrive IIS and IIS
will filter those requests that will not be processed by ASP.NET engine.

thus, those static file extensions(like jpg, txt, css ....) won't be
processed by ASP.NET by default. That's why the following handler setting
not work:

<add verb="*" path="report-create.txt" type="ReportCreate"/>

since .txt extension request is processed by IIS directly(without router to
ASP.NET). You need to add the extension mapping for those particular
extension in IIS also. I've attached a screenshot on the IIS extension
mapping in IIS manager console.

For the below path setting, it is not supported by ASP.NET httphandler so
far(wildcard in extension name):

<add verb="*" path="report-create.*" type="ReportCreate"/>

Hope this helps. Please feel free to let me know if there is anything
unclear on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights
Oct 2 '06 #4
Hi Dave,

Thanks for the followup.

I've also found your another new thread below:

Newsgroups: microsoft.public.dotnet.framework.aspnet
Subject: Set IHttpHandler for all files in a directory?

I've posted my reply there and please feel free to post in that thread.
Sincerely,

Steven Cheng

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

Oct 3 '06 #5
Found it - the post by q in the other thread. I had to turn off verify that
file exists. Works great now.

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

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


"Steven Cheng[MSFT]" wrote:
Hi Dave,

Thanks for the followup.

I've also found your another new thread below:

Newsgroups: microsoft.public.dotnet.framework.aspnet
Subject: Set IHttpHandler for all files in a directory?

I've posted my reply there and please feel free to post in that thread.
Sincerely,

Steven Cheng

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

Oct 3 '06 #6
Good news :)

Seems still caused by IIS setting.

Have a good day!
Sincerely,

Steven Cheng

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

Oct 4 '06 #7

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

Similar topics

3
by: Erik T. Nomad | last post by:
I've created a link that will enable the reader of any page on my website to click it, enter an e-mail address, and have it arrive in that inbox with a hyperlink to the site. However, I'm...
0
by: Liora | last post by:
I have a Web form with a hidden text-box that contain XML data. When the application has been compiled and run at visual studio 2002, I could reach the XML data and all worked fine. Under the...
5
by: Pete Loveall | last post by:
I have a server application that monitors a private local queue for messages. The message sent to it has a label and a response queue defined. It works correctly when the queue is accessed via...
5
by: zorhel | last post by:
Hi. My clients will be IE, Mozilla and Opera in a Windows and *nix OS. So, my web app need to, from a server, send messages to a specific client (browser), send messages for all clients,...
9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
4
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
I have a web page that at the click of a button must send a bunch (1000+) emails. Each email is sent individually. I have the code working fine, using Mail Message classes and smtp and all that. ...
3
by: Lucky | last post by:
Hi guys, i'm stuck in very odd situation here, the problem is i need to ask one aspx page to give me data from another aspx page. the flow in like this: Page1_load() { string...
3
digicrowd
by: digicrowd | last post by:
http://bytes.com/images/howtos/applemail_sig_icon.jpg You can make your emails fancy in Mail.app by using Rich Text formatting or even included Stationery. But, a simple way to send your own HTML...
0
by: nidhisahu | last post by:
Hello All, i am open this URL( http://id.skootit.com/WorkspaceService/ListInvitations?actor=http://goku.id.skootit.com/) directly in browser with enter credential then its open and show...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.