Re: .NET code for creating IIS mapping
From: Alexander Rudyk (shura_rudyk_at_hotmail.com)
Date: 09/23/04
- Next message: axis: "sharing data between custom controls"
- Previous message: Phill. W: "Re: instead of localhost?"
- In reply to: Girish bharadwaj: "Re: .NET code for creating IIS mapping"
- Next in thread: Girish Bharadwaj: "Re: .NET code for creating IIS mapping"
- Reply: Girish Bharadwaj: "Re: .NET code for creating IIS mapping"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 23 Sep 2004 14:15:02 +0300
> <httpHandlers>
> <add path="*.txt" type="System.Web.HttpForbiddenHandler"/>
> </httpHandlers>
This handler works if the user request to some.txt file inside virtual dir
redirected to aspnet_isapi.dll. Only in this case this handler works. But
requests to *.txt files by default dose not redirected to any ISAPI
extension
and thus file content displayed by IE. To redirect requests to txt file to
ASP.NET runtime to I need add IIS mapping "*.txt -> aspnet_isapi.dll"
Main problem how can I do this by program code?
"Girish bharadwaj" <girishb@mvps.org> wrote in message
news:O9W%230dVoEHA.1176@TK2MSFTNGP12.phx.gbl...
> I am not sure I understand. If you want to handle specific extensions
> explicitly, check out the <httpHandlers> documentation for web.config. You
> will need to provide the path and the type. For the example you have
given,
> it might look something to the effect of
> <system.web>
> <httpHandlers>
> <add path="*.txt" type="System.Web.HttpForbiddenHandler"/>
> </httpHandlers>
> ...
> </system.web>
> ..
> in your web.config.
>
> --
> Girish Bharadwaj
> http://msmvps.com/gbvb
> "Alexander Rudyk" <shura_rudyk@hotmail.com> wrote in message
> news:eQ9oMBVoEHA.2824@TK2MSFTNGP10.phx.gbl...
> > Hi all.
> >
> > I need in my MSI custom action create IIS mapping for given virtual
> > directory.
> > For example, assosiate txt file extension with ASP.NET ISAPI to deny
> access
> > to txt file from IE.
> >
> > Maybe someone have example code or links to such code.
> >
> > Thanks
> >
> >
>
>
- Next message: axis: "sharing data between custom controls"
- Previous message: Phill. W: "Re: instead of localhost?"
- In reply to: Girish bharadwaj: "Re: .NET code for creating IIS mapping"
- Next in thread: Girish Bharadwaj: "Re: .NET code for creating IIS mapping"
- Reply: Girish Bharadwaj: "Re: .NET code for creating IIS mapping"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|