perfmon
eventvwr


1.yum install mysql2.yum install libgdiplus-devel3.COMPlus_ThreadPool_ForceMinWorkerThreads=250

.net core 2.0 sessionhttps://docs.microsoft.com/en-us/aspnet/core/fundamentals/app-state?view=aspnetcore-2.1&tabs=aspnetcore2x

<remove name="aspNetCore"/>

SslMode=None

<PropertyGroup> <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> </PropertyGroup>

https://blog.csdn.net/hailang2ll/article/details/79241444

https://blog.csdn.net/hailang2ll/article/details/79759241

https://www.cnblogs.com/durow/archive/2016/08/12/5765145.html

https://stackoverflow.com/questions/39530495/dotnetcore-1-0-1-windowshosting-installation-fails-for-iis-windows-server-2012r2

.net Core2.0应用程序发布window服务器报错容易错过的配置。

1.应用程序发布。

2.IIS上新建网站。

3.应用程序池选择无托管代码。

4.服务器上安装DotNetCore.1.0.1-WindowsHosting。DotNetCore.1.0.4_1.1.1-WindowsHosting.exe  https://go.microsoft.com/fwlink/?linkid=844461

安装成功后重启服务器。

在命令程序中输入 net stop was /y 停止服务

net start w3svc重启服务。

5.安装 dotnet-sdk-2.0.0-win-gs-x64

在你的csproj文件里面,

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
  </PropertyGroup></Project>

加入MvcRazorCompileOnPublish=false这句。

具体请参考

https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?tabs=aspnetcore2x

  1. <handlers>
  2. <remove name="aspNetCore"/>
  3. <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" requireAccess="Script" />
  4. </handlers>
GetCurrentDirectoryMicrosoft.AspNetCore.Http.DefaultHttpContext.get_Session()不能随意添加“\”结尾GetRequestStream()方法了,而变为了GetRequestStreamAsync()。

dynamic type = (new Program()).GetType();
 string currentDirectory = Path.GetDirectoryName(type.Assembly.Location);
 Console.WriteLine(currentDirectory);

public class HomeController : Controller
    {
        private readonly IHostingEnvironment _hostingEnvironment;

        public HomeController(IHostingEnvironment hostingEnvironment)
        {
            _hostingEnvironment = hostingEnvironment;
        }

        public ActionResult Index()
        {
            string webRootPath = _hostingEnvironment.WebRootPath;
            string contentRootPath = _hostingEnvironment.ContentRootPath;

            return Content(webRootPath + "\n" + contentRootPath);
        }
    }

安装.NET Core的环境有两种方式,SDK和Runtime,区别类似java的JDK和JRE。
  1. services.Configure(options =>
  2. {
  3. // Password settings
  4. //是否要求有数字
  5. options.Password.RequireDigit = false;
  6. //密码要求的最小长度
  7. options.Password.RequiredLength = 6;
  8. //是否要求有非字母数字的字符
  9. options.Password.RequireNonAlphanumeric = false;
  10. //是否要求有大写的ASCII字母
  11. options.Password.RequireUppercase = false;
  12. //是否要求有小写的ASCII字母
  13. options.Password.RequireLowercase = false;
  14. options.Password.RequiredUniqueChars = 6;
  15. });

https://www.liziwu.net/topic/31.html

https://blog.csdn.net/zzzili/article/details/79288040

HttpContext.Connection.RemoteIpAddress.ToString();

https://blog.yahui.wang/2018/05/31/jenkins-docker-dotnet-core-publish/

https://blog.csdn.net/qq4165498/article/details/77484530

发布iis站点时,文件被占用

使用 app_offline.htm配置文件解决

可以先用ftp插件上传一个app_offline.htm文件,部署完站点之后删除此文件
具体参考:https://docs.microsoft.com/zh-cn/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-2.1#app_offlinehtm

执行远程命令 解除占用

上一种解决方案文件被占用的方案有个弊端,app_offline.htm生效时间无法保证,所以最直接方案是直接使用命令行 关闭和启动站点 来解除占用

更新nuget包:dotnet restore

运行:cd aspnetcoreapp dotnet run

编译:dotnet publish -c release

dotnet restore

dotnet build

dotnet publish

发布

https://blog.csdn.net/qq4165498/article/details/77484530

<aspNetCore processPath="dotnet" arguments=".\AIHelp.Elva.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>

ASPNETCORE_ENVIRONMENT

我们是在 ubuntu 上使用的 System.Drawing.Common ,当时遇到的问题是 .NET Core使用System.Drawing.Common时找不到libgdiplus的问题

支持(0)反对(0)回复 | dudu | 园豆:40787 (高人七级) | 2018-07-14 17:04

謝謝,CentOS里是这样解决的:

#locate libdl
/usr/lib64/libdl-2.17.so
/usr/lib64/libdl.so.2
#cd /usr/lib64
#ln -s libdl-2.17.so libdl.so

然后又报另外一个错误:Unable to load DLL 'libgdiplus'

yum install libgdiplus-devel

