Dotnetcore 开发速记
1、System.InvalidOperationException:"Internal connection fatal error."
全球固定模式,坑爹
2、反射按nuget包名进行
通过nuget引用的包,不会复制以运行目录,反射时按包名反射
library.Dependencies


3、Cache使用
|
new RedisCache(new RedisCacheOptions { Configuration = Configuration.GetConnectionString("RedisConnection"), InstanceName = "AC:" })
services.AddDistributedRedisCache(options => { options.Configuration = Configuration.GetConnectionString("RedisConnection"); options.InstanceName = "AC:"; }); |
参考:https://github.com/aspnet/Extensions/tree/master/src/Caching
https://www.cnblogs.com/Leo_wl/p/6392196.html?utm_source=itdadao&utm_medium=referral
https://www.e-learn.cn/content/net/405845
Linux下安装NETCORE
|
#netcor 安装脚本 #vi /etc/sysconfig/network-scripts/ifcfg-eth0 (可能不是这个名字),将onboot=no修改为yes ip addr service network restart ip addr #使用CRT登录方便复制 su yum -y install net-tools ifconfig mkdir /opt/dotnet cd /opt/dotnet yum -y install wget yum -y install icu wget -c https://dot.net/v1/dotnet-install.sh chmod +x dotnet-install.sh ./dotnet-install.sh -Channel 2.1 -InstallDir /opt/dotnet export PATH=$PATH:/opt/dotnet ./dotnet --info yum -y install zip unzip yum -y install lrzsz #部署网站 mkdir /app cd /app mkdir BandServer #使用rz指令上传网站压缩包,使用unzip解压,注意压缩包的相对目录 #unzip publish.zip #添加防火墙 firewall-cmd --zone=public --add-port=3415/tcp --permanent firewall-cmd --reload #启动网站观察是否工作正常 dotnet BandServer.dll #配置守护进程 yum -y install python-setuptools easy_install supervisor supervisord --version echo_supervisord_conf > /etc/supervisord.conf #编辑supervisord.conf在末尾添加应用(如下,记得去除#) # [program:bandserver] # directory=/app/BandServer # command=/opt/dotnet/dotnet BandServer.dll # autostart=true # autorestart=true # stderr_logfile=/var/log/bandserver.err.log # stdout_logfile=/var/log/bandserver.out.log # user=root # stopsignal=INT # redirect_stderr=true #设置为开机执行 # vi /etc/rc.local #添加 supervisord -c /etc/supervisord.conf #chmod +x /etc/rc.local systemctl enable rc-local #手动启动守护 supervisord -c /etc/supervisord.conf supervisorctl start all supervisorctl status #重启 # reboot |
Jexus部署Asp.Net Core项目
参考 https://blog.csdn.net/u010584641/article/details/73611223
使用IIS承载
参考 https://www.cnblogs.com/jasonduan/p/9193702.html
Dotnetcore 开发速记的更多相关文章
- Cordova开发速记
JS安全问题,已使用MERGES目录对不同的平台进行单独的控制,但需要在主页中引用平台重载文件,如<script src="script/platformOverrides.js&qu ...
- Windows server 2012 R2 环境搭建
由于系统升级,现在在用dotnetcore开发项目,但是尴尬的是服务器是windows server2012 R2的版本,这个版本不能执行dotnetcore. 然后问题来了,运行环境搭建. 第一步自 ...
- DotNetCore 3.0 助力 WPF 开发
DotNetCore Is AnyWhere. 前言 Visual Studio 2019 已经正式发布了,DotNetCore 3.0 的正式版也指日可待.在之前的版本中,作为一名基于微软生态的传统 ...
- C# 嵌入dll 动软代码生成器基础使用 系统缓存全解析 .NET开发中的事务处理大比拼 C#之数据类型学习 【基于EF Core的Code First模式的DotNetCore快速开发框架】完成对DB First代码生成的支持 基于EF Core的Code First模式的DotNetCore快速开发框架 【懒人有道】在asp.net core中实现程序集注入
C# 嵌入dll 在很多时候我们在生成C#exe文件时,如果在工程里调用了dll文件时,那么如果不加以处理的话在生成的exe文件运行时需要连同这个dll一起转移,相比于一个单独干净的exe,这种形 ...
- Linux (Deppin ,Ubuntu )开发环境配置,VUE & dotnetcore 解决 yarn 找不到问题
新装系统设置 清华镜像: https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/ 网易镜像: http://mirrors.163.com/.help/ubu ...
- 开发日记:DotNetCore 批处理 发布
@echo off@title 中医科院 - 发布@echo ******************************************************@echo ========= ...
- ASP.NET Core 中文文档 第二章 指南(8) 使用 dotnet watch 开发 ASP.NET Core 应用程序
原文:Developing ASP.NET Core applications using dotnet watch 作者:Victor Hurdugaci 翻译:谢炀(Kiler) 校对:刘怡(Al ...
- 使用VS Code从零开始开发调试.NET Core 1.0
使用VS Code 从零开始开发调试.NET Core 1.0. .NET Core 是一个开源的.跨平台的 .NET 实现. VS Code 全称是 Visual Studio Code,Visua ...
- 拥抱.NET Core,如何开发跨平台的应用并部署至Ubuntu运行
之前写了一篇博文宣布Rabbit Rpc跨平台了"拥抱.NET Core,跨平台的轻量级RPC:Rabbit.Rpc",在过程中尝试了如何编写支持跨平台的类库与应用程序,也尝试了在 ...
随机推荐
- C#获取页面上的Html
//根据Url地址得到网页的html源码 public static string GetWebContent(string Url) { string strResult = "" ...
- 4.JAVA-数组、String详解
1.数组 public class Test{ public static void main(String args[]){ int[] intArray = new int[] {1,4,3,2, ...
- MARKY一下。
答:其实RUP整个流程都在讲SQA.业界常见的模型,譬如CMM/CMMI,六西格玛,ISO9000,RUP,它们做的基本上是同一件事情--都是在做流程改进,都在做质量控制,但是各自的侧重点不一样.像R ...
- ORA-39127: 调用 "WMSYS"."LT_EXPORT_PKG"."SCHEMA_INFO_EXP" 时发生意外错误
expdp 告警提示: Export: Release 11.2.0.4.0 - Production on 星期日 4月 28 12:14:51 2019....ORA-39127: 调用 &quo ...
- 浅析C语言中的整形类型
在C语言中,可以把 字符型.短整形.整形.长整形都看作是整形,同属于整形家族这个大类型. 这些类型的大小,默认是否有符号等一些知识点较零散,较容易混淆,所以特地整理如下. 一 类型存储字节长度说明 ...
- bat 实现主机hostname的修改
主机实现hostname的修改原理: 修改注册表中的值: hklm\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName 下的 Comp ...
- July 09th, 2018. Monday, Week 28th.
Happiness is an inside job. 自内寻找,才能找到幸福. From William Arthur Ward. Nobody wants to suffer, and we al ...
- window下的nginx的安装和使用
nginx功能之一可以启动一个本地服务器,通过配置server_name和root目录等来访问目标文件 一. 下载 http://nginx.org/en/download.html 下载后安装在你钟 ...
- vue cli 3.x 项目部署到 github pages
github pages 是 github 免费为用户提供的服务,写博客,或者部署一些纯静态项目. 最近将 vue cli 3.x 初始化项目部署到 github pages,踩了一些坑,记录如下. ...
- 10分钟详解Spring全家桶7大知识点
Spring框架自2002年诞生以来一直备受开发者青睐,它包括SpringMVC.SpringBoot.Spring Cloud.Spring Cloud Dataflow等解决方案.有人亲切的称之为 ...