GLT10 replied...
20-Oct-06 03:33 PM
Hi,

We have a web application that contains a legacy page
with the .cfm file extension. The page contains an inline
.Net c# script. We have an application configuration
mapping in IIS that maps the .cfm extension to the .Net
ISAPI:
c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll

We have a httphandler set up in the web.config file thus:


Under .Net1.1 this worked allowing the .Net script within
the .cfm file to be executed. Under.Net2.0, the file is found,
but nothing other than a http 200 status is returned. The
debug trace registers the fact that IIS found the .cfm file,
but the "Trace Information", "Control Tree", "Session State"
and "Application state" sections are all empty.

It is as though the .Net2.0 engine ignores the file contents
completely. What's going on here? Why isn't the script
executed?

Cheers,
Geoff
Mapping
(1)
Longer
(1)
Application
(1)
Contains
(1)
Legacy
(1)
Extension
(1)
Inline
(1)
Script
(1)
  David Wang replied...
21-Oct-06 06:06 AM
This is really an ASP.Net question, so I suggest asking in ASP.Net
Forums at www.asp.net.

As you stated, IIS handed the .cfm resource to aspnet_isapi.dll for
processing, which means this really is not an IIS issue.

I suggest you copy .aspx Application Mapping definition in IIS and
ASP.Net httpHandlerdefinition exactly, except for switching .cfm for
.aspx, and the behavior should be the same. Unless you have other
custom software running on the server that is behaving differently for
.cfm extension vs .aspx extension. I don't know what custom software
like ISAPI Filter, ISAPI Extension, or ASP.Net httpModule you may be
running, so I cannot comment further


//David
http://w3-4u.blogspot.com
//
  GLT10 replied...
24-Oct-06 02:53 PM
Hi David,

Thanks for the response. I tried asking on asp.net. No reponse since Friday
yet.

I still suspect an issue related to IIS since this worked before we upgraded
to .Net 2.0.

To address the points you raised:
copy .aspx Application Mapping definition in IIS and ASP.Net
httpHandlerdefinition exactly, except for switching .cfm for ..aspx. This is
exactly what I did originally.

There is no other ISAPI filter or exteniosn that will handle .cfm files.
An old incarnation of the site on different hardware was a ColdFusion
site, but that was long ago on different hardware.

I forgot to include:
IIS6.0 on
Windows Server 2003 SP1 with SQL Server 2000

Cheers,
Geoff
  David Wang replied...
24-Oct-06 06:56 PM
Can you please make sure that your .cfm httpHandler definition is
located right after the .aspx httpHandler definition in the web.config
file. In general, on ASP.Net 2.0, you want your defined httpHandler to
be *before* any other httpHandler using/deriving-from the
DefaultHttpHandler. If you do not do this, you will most likely observe
different behavior between ASP.Net 1.x and 2.0 on IIS 6.0, and that is
by-design.

Yes, this incongruous behavior can be confusing and different from
prior ASP.Net behavior, and explaining will require more background
understanding of both IIS and ASP.Net request pipeline. IIS7 will
attempt to rationalize all of this.

Let me clarify that ASP.Net and .Net Framework are completely separate
products from IIS. The sequence of events that happen during request
processing goes from IIS to ASP.Net to .Net Framework, then back out
through ASP.Net and then IIS.

So when you say that you see this issue after upgrading to .Net
Framework 2.0 and your trace says that .cfm request got into .Net, you
basically invalidate your suspicion that the issue is related to IIS.
Your statement tells me that IIS is NOT involved. Not to mention all
the problems that you see are within ASP.Net constructs unrelated to
IIS.

Now, you said that your .cfm httpHandler/ApplicationMapping now returns
HTTP status 200 -- is that what the browser claims it got, what the
server actually logged into its log file (please provide the exact log
entry from the log file), or something else that you interpreted.


//David
http://w3-4u.blogspot.com
//
  GLT10 replied...
25-Oct-06 12:23 PM
Hi David,

Thanks for the clarification.
Answers to your questions:
1) You said:
located right after the .aspx httpHandler definition in the web.config
file."

There is only one httphandler definition in the web config file:
So order/derivation should not be an issue should it?

2) You said:
server actually logged into its log file (please provide the exact log
entry from the log file)"

That is the status I see returned "on the wire" using the packet sniffer
Ethereal. Here is the associated entry in the IIS Log:
2006-10-25 15:59:35 10.10.10.19 GET /www/downloads/demo/upload_action.cfm -
80 - 10.10.10.63 Opera/9.02+(Windows+NT+5.0;+U;+en) 200 0 0

I am now repeating the set up on clean hardware so that I can
write steps to reproduce the behaviour. I think that's the only
way we'll figure out what's wrong here.

Thanks again for the help!
Geoff.



Cheers,
Geoff.
  GLT10 replied...
25-Oct-06 01:19 PM
At last I found it!

In building the steps to reproduce the error on clean hardware,
when I switched the test site to .Net2.0 I got the error:
register one in the <compilation><buildProviders> section in machine.config
or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute
which includes the value 'Web' or 'All'."

I added the lines:
type="System.Web.Compilation.PageBuildProvider" />
to the web.config file and now the script executes. I have never seen
this mentioned anywhere as a requirement for allowing a file extension
mapping to work.

