Viewing localhost website from mobile device

后端 未结 11 1736
南方客
南方客 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: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:

    
            
            
                   
               
             
       
    

    *)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

提交回复
热议问题