Dotnetcore 開發速記

一、System.InvalidOperationException:"Internal connection fatal error." html

全球固定模式,坑爹 python

https://github.com/dotnet/corefx/blob/master/Documentation/architecture/globalization-invariant-mode.md git

     

     

     

二、反射按nuget包名進行 github

經過nuget引用的包,不會複製以運行目錄,反射時按包名反射 app

library.Dependencies tcp

     

     

三、Cache使用 網站

new RedisCache(new RedisCacheOptions spa

{ .net

Configuration = Configuration.GetConnectionString("RedisConnection"), rest

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承載

參考 http://www.javashuo.com/article/p-rodearnb-gb.html

相關文章
相關標籤/搜索