Re: Creating HttpHandlers

From: clintonG (csgallagher_at_REMOVETHISTEXT@metromilwaukee.com)
Date: 06/25/04


Date: Fri, 25 Jun 2004 15:21:05 -0500

Google: "url rewriting" and variants as there are many articles
that document the objective.

-- 
<%= Clinton Gallagher
         A/E/C Consulting, Web Design, e-Commerce Software Development
         Wauwatosa, Milwaukee County, Wisconsin USA
         NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
         URL http://www.metromilwaukee.com/clintongallagher/
"Prince" <anonymous@discussions.microsoft.com> wrote in message
news:2191501c45adb$bc36c460$a501280a@phx.gbl...
> It could also be a directory:  For example, if you type
> into your browser www.microsoft.com/developer  it is
> redirected to another page.  I wish to do something as
> simple as that since I don't have access to IIS.  My
> website is being hosted so I would like to accomplish the
> same thing or something very similar.
>
>
> >-----Original Message-----
> >I have the following code within the ASP.NET project I
> >have created.
> >
> >public class RedirectHandler : IHttpHandler{
> >  //empty constructor
> >  public void ProcessRequest(HttpContext context){
> >      response.Redirect("page2.aspx");
> >  }
> >  public bool IsReusable(){
> >     get {return false;}
> >  }
> >}
> >
> >then in the Web.config file, within the <System.web> I
> >have
> >
> ><httpHandlers>
> >    <add verb="*" path="*/xxx" type="RedirectHandler" />
> ></httpHandlers>
> >
> >Basically, what I'm trying to do is, when a user enters,
> >www.xyz.com/xxx, I want the browser to redirect to
> >www.xyz.com/xxx.aspx.  I don't mind if the user sees the
> >url in the address.  There is no page named xxx.  The
> >page is xxx.aspx but I don't want the person to HAVE to
> >enter the extension.  They can but I don't want them to
> >HAVE to.
> >
> >When I run the program, I get the following error.
> >
> >Description: An error occurred during the processing of
> a
> >configuration file required to service this request.
> >Please review the specific error details below and
> modify
> >your configuration file appropriately.
> >
> >Parser Error Message: Could not load type
> >DistributorRedirectHandler from assembly System.Web
> >
> >It then highlights the <add verb="*" .....
> >line.  Can anyone explain what this error message means
> >and how I can address it?
> >
> >thanks,
> >Prince
> >.
> >


Relevant Pages

  • Creating HttpHandlers
    ... into your browser www.microsoft.com/developer it is ... >public class RedirectHandler: IHttpHandler{ ... >configuration file required to service this request. ... Can anyone explain what this error message means ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Error with Remote Workspace
    ... this is a relatively new installation of SBS and this ... An error occurred during the processing of a configuration file ... Parser Error Message: Unable to read the security policy file for trust ... Will you encounter the same error message when clicking "Backup" or ...
    (microsoft.public.windows.server.sbs)
  • Configuration Error...
    ... An error occurred during the processing of a configuration file ... Parser Error Message: Access is denied: 'WebChart'. ... LOG: DisplayName = WebChart ... LOG: Post-policy reference: WebChart ...
    (microsoft.public.dotnet.framework.aspnet)
  • Configuration Errors
    ... An error occurred during the processing of a configuration file ... Parser Error Message: Access is denied: 'WebChart'. ... LOG: DisplayName = WebChart ... LOG: Post-policy reference: WebChart ...
    (microsoft.public.dotnet.framework.aspnet)
  • maddening configuration error problem
    ... unmanaged resource being referenced never gets Dispose called. ... An error occurred during the processing of a configuration file ... Parser Error Message: Access is denied: ''. ... Version Information: Microsoft .NET Framework Version:1.0.3705.288; ...
    (microsoft.public.dotnet.framework.aspnet.security)