Also adding the attribute "BuildProviderAppliesToAttribute"
causes an Unrecognized attribute error. No idea what's up with that.

Cheers,
Geoff
  David Wang replied...
25-Oct-06 02:23 PM
Glad you found a solution.


Not correct. Collections (the ones with a list of values, such as
httpHandlers, httpModules, even buildProviders) are item lists whose
ordering and effective value depend on where it merges into the entire
web.config hierarchy. In other words, the above definition simply says
do not see it, there are at least two other .config higher in the
hierarchy which provide values for httpHandlers.

So, all you have done is to append a new httpHandler for the
application that your web.config applies to.

If you wanted to make sure that httpHandlers applicable at that scope
contains ONLY your new httpHandler, you'd use:

/>


However, you'd probably find other things that break when you do
this...

In other words, when you are tweaking these values, you need to know
the exact net-effect of what you are doing.



Well, I'm wager that maybe it is because not many people execute
ASP.Net code using another file extension - they'd just use .aspx,
which is pre-configured and working... so, you're probably doing
something that few people do, and those that do, know about
BuildProviders because they are writing custom ones.

When it comes to modifying httpModules and httpHandlers, I would not
assume that the same syntax provides the same behavior from version to
version. For example, it all changes once again in IIS7 for other good
reasons. So, for any given httpHandler/httpModule collection, it could
have different behaviors on ASP.Net 1.0/1.1, ASP.Net 2.0, and IIS7.


//David
http://w3-4u.blogspot.com
//
  GLT10 replied...
25-Oct-06 02:37 PM
Thanks again David.

That's a good "Heads-up" about IIS 7. I guess I can expect
similar problems when we move up to that. Do you have a
link to some information on IIS7? I have not seen much
about that yet.

Cheers,
Geoff.
IIS - .cfm to .aspx mapping no longer works after upg to .Net2.0
Asked By Bernard Cheah [MVP]
25-Oct-06 10:45 PM
www.iis.net

--
Regards,
Bernard Cheah
http://www.iis.net/
http://www.iis-resources.com/
http://msmvps.com/blogs/bernard/
help
Application Extension Mapping, not working? IIS Hello, I think I followed the steps necessary to have a new to be either "Scripts" or "Scripts and Executables" 2. Configure ASPNET_ISAPI.DLL to be the Application Mapping for the extension 3. Configure a PageHandler to be the httpHandler inside of web.config existing configuration for .aspx. After you have done #1 and #2, the question is no longer an IIS-related question. Details of ASP.Net behavior is best discussed in a forum move the discussion to the asp.net forum. Thanks for pointing that out. Eric keywords: Application, Extension, Mapping, , not, working? description: Hello, I think I followed the steps necessary to have a new
URL of your simple server side script which results in the error 2. The applicable Application mapping for the extension of the URL in 3. The exact content of your URL (or com http: / / blogs.msdn.com / David.Wang / / The error in the parent message is no longer the problem. I think I might of been running two webservers apps on my local The message I get when turning off IE's "Show Friendly HTTP Errors" is: Server Application Error The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail there will be a status code for troubleshooting. You also have not provided the actual Application Mapping defined for .asp on your server installation. It is necessary to determine if you actually blogspot.com http: / / blogs.msdn.com / David.Wang / / e in The IIS Default Web Site Application Configuration Mapping for Extension Verbs = "GET, HEAD, POST, TRACE" IIS also fails for .aspx files
How to pass user credentials to IE IIS Hi, My application needs to call a IIS web based application that requires Windows based authentication. The user credentials that our application will use is not the same as the user logged onto the workstation. When calling how I can pass the user credentials to IE to avoid the browser prompt. My application is a Windows client application. Thanks IIS Security Discussions IIS (1) IE (1) ThanksNo (1) KanesRe (1) RegKey (1) URL (1) ID (1) Application (1) No longer possible for IE to automatically pass server-configured username:password back to the server. That security patch and RegKey control. You can try creating a vdir pointing to your Web application on IIS with only Anonymous authentication enabled and set the Anonymous user to be the
Web Service Extensions per Application IIS Hello, is there any way to disable WebDAV extension just for my application? Running IIS6. Thanks, Jan IIS Discussions SharePoint (1) Office (1) NICACZd (1) ASP.NET (1 OPTIONS, PROPFIND. . .) are denied in \ WINDOWS \ system32 \ inetsrv \ urlscan \ urlscan.ini. So users will no longer be able to open the site / vdir as web folders in browser. I hope the your answer. Unfortunately, your solution does not solve my problem. I thought there could be application-specific setting because there is "Allow all extensions for specific application" setting in the IIS console. That way, I could achieve my request by prohibiting the The reason why I'm asking for this is, that my ASP.NET 2.0 application handles the WebDAV requests itself. The IIS built-in "WebDAV extension" however, handles these requests before they have ever chance to reach my application. If I prohibit this extension, everything works perfectly. But, I don't want to force create such ISAPI filter, which would redirect the WebDAV requests direct to my ASP.NET application, that means, I wouldn't have to change the ASP.NET code itself? (as it