.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to implement httpmodule?.

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :SharePoint

I need to deploy httpmodule because of an issue which is as explained in this below link.


I have assumed that I need to create a new visual c# project of type "class library". So I did create a project and put the DLL into GAC.   If there are any mistakes in this step, please suggest.

Now I guess I need to add the httpmodule into web.config? I tried it is not working.

please suggest 

View Complete Post

More Related Resource Links

how implement transformations in slideshow extender.



i am working on ajax slideshow extender.

can anybody help in coding for 

1) implement transformations between slide to slide.

2) and the direction means orientation in changing of slides.

I hope u got my querries.

please help in this regard.

thanks in advance.

how implement this code


check this link

and how can i implement on aspx page to get value on textbox


Facebook like Profile URL with HttpModule


I am trying to make URLs for users profile pages like Facebooks e.g. http://site.com/username. I had a code snippett from a book for how to do this but when it runs it says its processing a request that will never finish. Im new with HttpModules/handlers but Ive looked over like 100 pages trying to figure this out. My code is below. Any help figuring this out would be greatly appreciated..

public class URLRouter : IHttpModule
/// <summary>
/// You will need to configure this module in the web.config file of your
/// web and register it with IIS before being able to use it. For more information
/// see the following link: http://go.microsoft.com/?linkid=8101007
/// </summary>
#region IHttpModule Members
private IUserRepository _userRepository;

public URLRouter()
_userRepository = ObjectFactory.GetInstance<IUserRepository>();

public void Dispose()
//clean-up code here.

public void Init(HttpApplication context)
context.PostResolveRequestCache += (new EventHandler(this.Application_OnAfterProcess));

How to implement custom HttpContext for each request under class that implements IHTTPHandler


Hello All,

I created an application and implemented IHTTPHandler for all incoming request ending with ".aspx" extension.

