工作问题记录

1、问题一:代码调用Auzre Powershell报错

System.Management.Automation.CmdletInvocationException:“加载扩展类型数据文件时出现以下错误:
Microsoft.PowerShell,C:\Program Files\WindowsPowerShell\Modules\Azure\3.7.0\Services\Microsoft.WindowsAzure.Commands.Websites.Types.ps1xml: 由于发生以下验证异常,已跳过文件: AuthorizationManager 检查失败。。
Microsoft.PowerShell,C:\Program Files\WindowsPowerShell\Modules\Azure\3.7.0\Sql\Microsoft.WindowsAzure.Commands.SqlDatabase.Types.ps1xml: 由于发生以下验证异常,已跳过文件: AuthorizationManager 检查失败。。
Microsoft.PowerShell,C:\Program Files\WindowsPowerShell\Modules\Azure\3.7.0\StorSimple\Microsoft.WindowsAzure.Commands.StorSimple.Types.ps1xml: 由于发生以下验证异常,已跳过文件: AuthorizationManager 检查失败。。

内部异常

RuntimeException: 加载扩展类型数据文件时出现以下错误:
Microsoft.PowerShell,C:\Program Files\WindowsPowerShell\Modules\Azure\3.7.0\Services\Microsoft.WindowsAzure.Commands.Websites.Types.ps1xml: 由于发生以下验证异常,已跳过文件: AuthorizationManager 检查失败。。
Microsoft.PowerShell,C:\Program Files\WindowsPowerShell\Modules\Azure\3.7.0\Sql\Microsoft.WindowsAzure.Commands.SqlDatabase.Types.ps1xml: 由于发生以下验证异常,已跳过文件: AuthorizationManager 检查失败。。
Microsoft.PowerShell,C:\Program Files\WindowsPowerShell\Modules\Azure\3.7.0\StorSimple\Microsoft.WindowsAzure.Commands.StorSimple.Types.ps1xml: 由于发生以下验证异常,已跳过文件: AuthorizationManager 检查失败。。

将程序生成的目标平台改为×64

2、修改了Azure 虚拟机的DNS后,远程登录不了

 

3、.Net Framework 4.5,使用HttpWebRequest发送请求(https)失败

发送请求前加上:ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;

 4、Git运行git pull origin master报错”fatal: refusing to merge unrelated histories“

git pull origin master --allow-unrelated-histories

git merge origin origin/master

5、ajax post 请求415,发送请求后,返回  Unsupported media type-415(不支持的媒体类型)

这时要把 content-type 设为json .  xhr.setRequestHeader('Content-Type', ' application/json');

$.ajax({
url: "****",
method: "POST",
dataType : "json",
data: JSON.stringify(data),
success: function (result) {
},
beforeSend: function (xhr) {
    xhr.setRequestHeader("Content-Type", "application/json");
},

});

 6、Set-ExecutionPolicy

7、

JsonConvert.DeserializeObject 如果不想用默认的字段名称,可以使用如下方式:

复制代码
复制代码
public class ClassName
{
       [JsonProperty(PropertyName = "ClassId")]
       public int Id { get; set; }

       [JsonProperty(PropertyName = "ClassName")]
       public string Name { get; set; }
}

 8、SQL筛选条件简称:SARG(search argument/SARG) 

SARG运算符包括 
NOT、 
<>、 
NOT EXISTS、 
NOT IN、 
NOT LIKE 

 

posted @ 2017-10-16 10:37  公羊天纵  阅读(322)  评论(0编辑  收藏  举报