2011-03-28 117 views
4

我有家里的Visual Studio 2010,并开发了一个Web应用程序。我现在在另一个位置的另一台电脑上。我所有的是我的USB驱动器上的项目文件夹,并且所有这台计算机已安装IIS快车。有什么办法可以让我的Web应用程序启动并运行?IIS快速部署应用程序

回答

13

假设您拥有在项目文件夹中运行Web应用程序所需的所有文件,您应该能够在IIS Express中创建该站点并启动它。

以下是您可能需要添加到IIS Express配置文件的内容。该文件通常位于“C:\ Users \\ Documents \ IISExpress \ config \ applicationhost.config”中。

下面,您将需要更改网站的路径,并确保您正确地绑定到它。如果与您想要保留的任何其他网站冲突,您可能需要更改端口号。

<sites> 
    <site name="MyWebsite" id="1" serverAutoStart="false"> 
    <application path="/"> 
     <virtualDirectory path="/" physicalPath="<USB Drive>:\<FolderToMyWebsite>" /> 
    </application> 
    <bindings> 
     <binding protocol="http" bindingInformation=":8080:localhost" /> 
    </bindings> 
    </site> 
<sites> 
0

我有同样的问题,我解决它以下列方式:

例子: 端口= 1111个

local_ip_address = 192.168.1.1 - 在网页存储局域网IP地址

步骤1:

netsh http add urlacl url=http://local_ip_address:port/ user=Everyone 

步骤2:

<bindings> 
     <binding protocol="http" bindingInformation="*:port:localhost" /> 
     <binding protocol="http" bindingInformation="local_ip_address:port:" /> 
</bindings> 

第3步:

netsh advfirewall firewall add rule name="IIS Express (non-SSL)" action=allow protocol=TCP dir=in localport=port 

发现评论这里的解决方案: http://blogs.iis.net/vaidyg/archive/2010/07/29/serving-external-traffic-with-webmatrix-beta.aspx