Under "ProcessRequest" module, I am creating an instance of HttpContext (with URL attributes different from my application's URL i.e. if I am working on localhost then speciying Yahoo.com as its URL) and assigning it to "context" which comes as method argument.

After redirection, an error is generated. Also, the custom HTTPContext is not passed to the requested page (default.aspx, in my case.)

Code is as follows.

    Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest
            Dim requestedUrl As String
            Dim targetUrl As String
            Dim urlLength As Integer
            'Save settings which will be used while redirecting to appropriate page
            requestedUrl = context.Request.RawUrl
            If requestedUrl.IndexOf("?") >= 0 Then
                targetUrl = requestedUrl.Substring(0, requestedUrl.IndexOf("?"))
                targetUrl = requestedUrl
            End If
            If targetUrl = Nothing Or targetUrl.Length = 0 Then
                targetUrl = requestedUrl
            End If

Open PopUp Window From Error httpModule


I would like to open a popup window from the assembly to present the information to the user. Does anyone know if this is possible, I am presently doing the following:

        WriteLine("body {font-family:""Verdana"";font-weight:normal;font-size: .7em;color:black; background-color:white;}")
        WriteLine("b {font-family:""Verdana"";font-weight:bold;color:black;margin-top: -5px}")
        WriteLine("H1 { font-family:""Verdana"";font-weight:normal;font-size:18pt;color:red }")
        WriteLine("H2 { font-family:""Verdana"";font-weight:normal;font-size:14pt;color:maroon }")
        WriteLine("pre {font-family:""Lucida Console"";font-size: .9em}")

Cutting Edge: Implement Custom Cache Dependencies in ASP.NET 1.x


One of the most compelling improvements that ASP. NET brought to ASP programming was the Cache object. The Cache has some similarities to the Application object and is a container of global data (as opposed to session-specific data) that features a fair number of innovative characteristics.

Dino Esposito

MSDN Magazine July 2004

Timers: Implement a Continuously Updating, High-Resolution Time Provider for Windows


The timestamps that you can obtain from Windows NT are limited to a maximum resolution of 10 or 15 milliseconds, depending on the underlying hardware. At times, such as when you need to timetag frequent events, it is desirable to achieve a higher resolution. For example, what if you want to be able to contact a thread or perform some other task at intervals more frequent than 10 milliseconds? Suggested ways of achieving better resolution include using performance counters in conjunction with the sytem time to calculate smaller time increments. But using performance counters is a technique that presents its own problems. This article shows one possible way of overcoming limitations inherent in this approach.

Johan Nilsson

MSDN Magazine March 2004

Data Access: Implement a Data Access Layer for Your App with ADO.NET


Implementing data access functionality is a core activity of most developers working with the .NET Framework, and the data access layers they build are an essential part of their applications. This article outlines five ideas to consider when building a data access layer with Visual Studio .NET and the .NET Framework. The tips include taking advantage of object-oriented techniques and the .NET Framework infrastructure by using base classes, making classes easily inheritable by following guidelines, and carefully examining your needs before deciding on a presentation method and external interface.

Dan Fox

MSDN Magazine April 2003

HTTP Pipelines: Securely Implement Request Processing, Filtering, and Content Redirection with HTTP


ASP.NET is a flexible and extensible framework for server-side HTTP programming. While most people think of ASP.NET in terms of pages served, there is a lower-level infrastructure sitting beneath this page model. The underlying plumbing is based on a pipeline of app, module, and handler objects. Understanding how this pipeline works is key if you want to get the most out of ASP.NET as an HTTP server platform, while making your process more efficient, and keeping your server secure. This article introduces the architecture of the pipeline and shows how you can use it to add sophisticated functionality to an ASP.NET-based app.

Tim Ewald and Keith Brown

MSDN Magazine September 2002

BizTalk: Implement Design Patterns for Business Rules with Orchestration Designer


Because the value of good software planning and design should never be underestimated, it can be beneficial to use one of the many existing design patterns as a foundation for solving some of your toughest architecture problems. This article describes several traditional design patterns including the Observer pattern and the Dispatcher pattern, elaborates on their structures, what they're used for, and how they can help you build a BizTalk-based solution. Following this is a discussion on using the BizTalk Orchestration Designer to build designs and integrate existing business processes.

Christian Thilmany and Todd McKinney

MSDN Magazine October 2001

Microsoft .NET: Implement a Custom Common Language Runtime Host for Your Managed App


While most application developers may not need to write a custom host, understanding what is involved provides a great deal of insight into the architecture of the CLR. After covering how the CLR is started and loaded into a process, how to set the available configuration options, and how a host defines application domains, this article explains how to design a custom host. Important concepts include making the right decisions about the application domain boundaries for the host, configuring them correctly, loading and executing user code, and resolving references to assemblies. Setting security policy and unloading application domains as the application shuts down are also explained.

Steven Pratschner

MSDN Magazine March 2001

Propagate Error Info: Use ATL and C++ to Implement Error-Handling COM Objects


Predefined error codes returned from HRESULT aren't always much help for debugging COM C++ code. The C++ macros provided with this article produce an XML file listing the error and its context to make debugging easier. This article begins with an overview of error handling in COM, then discusses the COM interfaces used in the macros. It explains how C++ exceptions are caught and converted to COM-compatible error information, how events are logged with the event viewer, and how context is reported in the description string of IErrorInfo. The macros handle logic errors and errors returned by an object or API.

Panos Kougiouris

MSDN Magazine October 2000

B2B Frontiers in E-Commerce: Implement Affiliate Programs to Create New Partnerships and Generate Bu


Like the Internet itself, e-commerce is evolving. Today's e-commerce companies are allowing their customers to plug into existing catalogs and ordering systems, creating new synergistic relationships. Some companies are even adding real-time chat with customer service personnel. This article gives you an overview of some of the new e-commerce concepts and implementations that are helping forge those new relationships with customers, vendors, and shipping companies. The importance of these relationships, as well as the specific technologies used to encourage communication and collaboration are discussed and illustrated with representative code samples.

Ted Coombs

MSDN Magazine May 2000

how to implement view in MVC????


how can i perform search in asp.net mvc using linq -to - sql data

context.I had created a dropdownlist which contain Account id and date
field search parameter.....what is the linq query for this???...how to
pass data from controller to view..???? .....

Here is code for action in search controller

ViewData["XOSearch"] = new SelectList(getSearchOptions(), "Xo Number", " Dispatch Date");
        int temp = 1;

        TempData["message"] = "search";
        if (page == null)
            page = temp;

        If (ddlReportOption == 1)          //Case:searching by Dispatch date
           ViewData["Choice"] = 1; 
           DateTime DispatchDate = DateTime.Parse(fc["DispatchDate"]);
           ViewData["Result"]= Xoservice.GetAllXos(DispatchDate);
        else                                   //Case searching by XoId
            ViewData["Choice"] = 2;
            long xoNumber = Convert.ToInt64(fc["XoNo"]);
            ViewData["Result"]= Xoservice.GetAllXos(xoNumber);

i need a view to implement above.

Installing a httpModule on IIS6



I am trying to install a httpModule on an IIS 6 web server. I have the same module working on an IIS 7 test box, but we still have a couple of IIS 6 boxes to support.

The module is:

  • c# .NET 2.0
  • registered in the GAC
  • added to the system level web.config (as we want this for all applications on the box). I followed the instructions from http://msdn.microsoft.com/en-us/library/ms227673.aspx. I tried it with both short name (as in the web page) and the full strong name (like the other entries in the <httpModules> section.

So, I am at a loss as it does not appear to even being called and any suggestions would be appreciated.

Thanks in advance,


How to implement AKS HCCE

I recently installed AKS but I am having a tough time to run the HiSoftware Compliant Code Engine Feature (HCCE).  Following the steps in the user guide on page 127, I made the change to the web.config file.  The next step was to make change in the master Page.  When I do that My master page becomes corrupt.  Only when I remove the line from the code, I could see the site again. 

If anyone has successfully implemented it, please guide me.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend