您的位置:首页 > 其它

web deploy 部署到远程服务器(win server 2008 r2) 遇到的问题。。。。

2015-07-14 00:01 696 查看
和他遇到的情况一样,最后也解决了 http://www.cnblogs.com/brucejia/archive/2012/07/30/2615416.html
安装的前提是先看下这里: http://www.cr173.com/soft/25218.html
友情提示下:

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

http://blog.scnetstudio.com/post/2011/01/08/How-to-Configure-Windows-Server-2008-R2-to-support-Web-Deploy-(for-Web-Matrix).aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: