使用 IIS Express 托管网站(临时) [英] Using IIS Express to host a website (temporarily)

查看:34
本文介绍了使用 IIS Express 托管网站(临时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站 (MVC3),用于开发托管在 IIS Express 中.(我遇到了 Cassini Devserver 的错误,不得不升级......)现在,我想知道,是否可以让我本地网络(路由器后面)上的其他机器看到我的机器上托管的站点?(例如,如果我将 http://my.local.ip:port 写入同一局域网上的浏览器因为我会加载页面吗?)

I have a website (MVC3), which for developement is hosted in IIS Express. (I've run into a bug of Cassini Devserver and had to upgrade...) Now, I'm wondering, is it possible to let other machines on my local net (behind router) see the site as hosted on my machine? (e.g. If I write http://my.local.ip:port into a browser on the same LAN as I am will the page load?)

推荐答案

默认情况下,IIS Express 仅服务于本地主机请求.要处理外部请求,请编辑 applicationhost.config 文件(位于 %userprofile%documentsiisexpressconfig)并将 localhost 更改为 '*' 或您的机器名称.(请记住,对于非本地主机绑定,您必须以管理员身份运行或将 URL acl 设置为管理员,然后以非管理员身份运行 iisexpress)

By default IIS Express serves only localhost requests. To serve external requests edit applicationhost.config file (located in %userprofile%documentsiisexpressconfig) and change localhost to '*' or your machine name. (remember for non-localhost binding you must be running as administrator or set URL acl as an administrator and then run iisexpress as non-administrator)

这篇关于使用 IIS Express 托管网站(临时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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