IIS Express를 IP 주소로 바인딩합니다.
IIS Express를 사용하여 네트워크에서 페이지를 호스트할 수 있습니까?즉시 localhost를 할 수 있지만 IP 주소로 바인드하려고 합니다.
넌 할 수 있을 것 같아.
이렇게 하려면 파일을 수동으로 편집해야 합니다(bindingInformation 편집 ').<ip-address>:<port>:<host-name>')
isexpress를 시작하려면 관리자 권한이 필요합니다.
모든 IP 주소에 대해 IIS Express가 응답하려면 주소를 공백으로 두십시오.
bindingInformation=":8080:"
변경 사항을 적용하려면 IIS Express를 다시 시작해야 합니다.
위에서 설명한 대로 host.config 애플리케이션을 편집합니다.이를 쉽게 찾을 수 있는 방법은 IIS Express를 사용하여 VS에서 사이트를 실행하는 것입니다.시스템 트레이 아이콘을 마우스 오른쪽 버튼으로 클릭하여 모든 응용 프로그램을 표시합니다.사이트를 선택한 다음 하단에 있는 구성 링크를 클릭하여 사이트를 엽니다.
다른 바인딩 항목을 추가하고 초기 localhost는 그대로 두는 것이 좋습니다.이 추가 바인딩은 IIS Express 시스템 트레이에 사이트 아래에 별도의 응용 프로그램으로 나타납니다.
VS를 admin으로 실행할 필요가 없도록 하려면(admin으로 실행할 수 없는 많은 좋은 이유) 다음과 같이 netsh 규칙을 추가합니다(IP 및 포트를 값으로 바꿉니다). 이 경우 admin cmd.exe가 필요합니다. 한 번만 실행하면 됩니다.
netsh http add urlacl url=http://192.168.1.121:51652/ user=\Everyone
netsh는 url=syslog://+:51652/와 같은 규칙을 추가할 수 있지만 IIS Express에서 이 규칙을 올바르게 배치하지 못했습니다.사용할 수 있습니다.netsh http show urlacl기존 규칙을 나열하고 삭제할 수 있습니다.netsh http delete urlacl url=blah.
자세한 내용은 http://msdn.microsoft.com/en-us/library/ms733768.aspx를 참조하십시오.
다음은 원격 호스트에서 액세스할 수 있도록 IIS Express를 사용하여 x64비트 IIS 응용 프로그램을 실행하기 위해 필요한 전체 변경 사항입니다.
iisexpress /config:"C:\Users\test-user\Documents\IISExpress\config\applicationhost.config" /site:MyWebSite
Starting IIS Express ...
Successfully registered URL "http://192.168.2.133:8080/" for site "MyWebSite" application "/"
Registration completed for site "MyWebSite"
IIS Express is running.
Enter 'Q' to stop IIS Express
구성 파일(applicationhost.config)에 다음과 같은 섹션이 추가되었습니다.
<sites>
<site name="MyWebsite" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\build\trunk\MyWebsite" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":8080:192.168.2.133" />
</bindings>
</site>
의 64비트 버전입니다.NET 프레임워크는 다음과 같이 실행할 수 있습니다.
<globalModules>
<!--
<add name="ManagedEngine" image="%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness32" />
<add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" />
-->
<add name="ManagedEngine64" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
바꾸다bindingInformation=":8080:"
그리고 IIExpress를 위해 방화벽을 해제하는 것을 잊지 마십시오.
언급URL : https://stackoverflow.com/questions/4866547/binding-iis-express-to-an-ip-address 입니다.
'programing' 카테고리의 다른 글
| 화면에 stdout을 유지하면서 파이프에 연결하는 방법(출력 파일이 아님) (0) | 2023.04.25 |
|---|---|
| Swift에서 고유한 장치 ID를 얻는 방법은 무엇입니까? (0) | 2023.04.25 |
| Angular 2+의 ngShow 및 ngHide는 무엇입니까? (0) | 2023.04.25 |
| 단일 테스트 파일을 실행합니다. (0) | 2023.04.25 |
| Excel의 2차 및 3차 회귀 분석입니다. (0) | 2023.04.25 |