如何在 Windows 7 / IIS 7 上部署 WCF 工作流服务应用程序
我在 .NET 4.0 中有一个 WCF 工作流服务应用程序,通常我们部署到 Windows Server 2008。
为此,我在 VS 2010 中创建一个部署包,它创建一个 .zip 文件。我打开IIS 7选择站点并右键单击选择部署|进口。
但是,出于开发目的,我想在桌面上运行它。我看不到如何在 Windows 7 中将 zip 部署到 IIS 7。我创建了一个站点,但右键单击时没有看到“部署”选项。
我应该如何部署?
I've got a WCF Workflow Service Application in .NET 4.0, and usually we deploy to Windows Server 2008.
For that I create a Deployment Package in VS 2010 which creates a .zip. The I open IIS 7 select the site and right click to select Deploy | Import.
However, for development purposes I want to run this on my desktop. I can't see how to deply the zip to IIS 7 in Windows 7. I created a site but I don't get a Deploy option on right click.
How should I deploy?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认情况下,IIS 7.0 未配置 WCF 服务。以下是配置 IIS 7.0 以运行 WCF 服务的步骤:
安装 IIS ADDONS
转到控制面板 –>节目 –>打开或关闭 Windows 功能。等待在 Microsoft .NET Framework 3.0 或更高版本中编译列表,检查“Windows Communication Foundation HTTP 激活”和“Window Communication Foundation Non-HTTP 激活”插件。在“Internet 信息服务”部分中,检查“Web 管理工具”下的所有插件,这是为了直接从 Visual Studio 发布 WCF。按“确定”,安装将完成。
添加 MIME 类型
在 IIS 控制面板上双击 MIME 类型小程序。在“操作”菜单上,单击“添加”菜单项。弹出一个窗口,输入以下信息:
添加处理程序映射
再次单击左侧的“默认网站”节点,然后双击右侧的“处理程序映射”小程序图标。在“操作”菜单上,单击“添加托管处理程序”。弹出一个窗口,输入以下信息:
IIS 已为 WCF 服务配置,现在我们必须部署服务。
以管理员身份通过 Visual Studio 部署您的服务。右键单击服务项目文件,然后单击“发布”,现在在新打开的对话框中选择“默认应用程序”,然后单击“创建新 Web 应用程序”按钮,相应地命名它,然后单击“打开”。
By default, IIS 7.0 is not configured for WCF services. Here are the steps to configure IIS 7.0 to run WCF services:
INSTALLING IIS ADDONS
Go to Control Panel –> Programs –> Turn windows feature on or off. Wait for a list to compile here in Microsoft .NET Framework 3.0 or higher section check both "Windows Communication Foundation HTTP Activation" and "Window Communication Foundation Non-HTTP Activation" addons. In section Internet Information Services check all the addons under "Web Management Tools" this is to directly publish WCF from Visual Studio. Press OK and the installation will complete.
ADD MIME TYPE
At the IIS control panel double click on the MIME Types applet. On the Actions menu, click on the Add menu item. A window pops up, enter the following information:
ADD HANDLER MAPPING
Click again on the Default Web Site node on the left side, then double click on the Handler Mappings applet icon on the right side. On the Actions menu, click on the Add Managed Handler. A window pops up, enter the following information:
IIS is configured for WCF service now we have to deploy a service.
Deploy your service via Visual Studio as Administrator. Right click on Service project file and click to Publish, Now in newly opened dialogue box select Default Application and click the button Create New Web Application name it accordingly and click Open.
您的本地计算机上是否安装了 IIS Web Deploy?如果没有,请安装它,您应该拥有与服务器上相同的部署菜单。
http://www.iis.net/download/webdeploy
您的另一个选择是手动部署 (不使用部署管理单元)。我忘记了确切的 msdeploy .zip 包格式,但您应该能够从 zip 中获取应用程序文件并将其解压到您用于站点根目录的任何位置。
Do you have IIS Web Deploy installed on your local machine? If not, install it, and you should have the same deploy menu you get on your servers.
http://www.iis.net/download/webdeploy
Your other option is to manually deploy (not using the deploy snap in). I forgot the exact msdeploy .zip package format, but you should be able to get the app files out of the zip and extract to whatever location you are using for the site's root.