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

和他遇到的情况一样,最后也解决了 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

http://blog.scnetstudio.com/post/2011/01/08/How-to-Configure-Windows-Server-2008-R2-to-support-Web-Deploy-(for-Web-Matrix).aspx

If you love him, teach him C++, for it's heaven;
If you hate him, teach him C++, for it's hell
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值