• 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;
                application.Context.Response.Headers.Set("X-Frame-Options","");
            application.Context.Response.Headers.Remove("X-Frame-Options");
            }
    
      
    
    
    
        }
    }

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

    between 

    <system.webServer>
    <serverRuntime uploadReadAheadSize="0" />
    <modules>

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

    </modules>

    close web browser ,clear cache and cookies

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

  • 相关阅读:
    最优贸易 NOIP 2009 提高组 第三题
    Think twice, code once.
    luogu P1378 油滴扩展
    codevs 1002 搭桥
    codevs 1014 装箱问题 2001年NOIP全国联赛普及组
    洛谷P2782 友好城市
    洛谷P1113 杂务
    [HDU1848]Fibonacci again and again
    [POJ2420]A Star not a Tree?
    [SCOI2010]生成字符串
  • 原文地址:https://www.cnblogs.com/zyip/p/3066852.html
Copyright © 2020-2023  润新知