locked
Bind Ip address in url RRS feed

  • Question

  • User-257070954 posted

    Hi

          How bind ip address to url  instead of loaclhost   and  debug application in asp.net visual studio 2017 project. How we achieve these?


             expecting answer like 192.168.0.27:8081/login.aspx  instead  of  Localhost:8081/login.aspx

    Tuesday, July 17, 2018 11:15 AM

All replies

  • User753101303 posted

    Hi,

    Try https://www.codeproject.com/Articles/805238/Access-IIS-Express-Website-From-Remote-Machine (you likely miss the last part ?). Make sure it does bring a real benefit compared with just using localhost (or you mean you are trying to debug from a remote machine ?)

    Tuesday, July 17, 2018 11:23 AM
  • User475983607 posted

    Hi

          How bind ip address to url  instead of loaclhost   and  debug application in asp.net visual studio 2017 project. How we achieve these?


             expecting answer like 192.168.0.27:8081/login.aspx  instead  of  Localhost:8081/login.aspx

    Perhaps if you explain the problem you are trying to solve.  What is wrong with debugging using localhost?  Are you trying to debug remotely?

    Tuesday, July 17, 2018 11:25 AM
  • User-369506445 posted

    hi

    you need to edit applicationhost.config <g class="gr_ gr_23 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep" id="23" data-gr-id="23">file</g> manually (edit bindingInformation '<ip-address>:<port>:<host-name>'

    please follow below link

    https://stackoverflow.com/questions/4866547/binding-iis-express-to-an-ip-address

    Tuesday, July 17, 2018 11:34 AM
  • User-257070954 posted
     i tried this method . But getting error like Bad Request - Invalid Hostname
     
     
    Below giving applicationhost.config file code
    <sites>
    <site name="IPAddress" id="6" serverAutoStart="true">
    <application path="/">
    <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\IPAddress" />
    </application>
    <bindings>
    <binding protocol="http" bindingInformation=":50311:" />
    <binding protocol="http" bindingInformation=":50311:DESKTOP-P134SBC" />
    <binding protocol="http" bindingInformation="*:50311:192.168.0.27" />
    <!--<binding protocol="http" bindingInformation=":8082:*" />

    <binding protocol="http" bindingInformation=":8082:192.168.0.27" />-->
    </bindings>
    </site>
    <siteDefaults>
    <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
    <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
    </siteDefaults>
    <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
    <virtualDirectoryDefaults allowSubDirConfig="true" />
    </sites>
    Wednesday, July 18, 2018 9:58 AM
  • User475983607 posted

    Still, you have not explained the problem you are trying to solve or steps to reproduce the problem.  It could b that your approach is wrong but we have no idea what you are trying to do. 

    Wednesday, July 18, 2018 10:31 AM
  • User-782232518 posted

    <div> i tried this method . But getting error like Bad Request - Invalid Hostname</div>

    When you got Bad Request, what was the URL in your browser?

    Saturday, July 28, 2018 7:55 PM