和他遇到的情況一樣,最后也解決了 http://www.cnblogs.com/brucejia/archive/2012/07/30/2615416.html
安裝的前提是先看下這里: http://www.cr173.com/soft/25218.html
還是看這里吧,都出 3.6版本了 https://www.iis.net/downloads/microsoft/web-deploy
友情提示下:
WebDeploy的安全訪問機制和訪問接口都依賴於IIS的“管理服務”組件,所以要使用WebDeploy必須先安裝IIS的“管理服務”。為此,首先打開“服務器管理器”添加角色服務,整個安裝過程非常簡單不再復述,可參考下圖:
實際上 因為是遠程, 默認 沒有開啟 允許遠程ip訪問,解決方法,打開iis>> 雙擊主導航>>出現一個 Management Service(or 服務管理器),打開它后, 允許 ip訪問即可, 至此403錯誤解決
緊接着 又出404錯誤。。。,因為當時安裝web deploy的時候,選擇了 默認的推薦的方式(這種方式 沒有 http handler相關的處理,所以404),於是 重新安裝 web deploy(選擇全部安裝),至此問題解決
解決后又發現個問題, 就是 有些文件 我不想發布至服務器,我想跳過,這時候,只需要在pubxml文件中 增加這些即可
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <WebPublishMethod>MSDeploy</WebPublishMethod> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedPlatform>Any CPU</LastUsedPlatform> <SiteUrlToLaunchAfterPublish /> <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> <ExcludeApp_Data>True</ExcludeApp_Data> <ExcludeFilesFromDeployment>Web.config;ImageServer.config</ExcludeFilesFromDeployment> <ExcludeFoldersFromDeployment>Folder1;Folder2</ExcludeFoldersFromDeployment>
黃色背景的是關鍵的兩行
各種錯誤包括但不限於:
Could not connect to the destination computer ("xxxx") using the specified process ("The Web Management Service") because the server did not respond. Make sure that the process ("The Web Management Service") is started on the destination computer.
The remote server returned an error: (403) Forbidden.
404 Not Found (actually 404.7 in log file)
參考資料:
http://learn.iis.net/page.aspx/1182/troubleshooting-web-deploy-problems-with-visual-studio/
http://support.microsoft.com/kb/943891
If you hate him, teach him C++, for it's hell