所谓的潇洒

导航

11 2020 档案

System.Net.WebException: 服务器提交了协议冲突. Section=ResponseStatusLine
摘要:问题:使用HttpWebRequest访问时报错 System.Net.WebException: 服务器提交了协议冲突. Section=ResponseStatusLine 在 System.Net.HttpWebRequest.GetResponse() 解决: HttpWebRequest 阅读全文

posted @ 2020-11-26 10:00 所谓的潇洒 阅读(2353) 评论(1) 推荐(0)

微信对接错误处理
摘要:问题一 再获取微信Openid的时候报错:{"errcode":40029,"errmsg":"invalid code"} 原因:code只能用一次,仔细跟踪代码分析日志即可发现,已经用它获取过一次openid了,所以不能再用了,openid可以存下来用 问题二 微信访问网站首页获取不到code 阅读全文

posted @ 2020-11-21 17:40 所谓的潇洒 阅读(223) 评论(0) 推荐(0)

未能加载文件或程序集“xxx”或它的某一个依赖项。试图加载格式不正确的程序。
摘要:刚部署到IIS的网站,访问时报错:未能加载文件或程序集“xxx”或它的某一个依赖项。试图加载格式不正确的程序。 原因:VS编译时用的x86,而程序池默认是按照64位启动的 解决步骤: 点击网站使用的程序池 点击右上角的“设置应用程序池默认设置” 将常规项中的“启用32位应用程序”改为true,保存 阅读全文

posted @ 2020-11-21 17:05 所谓的潇洒 阅读(637) 评论(0) 推荐(0)

IniHelper
摘要:using System.IO; using System.Runtime.InteropServices; using System.Text; namespace MyProject { public class IniHelper { private string iniPath = stri 阅读全文

posted @ 2020-11-11 16:36 所谓的潇洒 阅读(156) 评论(0) 推荐(0)

Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies.
摘要:原因之一:主程序和调用的组件都引用了Newtonsoft.Json.dll,且版本不一样 解决:调用的组件若是公共组件,可以考虑将用到Newtonsoft.Json的方法封装到公共组件;如果不是公共组件就引用同一个地方的dll 阅读全文

posted @ 2020-11-11 15:55 所谓的潇洒 阅读(1002) 评论(0) 推荐(0)