在没有Visual Studio的情况下使用IIS Express运行Web服务

编程入门 行业动态 更新时间:2024-10-19 00:22:39
本文介绍了在没有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服务

本文发布于:2023-11-15 05:36:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1591610.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:情况下   Studio   Visual   Web   Express

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!