2011-03-28 116 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