Viewing localhost website from mobile device

后端 未结 11 1708
南方客
南方客 2020-11-27 11:23

I have an ASP.Net website hosted on my Win8\'s localhost, the site seems to be running as expected on the desktop, but now i also want to test t

相关标签:
11条回答
  • 2020-11-27 12:02

    One of the easiest way to remotely access ASP.net local website, without messing with adding new rules to firewall, is to use this Visual Studio extension:

    Conveyor by Keyoti (Visual Studio extension)

    Just install it. Every time when you run your project, it will show you URL which can be used for remote access. No other configruration required.

    0 讨论(0)
  • 2020-11-27 12:02

    Know your host ip address on your lan Open cmd and type ipconfig and the if xampp the default listen port would be 80 Then for instance if 10.0.0.5 is your host ip address Type 10.0.0.5:80 from your mobile's web browser Make sure that both are connected to the same LAN However the default port that webaddress tries is 80.

    0 讨论(0)
  • 2020-11-27 12:06

    Use Conveyor by Keyoti (extensión de Visual Studio). Extension visual studio

    0 讨论(0)
  • 2020-11-27 12:07

    In additional you should disable your antivirus or manage it to open 80 port on your system.

    0 讨论(0)
  • 2020-11-27 12:10

    First of all open applicationhost.config file in visual studio. address>>C:\Users\Your User Name\Documents\IISExpress\config\applicationhost.config

    Then find this codes:

    <site name="Your Site_Name" id="24">
            <application path="/" applicationPool="Clr4IntegratedAppPool"
            <virtualDirectory path="/" physicalPath="C:\Users\Your User         Name\Documents\Visual Studio 2013\Projects\Your Site Name" />
            </application>
             <bindings>      
               <binding protocol="http" bindingInformation="*:Port_Number:*" />
             </bindings>
       </site>
    

    *)Port_Number:While your site running in IIS express on your computer, port number will visible in address bar of your browser like this: localhost:port_number/... When edit this file save it.

    In the Second step you must run cmd as administrator and type this code: netsh http add urlacl url=http://*:port_Number/ user=everyone and press enter

    In Third step you must Enable port on firewall

    Go to the “Control Panel\System and Security\Windows Firewall”
    
    Click “Advanced settings”
    
    Select “Inbound Rules”
    
    Click on “New Rule …” button
    
    Select “Port”, click “Next”
    
    Fill your IIS Express listening port number, click “Next”
    
    Select “Allow the connection”, click “Next”
    
    Check where you would like allow connection to IIS Express (Domain,Private, Public), click “Next”
    
    Fill rule name (e.g “IIS Express), click “Finish”
    

    I hopeful this answer be useful for you

    Update for Visual Studio 2015 in this link: https://johan.driessen.se/posts/Accessing-an-IIS-Express-site-from-a-remote-computer

    0 讨论(0)
提交回复
热议问题