部署环境为:Win7专业版32位,数据库Mysql5.7.27-win32html
1.先启用IIS功能mysql
2.安装Mysql5.7.27-win32,使用解压版安装redis
安装步骤:sql
mysql的解压根目录下新建my.ini配置文件数据库
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. basedir = C:/IIS/mysql-5.7.27-win32 datadir = C:/IIS/mysql-5.7.27-win32/data port = 3306 # server_id = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
安装服务:ui
mysqld -install spa
若是报错:计算机中丢失MSVCR120.dll.net
下载安装vcredist_x86code
下载地址:https://www.microsoft.com/en-us/download/details.aspx?id=40784server
执行命令后提示:Service successfully installed. 表示安装成功
初始化Mysql用户:
mysqld --initialize-insecure --user=mysql
执行命令后会在MySQL的安装目录下生成data目录并建立root用户。
启动服务:
net start mysql
启动MySQL以后,root用户的密码为空,设置密码,命令以下:
mysqladmin -u root -p password 新密码
Enter password: 旧密码
VS发布的时候选择正确的目标环境
发布至IIS后应用程序池老是中止
模块 DLL C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll 未能加载。返回的数据为错误信息。
须要下载VC运行时:
参考:https://q.cnblogs.com/q/111731/
1,dotnet hosting 2.2.0 须要C++2015
2,C++2015 须要 KB2919355 https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=42334
3,KB2919355 须要 KB2919442 https://www.microsoft.com/en-us/download/details.aspx?id=42153
.net core 2.2 HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure
而后又出现错误:
Failed to load the dll from [C:\Program Files\dotnet\host\fxr\1.0.1\hostfxr.dll
这两个错误都是由于win7缺乏补丁所致:
须要安装补丁:KB2533623
https://www.cnblogs.com/yilezhu/p/10057789.html
下载对应补丁:
https://support.microsoft.com/en-us/help/2533623/microsoft-security-advisory-insecure-library-loading-could-allow-remot