zoukankan      html  css  js  c++  java
  • 异常记录

    要兼容 IE8,9,最高可使用 jquery 1.9.1,比它高的版本则不支持 ;且使用

    Bootstrap v3.3.4 时,需要jquery版本 1.9.1 或以上。

    在使用 $.ajax({
                  url: remoteBaseAddress + url,
                  data: jsonStr,
                  type: 'POST',
                  dataType: "json",
                  crossDomain: true,
                  contentType: 'application/json; charset=utf-8',
                  success: function (data) {
                      alert("ok");
                  },
                  error: function (data)
                  {
                      alert(data); // 在IE9,会报 No Transport,可使用 angularjs(1.x)的 $http.post 替换 $.ajax 解决问题。
                  }
              });
    ==============================================================================================================

    在 asp.net mvc4 中加入 wcf 时,碰到 endpoint not found 问题时,则需要如下改动:

    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    //必须放在routes.MapRoute 之上
    routes.Add(new ServiceRoute("LoginService", new APTS.WCFServices.APTSServiceHostFactory(),
                   typeof(APTS.WCFServices.Implementations.LoginService)));
     
    routes.MapRoute(
                          "Default",
                         "{controller}/{action}/{id}",
                         new { controller = @"Home", action = "Login", id = UrlParameter.Optional },
                         new[] { "APTS.Controllers" ,"Permission.Controllers"}
                    );
    ================================================================================================================

    HTTP/1.1 415 Cannot process the message because the content type 'application/json; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'

    需要在 web.config 设置:

    binding="webHttpBinding" 和 <webHttp/>


     
    
    
  • 相关阅读:
    matlab中的rng函数
    重装系统的两种方法
    如何用cmd指令清除U盘的PE分区
    python缩进
    matlab处理dat数据
    word空格后整体移动的问题
    窗函数
    去除信号中的直流分量
    第07组 团队Git现场编程实战
    第二次结对编程作业
  • 原文地址:https://www.cnblogs.com/yipeng-yu/p/5113844.html
Copyright © 2011-2022 走看看