refer owa(exchange) 2013 via a iframe in sharepoint 2013

Refused to display 'https://cas.temp.local/owa/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.


create a file named a.cs under C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\app_code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security;
using System.Security.Principal;

namespace ZY
    public class M1 : IHttpModule

        public void Dispose()


        public void Init(HttpApplication application)
        application.PreSendRequestHeaders += new EventHandler(application_PreSendRequestHeaders);


        void application_PreSendRequestHeaders(object sender, EventArgs e)
            HttpApplication application = (HttpApplication)sender;




add a line to web.config(C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa)


<serverRuntime uploadReadAheadSize="0" />

<add name="zy" type="ZY.M1" />



close web browser ,clear cache and cookies


The OWA 2013 now can display with a iframe under a differetn subdomain


posted @ 2013-05-08 15:11  zyip  阅读(1544)  评论(6编辑  收藏  举报