asp.net - VS 2015: Binding a WebApp to something besides localhost -


i've got vs webapp testing (an odata provider if matters). client android.

you can't run server , client (via simulator of client' os) on same box.

so i'm using physical android device run client. unfortunately visual studio hell bent on binding webapp (and to) localhost. isn't won't respond attempts connect hostname or ip address, , attempt change iis configuration inside of visual studio meets error message saying must use localhost (which cannot used connect machine)

1) how around this?

and

2) if isn't obvious find, how people expected test remote device on development machine?

joehz,

you need change binding configuration of iis express webapp.

  • in folder *.sln is, find hidden folder named .vs. open xml file applicationhost.config in config folder.
  • in applicationhost.config file, find sites nodes, site want configure.

for example:

 <site name="mysitename" id="2">     <application path="/" applicationpool="clr4integratedapppool">         <virtualdirectory path="/" physicalpath="c:\mydirecctory" />     </application>     <bindings>         <binding protocol="http" bindinginformation="*:8381:localhost" />         <!--add new binding here ip address-->         <binding protocol="http" bindinginformation="*:8381:192.168.0.10" />         <!--or add new binding machine name-->         <binding protocol="http" bindinginformation="*:8381:machinename" />     </bindings> </site> 
  • once file saved, make sure iis express closed , start website. once iis express started, check if new binding worked, should see this:

iis express binding

  • ensure can access website in web browser, not localhost, time new binding http://192.168.0.56:33617.
  • if good, go firewall, , add new tcp rule port need open
  • when done, @ point device on same network should able access website. try new address on android device web browser.
  • your android client should able access webapp.

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -