IIS Express 10 (Visual Studio 2015) でリモート(localhost以外、他のホスト)からアクセスしたい
applicationhost.config の修正
IIS Expressの設定ファイル"applicationhost.config"を変更します。
google先生に尋ねると、 C:\Users\ユーザ名\Documents\IISExpress\config\applicationhost.config だと言うんだけど、中身を見ると違う。ローカルを調べまくってみると、下記にあることが分かった。
C:\Users\ユーザ名\Source\Repos\SkillDB\.vs\config\applicationhost.config
念のため、対象プロジェクトかどうかを physicalPath で検索して確認。
siteセクション内のさらにbindingsセクションの中にbindingタグを追加します。
修正前
<site name="(プロジェクト名)" id="2"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="(プロジェクトファイルのあるパス)" /> </application> <bindings> <binding protocol="http" bindingInformation="*:3189:localhost" /> </bindings> </site>
修正後
<site name="(プロジェクト名)" id="2"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="(プロジェクトファイルのあるパス)" /> </application> <bindings> <binding protocol="http" bindingInformation="*:3189:localhost" /> <binding protocol="http" bindingInformation="*:3189:(このホスト/マシンのIPアドレス)" /> </bindings> </site>