摘要: 之前一直以为HandleErrorAttribute 可以捕获到后面自己尝试了不行,又自己想自定义页面,发现不行,然后设置了<customErrors/>节点 又不符合SEO 返回statuscode=404 不利于搜索引擎抓取,看到孙大城 文章才发现原来 随着ASP.NET MVC版本的更新,出现 阅读全文
posted @ 2017-05-17 14:40 ☆♂安♀★ 阅读(843) 评论(0) 推荐(0) 编辑
摘要: public class newDomainRoute : Route { private Regex domainRegex; private Regex pathRegex; public string Domain { get; set; } public newDomainRoute(str 阅读全文
posted @ 2017-05-17 09:41 ☆♂安♀★ 阅读(326) 评论(0) 推荐(0) 编辑
摘要: Data too long for column 'xxx' at row 数据库的默认的utff-8,且连接的字符串也设置了utf-8,数据库字段用的text,但是还是报错,原因超出了长度,要最大的话可以设置为LONGTEXT 阅读全文
posted @ 2017-05-06 16:05 ☆♂安♀★ 阅读(844) 评论(0) 推荐(0) 编辑
摘要: The object has not yet been initialized. Ensure that HttpConfiguration.EnsureInitialized() is called in the application's startup code after all other 阅读全文
posted @ 2017-05-04 10:04 ☆♂安♀★ 阅读(749) 评论(0) 推荐(0) 编辑
摘要: using Dataacquisitionnetwork.App_Start;using Dataacquisitionnetwork.Models;using System;using System.Collections.Generic;using System.Linq;using Syste 阅读全文
posted @ 2017-04-28 13:21 ☆♂安♀★ 阅读(1758) 评论(0) 推荐(0) 编辑
摘要: iis 7 - WebApi's {"message":"an error has occurred"} 原因是web api的Controller有两个类名重复了,且在Global中HttpConfiguration类配置的Routes又没办法没有配置指明来至哪个命名空间下面的类,所以查询的返回接 阅读全文
posted @ 2017-04-11 16:43 ☆♂安♀★ 阅读(509) 评论(0) 推荐(0) 编辑
摘要: Zend Studio Description Resource Path Location Type Undefined CSS file ("../red-treeview.css"). async.html line 8 Web Resource Problem 原因是Zend Studio 阅读全文
posted @ 2017-03-07 22:34 ☆♂安♀★ 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 找了一天,发现原因是配置的连接字符串没有加上最大连接数,所以每次请求都是一直增加,而MariaDB默认的连接数是151,为了本地多项目测试已改成以前。 下面是配置的连接字符串: <add name="Context" connectionString="server=10.10.0.241;user 阅读全文
posted @ 2017-03-03 15:32 ☆♂安♀★ 阅读(668) 评论(0) 推荐(0) 编辑
摘要: 想把某个项目的某个文件夹里面的ini文件生成的时候顺便生成为网站和服务文件夹项目 string _path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "BorrowFormulaConfig.ini"); if (!File.Exis 阅读全文
posted @ 2017-03-03 11:41 ☆♂安♀★ 阅读(767) 评论(0) 推荐(0) 编辑
摘要: webapi <Message>已拒绝为此请求授权。</Message> 原有的调用base.OnAuthorization(actionContext); 换成下面这个 /// <summary> /// 鉴权 /// </summary> /// <param name="actionConte 阅读全文
posted @ 2017-02-03 20:48 ☆♂安♀★ 阅读(3185) 评论(0) 推荐(0) 编辑