Handling files that don"t exist
Handling files that don"t exist
am 27.12.2007 18:44:51 von PrePort
I use Vista Business and Visual Studio 2008 for web development. In the
past (VS 2005) I've always just uploaded a site to one of our servers, then
got on another server to see what it looks like in IE6. So the other day I
decided to install Virtual PC and got the IE6 vhd from the IE blog. For the
life of me I can not figure out how to connect to the web server that
VStudio starts up so I decided to map my local IIS to that same directory.
From my vpc I can see the website come up but it doesn't function properly
because some of the handlers I've got setup in the web.config aren't
executing.
Example:
Now that directory does not exist. It works fine in the web server that
VStudio starts and on our webserver. But I get an error "The resource can
not be found" on my local IIS machine.
Is there something fancy I have to do? Does it not read the web.config for
handler mappings?
I'd appreciate it if someone could point me in the right direction.
RE: Handling files that don"t exist
am 28.12.2007 10:16:15 von wjzhang
Hi Brian,
You'd clarify more on the exact error you got.
First of all, do you meet the 404 "The resource can not be found" error on
the whole web site or only on the virtual directory with the handler
installed? Also is this an error returned from ASP.net i.e: "Server Error
in 'xxx' Application. ", or it's just a general 404 error returned by IIS?
Also could you please collect the log files of the web site in
\System32\LogFiles\W3SVC[n]\ directory (n here is the Site ID which can be
viewed in the right panel by clicking Web Sites folder in IIS) and send the
files to me for reviewing? You can send the log files to me at:
wjzhang@online.microsoft.com (please remove online.)
Happy holidays!
Sincerely,
WenJun Zhang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at:
http://msdn.microsoft.com/subscriptions/support/default.aspx .
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Re: Handling files that don"t exist
am 28.12.2007 19:21:43 von PrePort
Now this might be my problem. There is no virtual directory, there is no
handler installed. In the VStudio web server the one web.config entry of:
maps all requests to the directory "ajaxpro/somefile.ashx" to the specified
handler. All done in the web.config. This directory does not actually
exist. This also works on our IIS 6 boxes. I just can't get it to work on
my local IIS box (Vista).
I get 404 errors "The resource cannot be found". Do I have to do something
more with my local IIS setup?
""WenJun Zhang[msft]"" wrote in message
news:x8raUJTSIHA.4200@TK2MSFTNGHUB02.phx.gbl...
> Hi Brian,
>
> You'd clarify more on the exact error you got.
>
> First of all, do you meet the 404 "The resource can not be found" error on
> the whole web site or only on the virtual directory with the handler
> installed? Also is this an error returned from ASP.net i.e: "Server Error
> in 'xxx' Application. ", or it's just a general 404 error returned by IIS?
>
> Also could you please collect the log files of the web site in
> \System32\LogFiles\W3SVC[n]\ directory (n here is the Site ID which can be
> viewed in the right panel by clicking Web Sites folder in IIS) and send
> the
> files to me for reviewing? You can send the log files to me at:
> wjzhang@online.microsoft.com (please remove online.)
>
> Happy holidays!
>
> Sincerely,
>
> WenJun Zhang
>
> Microsoft Online Community Support
>
> ==================================================
>
> Get notification to my posts through email? Please refer to:
> http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at:
>
> http://msdn.microsoft.com/subscriptions/support/default.aspx .
>
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
>
>
Re: Handling files that don"t exist
am 30.12.2007 03:04:08 von David Wang
Is the entry under the or section.
Is the Application Pool used by the application in Integrated or
Classic mode.
The mode determines whether or section is
used, so if the is in the wrong section, it won't take effect,
so IIS can return 404.
Also, please report the actual log entry for the 404. The IIS7 log
files are at:
%systemdrive%\inetpub\logs\LogFiles\W3SVC#\*.log
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
On Dec 28, 10:21=A0am, "EDBrian" wrote:
> Now this might be my problem. =A0There is no virtual directory, there is n=
o
> handler installed. =A0In the VStudio web server the one web.config entry o=
f:
>
>
,
> AjaxPro.2" />
>
> maps all requests to the directory "ajaxpro/somefile.ashx" to the specifie=
d
> handler. =A0All done in the web.config. =A0This directory does not actuall=
y
> exist. =A0This also works on our IIS 6 boxes. =A0I just can't get it to wo=
rk on
> my local IIS box (Vista).
>
> I get 404 errors "The resource cannot be found". =A0Do I have to do someth=
ing
> more with my local IIS setup?
>
> ""WenJun Zhang[msft]"" wrote in message
>
> news:x8raUJTSIHA.4200@TK2MSFTNGHUB02.phx.gbl...
>
>
>
> > Hi Brian,
>
> > You'd clarify more on the exact error you got.
>
> > First of all, do you meet the 404 "The resource can not be found" error =
on
> > the whole web site or only on the virtual directory with the handler
> > installed? Also is this an error returned from ASP.net i.e: "Server Erro=
r
> > in 'xxx' Application. ", or it's just a general 404 error returned by II=
S?
>
> > Also could you please collect the log files of the web site in
> > \System32\LogFiles\W3SVC[n]\ directory (n here is the Site ID which can =
be
> > viewed in the right panel by clicking Web Sites folder in IIS) and send
> > the
> > files to me for reviewing? You can send the log files to me at:
> > wjzh...@online.microsoft.com (please remove online.)
>
> > Happy holidays!
>
> > Sincerely,
>
> > WenJun Zhang
>
> > Microsoft Online Community Support
>
> > ==================== =====
==================== =====3D=
=3D
>
> > Get notification to my posts through email? Please refer to:
> >http://msdn.microsoft.com/subscriptions/managednewsgroups/d efault.asp...
> > ications.
>
> > Note: The MSDN Managed Newsgroup support offering is for non-urgent issu=
es
> > where an initial response from the community or a Microsoft Support
> > Engineer within 1 business day is acceptable. Please note that each foll=
ow
> > up response may take approximately 2 business days as the support
> > professional working with you may need further investigation to reach th=
e
> > most efficient resolution. The offering is not appropriate for situation=
s
> > that require urgent, real-time or phone-based interactions or complex
> > project analysis and dump analysis issues. Issues of this nature are bes=
t
> > handled working with a dedicated Microsoft Support Engineer by contactin=
g
> > Microsoft Customer Support Services (CSS) at:
>
> >http://msdn.microsoft.com/subscriptions/support/default.asp x.
>
> > ==================== =====
==================== =====3D=
=3D
>
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.- Hide quoted text -
>
> - Show quoted text -
Re: Handling files that don"t exist
am 31.12.2007 03:52:08 von PrePort
It's in Integrated mode. and the is under the .
The log entry looks like this:
2007-12-28 18:18:40 192.168.1.102 GET /ajaxpro/prototype.ashx - 80 -
192.168.1.102
Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US;+rv:1.8.1.11) +Gecko/20071127+Firefox/2.0.0.11
404 0 0
"David Wang" wrote in message
news:0c7c839e-dd66-4a77-8556-d1ae67a1bb2a@l1g2000hsa.googleg roups.com...
Is the entry under the or section.
Is the Application Pool used by the application in Integrated or
Classic mode.
The mode determines whether or section is
used, so if the is in the wrong section, it won't take effect,
so IIS can return 404.
Also, please report the actual log entry for the 404. The IIS7 log
files are at:
%systemdrive%\inetpub\logs\LogFiles\W3SVC#\*.log
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
On Dec 28, 10:21 am, "EDBrian" wrote:
> Now this might be my problem. There is no virtual directory, there is no
> handler installed. In the VStudio web server the one web.config entry of:
>
>
>
> maps all requests to the directory "ajaxpro/somefile.ashx" to the
> specified
> handler. All done in the web.config. This directory does not actually
> exist. This also works on our IIS 6 boxes. I just can't get it to work on
> my local IIS box (Vista).
>
> I get 404 errors "The resource cannot be found". Do I have to do something
> more with my local IIS setup?
>
> ""WenJun Zhang[msft]"" wrote in message
>
> news:x8raUJTSIHA.4200@TK2MSFTNGHUB02.phx.gbl...
>
>
>
> > Hi Brian,
>
> > You'd clarify more on the exact error you got.
>
> > First of all, do you meet the 404 "The resource can not be found" error
> > on
> > the whole web site or only on the virtual directory with the handler
> > installed? Also is this an error returned from ASP.net i.e: "Server
> > Error
> > in 'xxx' Application. ", or it's just a general 404 error returned by
> > IIS?
>
> > Also could you please collect the log files of the web site in
> > \System32\LogFiles\W3SVC[n]\ directory (n here is the Site ID which can
> > be
> > viewed in the right panel by clicking Web Sites folder in IIS) and send
> > the
> > files to me for reviewing? You can send the log files to me at:
> > wjzh...@online.microsoft.com (please remove online.)
>
> > Happy holidays!
>
> > Sincerely,
>
> > WenJun Zhang
>
> > Microsoft Online Community Support
>
> > ==================================================
>
> > Get notification to my posts through email? Please refer to:
> >http://msdn.microsoft.com/subscriptions/managednewsgroups/d efault.asp...
> > ications.
>
> > Note: The MSDN Managed Newsgroup support offering is for non-urgent
> > issues
> > where an initial response from the community or a Microsoft Support
> > Engineer within 1 business day is acceptable. Please note that each
> > follow
> > up response may take approximately 2 business days as the support
> > professional working with you may need further investigation to reach
> > the
> > most efficient resolution. The offering is not appropriate for
> > situations
> > that require urgent, real-time or phone-based interactions or complex
> > project analysis and dump analysis issues. Issues of this nature are
> > best
> > handled working with a dedicated Microsoft Support Engineer by
> > contacting
> > Microsoft Customer Support Services (CSS) at:
>
> >http://msdn.microsoft.com/subscriptions/support/default.asp x.
>
> > ==================================================
>
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.- Hide quoted text -
>
> - Show quoted text -
Re: Handling files that don"t exist
am 31.12.2007 05:18:35 von David Wang
Thanks. That explains everything. Please move the element to be
under .
In Integrated mode, Managed Code extensibility reads handlers from
system.webServer/handlers section. In classic mode, ASP.Net will read
handlers from system.web/httpHandlers section (since that's what it
did on prior versions of IIS).
You must have turned off IIS7's Configuration Validation Module since
that module warns you when you have a dependency on
while IIS7 is in Integrated Mode and would give you the exact command
to migrate your current configuration into Integrated Mode which works
(most of the time, anyway...).
Now, we could have implemented IIS7 in such a way that the above
mentioned migration "just works" (sorta, with caveats that I'll skip
over unless you're really interested in the details), but we decided
for a cleaner IIS7 implementation based on user intention with
"Integrated Mode" vs "Classic Mode". While it does generate a little
confusion up front, I think it's better for the long term that users
know what they are configuring instead of IIS magically doing little
tweaks here and there which generate usability legacy for future IIS
versions.
"Integrated mode" allows superior integration of managed code into IIS
request processing (just about all the hacks and hoops that you *used*
to jump through with ASP.Net 2.0 + IIS 6.0 by configuring
aspnet_isapi.dll as wildcard application mapping and extending
DefaultHttpHandler are not necessary and actually does not work and
can break IIS7).
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
On Dec 30, 6:52=A0pm, "EDBrian" wrote:
> It's in Integrated mode. and the is under the .
> The log entry looks like this:
>
> 2007-12-28 18:18:40 192.168.1.102 GET /ajaxpro/prototype.ashx - 80 -
> 192.168.1.102
> Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US;+rv:1.8.1.11) +Gecko/2007112=
7=AD+Firefox/2.0.0.11
> 404 0 0
>
> "David Wang" wrote in message
>
> news:0c7c839e-dd66-4a77-8556-d1ae67a1bb2a@l1g2000hsa.googleg roups.com...
> Is the entry under the or section.
> Is the Application Pool used by the application in Integrated or
> Classic mode.
>
> The mode determines whether or section is
> used, so if the is in the wrong section, it won't take effect,
> so IIS can return 404.
>
> Also, please report the actual log entry for the 404. The IIS7 log
> files are at:
> %systemdrive%\inetpub\logs\LogFiles\W3SVC#\*.log
>
> //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> //
>
> On Dec 28, 10:21 am, "EDBrian" wrote:
>
>
>
> > Now this might be my problem. There is no virtual directory, there is no=
> > handler installed. In the VStudio web server the one web.config entry of=
:
>
> >
ry,
> > AjaxPro.2" />
>
> > maps all requests to the directory "ajaxpro/somefile.ashx" to the
> > specified
> > handler. All done in the web.config. This directory does not actually
> > exist. This also works on our IIS 6 boxes. I just can't get it to work o=
n
> > my local IIS box (Vista).
>
> > I get 404 errors "The resource cannot be found". Do I have to do somethi=
ng
> > more with my local IIS setup?
>
> > ""WenJun Zhang[msft]"" wrote in message
>
> >news:x8raUJTSIHA.4200@TK2MSFTNGHUB02.phx.gbl...
>
> > > Hi Brian,
>
> > > You'd clarify more on the exact error you got.
>
> > > First of all, do you meet the 404 "The resource can not be found" erro=
r
> > > on
> > > the whole web site or only on the virtual directory with the handler
> > > installed? Also is this an error returned from ASP.net i.e: "Server
> > > Error
> > > in 'xxx' Application. ", or it's just a general 404 error returned by
> > > IIS?
>
> > > Also could you please collect the log files of the web site in
> > > \System32\LogFiles\W3SVC[n]\ directory (n here is the Site ID which ca=
n
> > > be
> > > viewed in the right panel by clicking Web Sites folder in IIS) and sen=
d
> > > the
> > > files to me for reviewing? You can send the log files to me at:
> > > wjzh...@online.microsoft.com (please remove online.)
>
> > > Happy holidays!
>
> > > Sincerely,
>
> > > WenJun Zhang
>
> > > Microsoft Online Community Support
>
> > > ==================== ===3D=
==================== =====3D=
==
>
> > > Get notification to my posts through email? Please refer to:
> > >http://msdn.microsoft.com/subscriptions/managednewsgroups/d efault.asp..=
..
> > > ications.
>
> > > Note: The MSDN Managed Newsgroup support offering is for non-urgent
> > > issues
> > > where an initial response from the community or a Microsoft Support
> > > Engineer within 1 business day is acceptable. Please note that each
> > > follow
> > > up response may take approximately 2 business days as the support
> > > professional working with you may need further investigation to reach
> > > the
> > > most efficient resolution. The offering is not appropriate for
> > > situations
> > > that require urgent, real-time or phone-based interactions or complex
> > > project analysis and dump analysis issues. Issues of this nature are
> > > best
> > > handled working with a dedicated Microsoft Support Engineer by
> > > contacting
> > > Microsoft Customer Support Services (CSS) at:
>
> > >http://msdn.microsoft.com/subscriptions/support/default.asp x.
>
> > > ==================== ===3D=
==================== =====3D=
==
>
> > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
Re: Handling files that don"t exist
am 01.01.2008 19:56:07 von PrePort
Thank you very much. It's working now. I ended up changing the website
that I created to the "Classic .NET AppPool" because we aren't running IIS 7
anywhere. My goal was to view my development site(s) with IE 6 and now that
I got IIS 7 to work like the web server that comes with VStudio, all is
well.
Again, thank you very much.
Problem Solved.
"David Wang" wrote in message
news:f3135874-f01c-4ee8-bbec-44aa654571ee@n20g2000hsh.google groups.com...
Thanks. That explains everything. Please move the element to be
under .
In Integrated mode, Managed Code extensibility reads handlers from
system.webServer/handlers section. In classic mode, ASP.Net will read
handlers from system.web/httpHandlers section (since that's what it
did on prior versions of IIS).
You must have turned off IIS7's Configuration Validation Module since
that module warns you when you have a dependency on
while IIS7 is in Integrated Mode and would give you the exact command
to migrate your current configuration into Integrated Mode which works
(most of the time, anyway...).
Now, we could have implemented IIS7 in such a way that the above
mentioned migration "just works" (sorta, with caveats that I'll skip
over unless you're really interested in the details), but we decided
for a cleaner IIS7 implementation based on user intention with
"Integrated Mode" vs "Classic Mode". While it does generate a little
confusion up front, I think it's better for the long term that users
know what they are configuring instead of IIS magically doing little
tweaks here and there which generate usability legacy for future IIS
versions.
"Integrated mode" allows superior integration of managed code into IIS
request processing (just about all the hacks and hoops that you *used*
to jump through with ASP.Net 2.0 + IIS 6.0 by configuring
aspnet_isapi.dll as wildcard application mapping and extending
DefaultHttpHandler are not necessary and actually does not work and
can break IIS7).
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//