从 Visual Studio 2012 到远程 IIS 8 服务器的 Web 部署 [英] Web Deploy from Visual Studio 2012 to a remote IIS 8 server

查看:50
本文介绍了从 Visual Studio 2012 到远程 IIS 8 服务器的 Web 部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台运行 IIS 8 的远程 Windows 2012 服务器,我从中托管了一个 Web 应用程序.我的本地开发箱正在运行 Visual Studio 2012.目前我将我的应用程序发布为 Web 部署包 (.zip),RDP 到生产服务器,复制并粘贴到文件夹并从 IIS 内部署应用程序.我的问题是,我需要进行哪些更改才能使用 Web 部署选项从 Visual Studio 2012 直接部署到 IIS?

我已尝试遵循)..莉>

  • 尝试从 Visual Studio 重新连接.对我来说,这里有一些反复试验,但错误消息确实链接到 MS 解码指南:)
  • 即使在成功连接后,我也不得不考虑权限问题,因此我的 IIS 用户有足够的权限来创建应用程序池、目录和常规文件管理作业.
  • 以下链接真的很有帮助!

    在网络服务器上配置处理程序:

    http://www.iis.net/learn/publish/using-web-deploy/configure-the-web-deployment-handler

    通过 Visual Studio 连接:

    http://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx

    注意:

    为确保处理程序正在运行,请登录您的 IIS 服务器并将浏览器指向以下 URL.

    https://:8172/MsDeploy.axd

    F12 打开开发工具查看 HTTP 响应.此外,MsDeploy 还会在 inetpub/logs 中创建 IIS 日志,如果您遇到连接问题,它应该会为您提供一些线索.

    I have a remote Windows 2012 server running IIS 8 from which I am hosting a web application. My local development box is running Visual Studio 2012. Currently I am publishing my app as a web deployment package (.zip), RDP'ing to the production server, copy + pasting to a folder and deploying the application from within IIS. My question is, what changes do I need to make to deploy directly to IIS from Visual Studio 2012 using the web deploy option?

    I have tried to follow this guide but it refers to a service URL which I must obtain from my hosting company. I don't have a hosting company, my server is co-located.

    I am presented with the following options:

    Is the username and password the one I use for the RDP account? I already have Web Deploy 3.0 installed on IIS do I need to enable further settings?

    解决方案

    OK I found the solution but it took me a whole day to get it working! Basically the steps are as follows. This is very sketchy but see the detailed guides below which helped me.

    1. Enable the IIS Web Management role feature.
    2. Install Web Deploy 3.0 (or higher). Make sure to customise the install to include the handlers (See notes below). If you're not presented with this option go to add/remove programs, find webdeploy, right click and select "change" option.
    3. In IIS click on the server node and find the "Management Service" icon. Enable remote access and configure a dedicated IIS User for remote deployment (These will be the credentials that will go in the user name and password boxes).
    4. At the site level in IIS assign this user to manage the website.
    5. Make sure port 8172 is open on the web server (you can check this port here).
    6. Try reconnecting from Visual Studio. There was some trial and error here for me but the error messages do link to a MS guide for decoding :)
    7. Even after connecting successfully I had to wrangle with permissions, so my IIS user had sufficient privileges to create the app pool, directories and general file management jobs.

    The following links really helped!

    Configuring the handler on the web server:

    http://www.iis.net/learn/publish/using-web-deploy/configure-the-web-deployment-handler

    Connecting via Visual Studio:

    http://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx

    NOTES:

    To ensure the handler is running, login into your IIS server and point your browser to the following URL.

    https://<servername>:8172/MsDeploy.axd
    

    F12 to open up the dev tools to see the HTTP response. Also MsDeploy also creates IIS logs in inetpub/logs which should give you some clue if you're having connectivity problems.

    这篇关于从 Visual Studio 2012 到远程 IIS 8 服务器的 Web 部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