在没有Visual Studio的情况下使用IIS Express运行Web服务 [英] Run Web Service using IIS Express without Visual Studio

查看:81
本文介绍了在没有Visual Studio的情况下使用IIS Express运行Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在PC1中创建了asmx Web服务.现在,我已经将该项目应用于其他PC2.我只安装了IIS Express和.NET Framework.

I have created asmx web service in PC1. Now I have coped this project to some other PC2. I have installed only IIS Express and .NET Framework.

我想使用IIS Express在PC2中运行Web服务.有没有可能? 谢谢!

I want to run web service in PC2 using IIS Express. Is it possible or not? Thanks!!

推荐答案

在C:\ Program(x86)文件夹中的 IIS Express 文件夹下,有 appcmd.exe >.首先,您需要使用follwoing命令添加虚拟目录:

Under the IIS Express folder in the C:\Program (x86) folder there's the appcmd.exe. First you need to add a virtual directory with the follwoing command:

appcmd add vdir /app.name:<site_name>/ /path:/<virtual_directory> /physicalPath:<physical_location>

如果没有站点,您可以自己添加一个站点:

If there is no site you can add one by yourself:

appcmd add site /name:SITENAME /id:2 /physicalPath:C:\PHYSICAL_PATH /bindings:http/*:8080

如果要在默认网站(如果有)上安装服务,则可以使用以下内容:

If you want to install the Service on the Default Web Site (if there is one) you can use the following:

vdir /app.name:"Default Web Site"/ /path:/service /physicalPath:C:\PHYSICAL_PATH

这篇关于在没有Visual Studio的情况下使用IIS Express运行Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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