GrayMP

DEBUG_LOCAL

Jan 25th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. ---
  2. netsh http add urlacl url=http://<hostIP>:<siteport>/ user=<group>
  3. где group = "все" на русской винде и "everyone" на английской соответственно
  4. , hostIP - айпи который выдал роутер, можно выяснить с помощью команды ipconfig или мышкой в настройках соединения
  5. Пример
  6. netsh http add urlacl url=http://192.168.0.101:54910/ user=все
  7.  
  8. ---
  9. В проекте с сайтом
  10. находим applicationhost.config
  11. он либо в папке <username>/Documents/IIS Express
  12. либо в папке <site_src_root>/.vs/Config, тобишь пользовательские настройки студии.
  13. Выяснить откуда именно тянутся настройки можно при запущенном из-под студии сайте.
  14. В панели рядом с часами будет иконка ИИС, показать все приложения, нажимаем на приложение, смотрим значение "Настройка"
  15.  
  16. Там нужно подкорректировать биндинги.
  17. В моем случае получилось так:
  18. <sites>
  19. <site name="WebSite1" id="1" serverAutoStart="true">
  20. <application path="/">
  21. <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
  22. </application>
  23. <bindings>
  24. <binding protocol="http" bindingInformation=":8080:localhost" />
  25. </bindings>
  26. </site>
  27. <site name="Web" id="2">
  28. <application path="/" applicationPool="Clr4IntegratedAppPool">
  29. <virtualDirectory path="/" physicalPath="D:\Work\RudenSoft\Unipost\src_new\unipost\Ark2" />
  30. </application>
  31. <bindings>
  32. <binding protocol="http" bindingInformation="*:54910:localhost" />
  33. <binding protocol="http" bindingInformation="*:54910:*" />
  34. <binding protocol="http" bindingInformation="*:54910:192.168.0.101" />
  35. <binding protocol="http" bindingInformation="192.168.0.101:54910:*" />
  36. </bindings>
  37. </site>
  38. <siteDefaults>
  39. <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
  40. <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
  41. </siteDefaults>
  42. <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
  43. <virtualDirectoryDefaults allowSubDirConfig="true" />
  44. </sites>
  45.  
  46. Немного наугад, но главное что получилось
  47.  
  48.  
  49. ---
  50. Фаервол
  51. Порт нужно добавить в исключения. ну или выключить фаервол, если сеть защищена паролем
  52.  
  53. ---
  54. Проверка. На другом устройстве в браузере вводим http://192.168.0.101:54910 и видим сайт
Advertisement
Add Comment
Please, Sign In to add comment