Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9204209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:39:22+00:00 2026-06-17T23:39:22+00:00

I had to 301 redirect some htm pages. I am trying to do it

  • 0

I had to 301 redirect some htm pages. I am trying to do it via HttpHandler. This website dosen’t use any namespace.
I created a test handler as follows:

<%@ WebHandler Language="C#" Class="htmlhandler" %>

using System;
using System.Web;

public class htmlhandler : IHttpHandler {

    public void ProcessRequest (HttpContext context) {
        string url = HttpContext.Current.Request.Url.AbsoluteUri;
        context.Response.ContentType = "text/plain";
        context.Response.Write(url);
    }

    public bool IsReusable {
        get {
            return false;
        }
    }

}

In Web.config I tried to register the handler as follows:

<httpHandlers>
  <add verb="*" path="*.htm" type="htmlhandler"/>
</httpHandlers>

But I am getting the following error:

Parser Error Message: Could not load file or assembly 'htmlhandler' or one of its dependencies. The system cannot find the file specified.

Please help. My handler is placed in App_Code folder but still the server is unable to find it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:39:24+00:00Added an answer on June 17, 2026 at 11:39 pm

    Try using <add verb="*" path="*.htm" type="htmlhandler, assemblyName"/>.

    Also <system.webServer> is valid only if you running the App Pool in Integrated mode. Check if you are running the App Pool in Integrated or Classic mode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had to adjust some paths on my site and I need to use
friendfeed.com uses 302. bit.ly uses 301. I had decided to use 303. Do they
I need to redirect some urls. Formerly I had http://mysite.com/foobar/?section_id=1234 These are no pointing
So lets say I had a string that was <html> <head><title>301 Moved Permanently</title><head> and
Had this working; at one stage. The problem is the following text is now
I had a debate about macros and their readability. I think that in some
I am trying to redirect my old typepad blog to my new blog (permanent
I'm trying to follow this tutorial to try and begin to understand the Visual
Actually i am parsing some html pages by using scrapy, i have used xpath
Had to deploy some PHP code onto a shared server with only PHP5.2.8. All

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.