安裝deploy 3.5 + vs19
下圖基本添加賬號流程
添加賬號的時候選擇iis類型那個創(chuàng)建的賬號
配置vs發(fā)布頁面有咨,點擊發(fā)布酱固,如果遇到發(fā)布目標不成功械念,把目標網(wǎng)站添加everyone + iis user權(quán)限即可
再次發(fā)布!
1运悲、安裝IIS時龄减,確保安裝 管理工具-管理服務(wù)組件如下圖
2、安裝Web Deploy
1班眯、在百度上面搜索Web Deploy欺殿,選擇第一項進入IIS的Web Deploy的下載,目前最新版的為3.6鳖敷,地址為https://www.iis.net/downloads/microsoft/web-deploy
2脖苏、安裝后,確保服務(wù)中的以下兩個服務(wù)必須為已啟動
3定踱、 網(wǎng)站添加及其配置
1棍潘、在電腦上面找到運行窗口,或者快捷鍵“WIN+ R”崖媚,在運行窗口中鍵入“inetmgr”進入IIS配置界面亦歉,選擇根目錄,之后選擇管理服務(wù)(注:管理服務(wù)要在Web Deploy安裝之后才會出現(xiàn))
2畅哑、管理服務(wù)肴楷,此處設(shè)置完要記得重啟電腦
3、添加用戶
4荠呐、輸入用戶名和密碼
5赛蔫、添加網(wǎng)站
6、輸入網(wǎng)站名稱和更改物理路徑
7泥张、添加網(wǎng)站完成呵恢,具體界面如下圖
8、之后選擇相應(yīng)的用戶可以對此網(wǎng)站進行設(shè)置媚创,用戶就是剛才添加的用戶名
9渗钉、選擇用戶
10、至此添加網(wǎng)站完成了钞钙,下面就可以進行網(wǎng)站的發(fā)布鳄橘,發(fā)布網(wǎng)站在Visual Studio中完成声离,具體步驟如下所示:
4、使用Visual Studio中WebDeploy來發(fā)布網(wǎng)站
1瘫怜、在VS的資源管理器中選中項目名稱术徊,之后右鍵項目名稱選擇發(fā)布,進入發(fā)布向?qū)В?/p>
2宝磨、添加發(fā)布的配置文件弧关,輸入配置文件名稱
3盅安、現(xiàn)在選擇WEB Deploy輸入相應(yīng)的信息唤锉,服務(wù)器輸入服務(wù)器的IP地址,站點名稱别瞭、用戶名(IIS中添加的網(wǎng)站授權(quán)的用戶名)和密碼窿祥,信息輸入完成,之后點擊驗證連接按鈕:
4蝙寨、如果IIS和WebDeploy配置正確的話晒衩,就會出現(xiàn)綠色的勾,表示配置成功墙歪,直接點擊下一步
5听系、驗證連接成功之后就可以下一步配置其他的信息,配置信息完成就可以發(fā)布網(wǎng)站:
至此網(wǎng)站配置完成虹菲!
5靠胜、Visual Studio2017最新版本和Visual Studio2019發(fā)布的問題匯總
1、.net core2.2發(fā)布時出現(xiàn)System.AggregateException: 發(fā)生一個或多個錯誤
項目的csproj文件里面多了一句話
當我注釋掉這句話毕源,再生成發(fā)布項目浪漠,就能正常發(fā)布了。
2霎褐、發(fā)布時出現(xiàn) ?Publish failed to deploy.請求被中止: 未能創(chuàng)建 SSL/TLS 安全通道址愿。
1、在發(fā)布的pubxml文件中增加以下語句
#<AllowUntrustedCertificate>True</AllowUntrustedCertificate>
2冻璃、如果還不行响谓,因為現(xiàn)在微軟要求TLS要求1.0以上,需要將以下代碼復(fù)制到記事本中省艳,然后另存為“test.reg”注冊表文件歌粥,然后放到需要發(fā)布的站點的目標服務(wù)器上執(zhí)行,執(zhí)行后重啟服務(wù)器即可
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
版權(quán)聲明:本文有部分參考https://blog.csdn.net/yzj_xiaoyue/article/details/60574378
作者:沒有昵稱的祺祺
鏈接:http://www.reibang.com/p/689f69dbec07
來源:簡書
簡書著作權(quán)歸作者所有拍埠,任何形式的轉(zhuǎn)載都請聯(lián)系作者獲得授權(quán)并注明出處失驶。