IISExpress

IIS Express 比 IIS更好用,轻量级服务器(IIS精简版),貌似默认支持asp和asp.net,对.net的支持也可以在“控制面板”的“程序与功能”中添加

安装完毕后用命令行工具(iisexpress.exe)运行服务器,配置文件存放在(C:\Program Files\IIS Express\config)

PS C:\Program Files\IIS Express> .\iisexpress.exe /?
IIS Express Usage:
------------------
iisexpress [/config:config-file] [/site:site-name] [/siteid:site-id] [/systray:true|false] [/trace:trace-level] [/userho
me:user-home-directory]
iisexpress /path:app-path [/port:port-number] [/clr:clr-version] [/systray:true|false] [/trace:trace-level]

/config:config-file
The full path to the applicationhost.config file. The default value is the IISExpress\config\applicationhost.config file
 that is located in the user's Documents folder.

/site:site-name
The name of the site to launch, as described in the applicationhost.config file.

/siteid:site-id
The ID of the site to launch, as described in the applicationhost.config file.

/path:app-path
The full physical path of the application to run. You cannot combine this option with the /config and related options.

/port:port-number
The port to which the application will bind. The default value is 8080. You must also specify the /path option.

/clr:clr-version
The .NET Framework version (e.g. v2.0) to use to run the application. The default value is v4.0. You must also specify t
he /path option.

/systray:true|false
Enables or disables the system tray application. The default value is true.

/userhome:user-home-directory
IIS Express user custom home directory (default is %userprofile%\documents\iisexpress).

/trace:trace-level
Valid values are 'none', 'n', 'info', 'i', 'warning', 'w', 'error', and 'e'. The default value is none.

\Examples:
iisexpress /site:WebSite1
This command runs WebSite1 site from the user profile configuration file.

iisexpress /config:c:\myconfig\applicationhost.config
This command runs the first site in the specified configuration file.

iisexpress /path:c:\myapp\ /port:80
This command runs the site from the 'c:\myapp' folder over port '80'.

 启动方法如下:

.\iisexpress.exe /path:"C:\Users\Ciaos\Documents\My Web Sites\WebSite1" /port:80

 配置端口及外网访问

编辑C:\Users\Ciaos\Documents\IISExpress\config
<binding protocol="http" bindingInformation=":8080:localhost" />
修改为
<binding protocol="http" bindingInformation="*:80:*" />
外网可以通过ip直接访问

一个典型的asp.net页面(.aspx)结构如下(IIS默认vb.net)

<% Page Language="VB" %>
<html>
	<body>
		<form runat="server">
			Enter you hobby:
			<asp:TextBix id="txtHobby" runat="server"/
			>
			<input type="submit">
		</form>
	</body>
	<script runat="server>
		Sub Page_Load(…, …)
		… …
		End Sub
	</script>
	<script lanuguage="javascript">
		function --- ----
		{ ---
		}
	</script>
</html>

 更多资料参照:http://www.cnblogs.com/IPrograming/archive/2013/05/26/Configuration_IIS_Express.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值