473,770 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="ReportCre ate"/>
<add verb="*" path="report-view.*" type="ReportVie w"/>
<add verb="*" path="template-file.*" type="TemplateF ile"/>
</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\micr osoft.net\frame work\v2.0.50727 \aspnet_isapi.d ll

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_windwa rd_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Sep 15 '06 #1
6 1599
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 <httphandlersse ction( *.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="ReportCre ate"/>
works great.

When running on Windows 2003/IIS then
<add verb="*" path="report-create.*" type="ReportCre ate"/>
<add verb="*" path="report-create.txt" type="ReportCre ate"/>
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_windwa rd_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 <httphandlersse ction( *.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\Micr osoft.NET\Frame work\v2.0.50727 \aspnet_isapi.d ll and for verbs
I selected ALL.

Still doesn't work. Any other ideas?

--
thanks - dave
david_at_windwa rd_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="ReportCre ate"/>

since .txt extension request is processed by IIS directly(withou t 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="ReportCre ate"/>

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.publi c.dotnet.framew ork.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_windwa rd_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.publi c.dotnet.framew ork.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
3348
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 wondering if there's a way to customize it further, such that the hyperlink they are sent is the web address of the page the "send to friend" link was on. I don't want to convert my entire site over to .asp, so having a pop-up .asp page seems to make...
0
1050
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 new version(vs 2003) I got this error: Server error about a potentially dangerous Requset.Form value from client. (I think it's a new security level)
5
7998
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 another program. However, when I attempt to Send a message from an ASP.NET VB page, I get "One or more of the passed properties are invalid." I have tried different combinations of the non-transactional Send() with no success. My Windows\Temp...
5
4855
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, redirect a client to another page. In other way, a client will be able to send messages to another client, throw the server. These are the first funcionalities.
9
3157
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 other page, or is there something else like a stream which will be like a file. I am attempting to get a way from writing out a file and then having to give the page that I am posting to the file name. Instead I would like to just from asp.net...
4
7684
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. But sometimes even when I'm just sending one e-mail the web page takes a minutes or so to post. Can anyone tell me why it is so slow, or how to fix the problem? To address this I am thinking of just creating a queue table to write the emails...
3
1186
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 value=requstPage2(); processvalue(value);
3
100085
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 creation (or any web page for that matter) is to use Safari. Follow these four easy steps. 1. Create the HTML Layout your HTML code including any images or graphics you'd like to include. In this example, we will make a simple birthday email to add...
0
3536
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 xml data. but if i used this url in code means i send Requset and post data on server then i am getting Error(The remote server returned an error: (401) Unauthorized.) here i used same credentials. I send request by this code. HttpWebRequest...
0
9618
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10259
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9906
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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 we have to send another system

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.