core 部署的更多相关文章

  1. ASP.NET CORE部署到Linux

    ASP.NET CORE部署到CentOS中 在Linux上安装.NET Core 参考:https://www.microsoft.com/net/core#linuxcentos 配置Nginx ...

  2. 使用NSSM把.Net Core部署至 Windows 服务

    为什么部署至Windows Services 在很多情况下,很少会把.Net Core项目部署至Windows服务中,特别是Asp.net Core就更少了.一般情况下,Asp.net Core会部署 ...

  3. ASP.NET Core 实战:Linux 小白的 .NET Core 部署之路

    一.前言  最近一段时间自己主要的学习计划还是按照毕业后设定的计划,自己一步步的搭建一个前后端分离的 ASP.NET Core 项目,目前也还在继续学习 Vue 中,虽然中间断了很长时间,好歹还是坚持 ...

  4. 【Step By Step】将Dotnet Core部署到Docker下

    一.使用.Net Core构建WebAPI并访问Docker中的Mysql数据库 这个的过程大概与我之前的文章<尝试.Net Core—使用.Net Core + Entity FrameWor ...

  5. 使用 Visual Studio 部署 .NET Core 应用 ——.Net Core 部署到Ubuntu 16.04

    .Net Core 部署到Ubuntu 16.04 中的步骤 1.安装工具 1.apache 2..Net Core(dotnet-sdk-2.0) 3.Supervisor(进程管理工具,目的是服务 ...

  6. .NET Core 部署到CentOS–1.创建项目,简单部署

    开发环境:Windows 10,部署环境:阿里云 CentOS 7.3 1. 创建应用 1) 创建项目, 配置应用生成部署包 2) 配置项目 编辑project.json, 追加环境项, 选项可参考这 ...

  7. .NET Core 部署到CentOS–2.创建守护进程, 通过Nginx公网访问

    继上一篇, 我们确定在内网可以通过 "http://localhost:5000",可以访问到站点后,接下来我们要配置"守护进程","Nginx公网8 ...

  8. .NET Core 部署到CentOS–3.supervisord守护进

    1. 安装 sudo yum install python-setuptoolssudo easy_install supervisor 2. 配置 安装成功后,输入supervisord 会显示配置 ...

  9. NSSM把.Net Core部署至 Windows 服务

    NSSM把.Net Core部署至 Windows 服务 https://www.cnblogs.com/emrys5/p/nssm-netcore.html 为什么部署至Windows Servic ...

  10. ASP.NET Boilerplate 学习 AspNet Core2 浏览器缓存使用 c#基础,单线程,跨线程访问和线程带参数 wpf 禁用启用webbroswer右键菜单 EF Core 2.0使用MsSql/MySql实现DB First和Code First ASP.NET Core部署到Windows IIS QRCode.js:使用 JavaScript 生成

    ASP.NET Boilerplate 学习   1.在http://www.aspnetboilerplate.com/Templates 网站下载ABP模版 2.解压后打开解决方案,解决方案目录: ...

随机推荐

  1. sudo command

    sudo -i : login as sudo password: change the password of current login user exit : logout

  2. Unity 3D UI Essentials 学习

    Chapter 1: Looking Back,LookingForward Chapter 2: Building Layouts Chapter 3: Control, Control, You ...

  3. KiCad 开源元件库收集

    KiCad 开源元件库收集 KiCad 官方 https://gitee.com/KiCAD-CN (国内镜像) https://github.com/kicad Digikey KiCad 元件库 ...

  4. django 保存中文到mysql 报错django.db.utils.DatabaseError: Incorrect string value: '\xE5\xBE\x88\xE7\x81\xB5

    分析: 1.尝试在Python中对数据转码成utf8,'中文'.encode("utf-8"),还是报错 2.观察堆栈发现应该是操作mysql数据库的时候,将数据插入表里出错 所以 ...

  5. Centos系统下Docker的安装

    一.检查内核版本 安装Docker,需要linux内核大于3.10 使用uname -r 来检查 二. Centos系统下Docker的安装 1. 安装需要的软件包 yum install -y yu ...

  6. mac下安装、配置redies

    https://blog.csdn.net/qq_21383435/article/details/80676497 可视化客户端安装(Mac): ruby -e "$(curl -fsSL ...

  7. 阅读<All Digital VCXO Replacement for Gigabit Transceiver Applications>笔记---XAPP589

    阅读<All Digital VCXO Replacement for Gigabit Transceiver Applications>笔记---XAPP589 1. 2. 外部设备能为 ...

  8. mycat配置安装测试

    https://www.jianshu.com/p/26513f428ecf #下载安装#java jdk mkdir /usr/local/java/tar -zxvf jdk-7u80-linux ...

  9. Delphi 与 C/C++ 数据类型对照表

    Delphi 数据类型 C/C++ ShorInt 8位有符号整数 char Byte 8位无符号整数 BYTE,unsigned short SmallInt 16位有符号整数 short Word ...

  10. PI接口无法使用.net4以上的解决方法:无法嵌入互操作类型“PISDKClass”。请改用适用的接口。

    Interop type 'PISDKClass' cannot be embedded. Use the applicable interface instead. .net开发中,有时候在引用某些 ...