Insert SPWebConfigModification at the beginning of the httpModules node

We created a simple IHttpModule for our SharePoint deployment that catches exceptions and sends content to developers using the following reason:

public class ExceptionReporter : IHttpModule
{
    //snip

    public void Init(HttpApplication context)
    {
        context.Error += new EventHandler(context_Error);
    }

    void context_Error(object sender, EventArgs e)
    {
        //Do stuff here
    }

    //snip
}

When trying to deploy it β€œproperly”, we use SPWebConfigModification to add this type to httpModules > node. configurations.

, < add/ > < htpModules > Microsoft.SharePoint.ApplicationRuntime.SPRequestModule, , . , web.config, SPRequestModule Reflector SPRequestModule.

web.config SPRequestModule?

+3
1

Application_Error int he Global.asax, , .

0

Source: https://habr.com/ru/post/1715462/


All Articles