androidエミュレータからlocalhostのASP.NETサイトに接続してデバッグ
http://localhost (127.0.0.1) はつながりません
http://10.0.2.2
が正解のようです。
Android Developers に以下のように記載されています。
Using the Emulator | Android Developers
Network Address Description 10.0.2.1 Router/gateway address 10.0.2.2 Special alias to your host loopback interface (i.e., 127.0.0.1 on your development machine) 10.0.2.3 First DNS server 10.0.2.4 / 10.0.2.5 / 10.0.2.6 Optional second, third and fourth DNS server (if any) 10.0.2.15 The emulated device's own network/ethernet interface 127.0.0.1 The emulated device's own loopback interface
ポート指定URL(IIS Express)はつながりません
http://10.0.2.2でもポート指定は無理っぽいので、デフォルトのIIS Expressは諦めて、ローカルIISでデバッグ実行しましょう。
プロジェクトのプロパティ → Web → サーバー → 「IIS Express」を「ローカル IIS」に変更
「仮想ディレクトリを作成しますか?」的な確認には「はい」を選択。
- http://10.0.2.2/アプリケーション名
で接続できるようになります。