美文网首页
Visual Studio2019使用Web Deploy远程发

Visual Studio2019使用Web Deploy远程发

作者: 没有昵称的祺祺 | 来源:发表于2019-06-11 10:00 被阅读0次

1、安装IIS时,确保安装 管理工具-管理服务组件如下图

2、安装Web Deploy

1、在百度上面搜索Web Deploy,选择第一项进入IIS的Web Deploy的下载,目前最新版的为3.6,地址为https://www.iis.net/downloads/microsoft/web-deploy

2、安装后,确保服务中的以下两个服务必须为已启动

3、 网站添加及其配置

1、在电脑上面找到运行窗口,或者快捷键“WIN+ R”,在运行窗口中键入“inetmgr”进入IIS配置界面,选择根目录,之后选择管理服务(注:管理服务要在Web Deploy安装之后才会出现)

2、管理服务,此处设置完要记得重启电脑

3、添加用户

4、输入用户名和密码

5、添加网站

6、输入网站名称和更改物理路径

7、添加网站完成,具体界面如下图

8、之后选择相应的用户可以对此网站进行设置,用户就是刚才添加的用户名

9、选择用户

10、至此添加网站完成了,下面就可以进行网站的发布,发布网站在Visual Studio中完成,具体步骤如下所示:

4、使用Visual Studio中WebDeploy来发布网站

1、在VS的资源管理器中选中项目名称,之后右键项目名称选择发布,进入发布向导:

2、添加发布的配置文件,输入配置文件名称

3、现在选择WEB Deploy输入相应的信息,服务器输入服务器的IP地址,站点名称、用户名(IIS中添加的网站授权的用户名)和密码,信息输入完成,之后点击验证连接按钮:

4、如果IIS和WebDeploy配置正确的话,就会出现绿色的勾,表示配置成功,直接点击下一步

5、验证连接成功之后就可以下一步配置其他的信息,配置信息完成就可以发布网站:

至此网站配置完成!

5、Visual Studio2017最新版本和Visual Studio2019发布的问题汇总

1、.net core2.2发布时出现System.AggregateException: 发生一个或多个错误

项目的csproj文件里面多了一句话

当我注释掉这句话,再生成发布项目,就能正常发布了。

2、发布时出现  Publish failed to deploy.请求被中止: 未能创建 SSL/TLS 安全通道。

1、在发布的pubxml文件中增加以下语句

#<AllowUntrustedCertificate>True</AllowUntrustedCertificate>

2、如果还不行,因为现在微软要求TLS要求1.0以上,需要将以下代码复制到记事本中,然后另存为“test.reg”注册表文件,然后放到需要发布的站点的目标服务器上执行,执行后重启服务器即可

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols] 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello] 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Client] 

"Enabled"=dword:00000000 

"DisabledByDefault"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Server] 

"Enabled"=dword:00000000 

"DisabledByDefault"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0] 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Client] 

"Enabled"=dword:00000000 

"DisabledByDefault"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server] 

"Enabled"=dword:00000000 

"DisabledByDefault"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0] 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client] 

"DisabledByDefault"=dword:00000001 

"Enabled"=dword:00000000 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server] 

"Enabled"=dword:00000000 

"DisabledByDefault"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0] 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client] 

"Enabled"=dword:00000000 

"DisabledByDefault"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server] 

"Enabled"=dword:00000000 

"DisabledByDefault"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0] 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client] 

"Enabled"=dword:00000001 

"DisabledByDefault"=dword:00000000 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server] 

"Enabled"=dword:00000001 

"DisabledByDefault"=dword:00000000 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1] 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client] 

"DisabledByDefault"=dword:00000000 

"Enabled"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server] 

"DisabledByDefault"=dword:00000000 

"Enabled"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2] 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client] 

"DisabledByDefault"=dword:00000000 

"Enabled"=dword:00000001 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server] 

"Enabled"=dword:00000001 

"DisabledByDefault"=dword:00000000

版权声明:本文有部分参考https://blog.csdn.net/yzj_xiaoyue/article/details/60574378

vs2017和2019发布时的问题属于原创

相关文章

网友评论

      本文标题:Visual Studio2019使用Web Deploy远程发

      本文链接:https://www.haomeiwen.com/subject/qdytzttx.html