HttpHandler not working

D

deepa.ravikiran

I have created a HttpHandler to intercept *.zip requests, authenticate
and authorize user before allowing user to download the file. This
works perfectly when I run it from ASP.NET development server (from VS
2005).

But when I run it from our web app server (Windows Server 2003-R2, IIS
6.0) it gives me a 404 Page not found error from IIS. I have
mapped .zip to aspnet_isapi.dll in IIS. And I have this added to my
web.config

<httpHandlers>
<add verb="*" path="datafeed/*.zip"
type="XXX.Web.DataFeedHttpHandler.DataFeedHttpHandler" />
</httpHandlers>

Another thing different from my development environment is that the
Website on the app server is on Port 82 and not Port 80. Is this
causing the problem? Also is there any way I can debug and find out
where the error is occuring and get some more info on the error? (I
dont have VS 2005 on the app server)

Any help is highly appreciated.

Thanks,
Deepa
 
J

Juan T. Llibre

re:
!> But when I run it from our web app server (Windows Server 2003-R2, IIS
!> 6.0) it gives me a 404 Page not found error from IIS.

Does the account : NT AUTHORITY\NETWORK SERVICE
have read rights to the datafeed directory on the W2K3 server ?

The ASP.NET Development Server runs as MachineName\Administrator,
and automatically has read rights to the datafeed directory in your development box..

ASP.NET runs as NT AUTHORITY\NETWORK SERVICE on Windows Server 2003.
You have to, specifically, assign rights to the datafeed directory to that account on the server.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
D

deepa.ravikiran

Thanks for your reply. I have assigned read rights to the Datafeed
directory to the Network service account. I still get the 404 message.
I am not sure if it even comes to the aspnet_isapi.dll since the "Page
not found" message is from IIS. Does it have anything to do with the
non default port that I am using (port 82)??
Thanks.
 
J

Juan T. Llibre

re:
!>have anything to do with the non default port that I am using (port 82)??

No. The 404 Page not found error from IIS is typical error message for permission problems.

Make sure the NT AUTHORITY\NETWORK SERVICE
account has access rights to the directory and *.aspx files you execute.

You *did* enable ASP.NET on the W2K3 R2 server, right ?
You must, specifically, enable ASP.NET on W2K3.

And...you are *not* impersonating, are you ?
If you are, the account you're impersonating is the one which needs access permission.





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
Thanks for your reply. I have assigned read rights to the Datafeed
directory to the Network service account. I still get the 404 message.
I am not sure if it even comes to the aspnet_isapi.dll since the "Page
not found" message is from IIS. Does it have anything to do with the
non default port that I am using (port 82)??
Thanks.
 
D

deepa.ravikiran

re:
!>have anything to do with the non default port that I am using (port 82)??

No. The 404 Page not found error from IIS is typical error message for permission problems.

Make sure the NT AUTHORITY\NETWORK SERVICE
account has access rights to the directory and *.aspx files you execute.

You *did* enable ASP.NET on the W2K3 R2 server, right ?
You must, specifically, enable ASP.NET on W2K3.

And...you are *not* impersonating, are you ?
If you are, the account you're impersonating is the one which needs access permission.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/

Thanks for your reply. I have assigned read rights to the Datafeed
directory to the Network service account. I still get the 404 message.
I am not sure if it even comes to the aspnet_isapi.dll since the "Page
not found" message is from IIS. Does it have anything to do with the
non default port that I am using (port 82)??
Thanks.


The NETWORK SERVICE account has read rights on all the directories and
*aspx files. In fact, I also tried adding NETWORK SERVICE to
Administrators group. It still gave me 404. I am not using
impersonation. And I did not understand what you meant by enabling
ASP.NET on Win 2003. All the other pages on the website ok. Only the
download zip file link gives an error. The link is
http://localhost:82/datafeed/abcd.zip
(.zip is mapped to aspnet_isapi.dll in IIS)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top