- 博客(9)
- 收藏
- 关注
原创 [记录贴]对伪静态的优化
protected void Application_BeginRequest(object sender, EventArgs e) { string url = Context.Request.AppRelativeCurrentExecutionFilePath; Regex regex = new Regex(@"~/(\...
2018-11-12 22:55:21
140
原创 读取应用程序当前目录下的config配置文件
ExeConfigurationFileMap map = new ExeConfigurationFileMap(); string str= System.Windows.Forms.Application.StartupPath; map.ExeConfigFilename = "str+"\\"+123.config...
2018-07-16 15:48:05
1191
原创 C#枚举 如何根据value取得key值
先定义一个枚举enum list { A, B, C }如果已知value="B"Console.WriteLine(Convert.ToInt32(Enum.Parse(typeof(list), "B")));这样输出的结果就是1...
2018-07-06 15:11:12
5098
原创 Parameter 'xxx' implicitly has an 'any' type.
tsconfig.json添加"noImplicitAny": false,或者 "strict": true,改为false
2018-06-08 15:33:26
27180
3
原创 asp.net core设置跨域
public void ConfigureServices(IServiceCollection services) { var urls = AppConfigurtaionServices.Configuration.GetSection("Cors")["default"].Split(','); services.AddCors(options...
2018-05-23 14:04:51
1650
转载 C#相对路径与绝对路径互相转换
/// <summary> /// 绝对路径转相对路径 /// </summary> /// <param name="strUrl"></param> /// <returns></returns> private static s
2018-04-28 13:21:50
1056
转载 entity framework core生成数据库
打开cmd 导航到项目所在根目录dotnet ef migrations add Initial 建立并初始化数据库dotnet ef database update 更新数据库dotnet ef migrations add xxxx 更新模型字段后需要执行此命令通知vs重新编译表变动 xxxx为变更的任意字段名 一个就够 系统会自动追加变更添加的其...
2018-04-26 14:40:03
557
原创 说一下本人在伪静态网站发布上线踩的坑
主要是针对阿里云ECS服务器。云虚拟主机没遇到过问题,估计是配置好了。 网站是webform+ajax+一般处理程序,使用url重写,是为了SEO优化。 ECS主机刚刚购买,里面什么都没有配置,连iis都没有,首先就是安装iis服务器。我一般是直接添加windows功能,把万维网服务下面的应用程序开发功能下所有的选项都安装上。 接下来就安装...
2018-04-17 16:13:50
214
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人