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 6693287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:57:56+00:00 2026-05-26T05:57:56+00:00

In a project I am running I need to compile this code into a

  • 0

In a project I am running I need to compile this code into a DLL:

// svgzHandler.cs 
using System; 
using System.Web;
namespace svgzHandler
{
    public class svgzHandler : IHttpHandler
    {
        #region IHttpHandler メンバー
        public bool IsReusable { get { return true; } }
        public void ProcessRequest(HttpContext context)
        {
            HttpResponse r = context.Response;
            r.ContentType = "image/svg+xml";
            r.AppendHeader("Content-Encoding", "gzip");
            r.WriteFile(context.Request.PhysicalPath);
        }
        #endregion
    }
}

Only I am no programmer and have NO IDEA WHAT THIS ALL MEANS. Also, what should the japanese characters be replaced by? is it a folder? a file?

I have Visual Studio 2010 Ultimate so I do have the compiler but This is the first bit of C# code i’ve ever touched.

thank you for your help!

P.S: I don’t know if this will help but this is the site with the instructions (translated from japanese): http://www.microsofttranslator.com/bv.aspx?ref=Internal&from=&to=en&a=http://blog.wonderrabbitproject.net/post/2009/06/13/svgze381aee3838fe383b3e38388e383a9e38292IIS75e381a6.aspx

  • 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-05-26T05:57:56+00:00Added an answer on May 26, 2026 at 5:57 am

    The Japanese characters are inside a section name which is ignored by the compiler. You could completely get rid of the lines #region and #endregion if they bother you. It’s a Visual Studio thing to organize code, the compiler doesn’t use them. So to compile to an assembly, simply create a new project in visual studio of type Class Library and add this class to it. You will have to reference the System.Web assembly in order to successfully compile as the IHttpHandler interface that is used in this code is defined there.

    So the actual code could be simply (svgzHandler.cs):

    namespace svgzHandler 
    {
        using System; 
        using System.Web; 
    
        public class svgzHandler : IHttpHandler
        {
            public bool IsReusable { get { return true; } }
    
            public void ProcessRequest(HttpContext context)
            {
                HttpResponse r = context.Response;
                r.ContentType = "image/svg+xml";
                r.AppendHeader("Content-Encoding", "gzip");
                r.WriteFile(context.Request.PhysicalPath);
            }
        } 
    }
    

    And by the way you don’t even need Visual Studio in order to compile. You could directly use a C# compiler:

    c:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /target:library svgzHandler.cs
    

    which would spit a svgzHandler.dll assembly.

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

Sidebar

Related Questions

So I keep getting this error when trying to compile C++ code using CodeBlocks.
We are currently using a web deployment project to compile the projects in our
I've got a project running and we're using SVN as the version control. There
In ZF you create a project by running this command: zf create project MyProjectName
I'm working on a project using Scala running Selenium tests as part of a
As part of my Final Year Project, I need to convert some FORTRAN code
I have a running Java GWT application, that I can compile using Eclipse. Now
Have a scenario where i need to compile my project with jdk 1.5 but
I'm working on a PHP project running on Windows and it would be so
Our project is running on Windows CE 6.0 and is written in C++ .

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.