Web ãµã¼ãã¹ã®éçºããã¦ããã¨ãããã©ã«ãã§ãã localhost:12345 ã¨ãããã¹ãåã§ã¯ãªã㦠www.mydomain.com ã¿ããã«ãã¡ããã¨ãããã¹ãåã§ãã¹ãããå¿ è¦ãåºã¦ããã¨æãã¾ããç¹ã« Area ããµããã¡ã¤ã³ã«æ¯ã£ã¦ããå ´åãªã©ã¯ãã¹ãèªä½ã§ããªããã¨ã«ãªã£ã¦ãã¾ãã¾ãã
ãã«ã® IIS ã§ã¯ç°¡åã«è¨å®ãåºæ¥ããã§ãããIIS Express ã®å ´åã¯ã¡ãã£ã¨æéããããã®ã§ã¡ã¢ãã¦ããã¾ãã
ã¾ã㯠IIS Express ã®è¨å®ãå¼ãã®ã§ãããGUI ã¯ç¨æããã¦ããªãã®ã§ããã¥ã¡ã³ã以ä¸ã«ãã IISExpress\config\applicationHost.config ãéãã¦ãããã¸ã§ã¯ãåã§æ¤ç´¢ãã¾ããããã¨ã以ä¸ã®ãã㪠site è¦ç´ ãè¦ã¤ããã¯ãã§ãã
<site name="MvcApplication27" id="1458856189"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="..." /> </application> <bindings> <binding protocol="http" bindingInformation="*:8207:localhost" /> </bindings> </site>
binding è¦ç´ ãä¿®æ£ãããã追å ãããããã¨ãã¹ãåãç°¡åã«å¢ãããã¨ãåºæ¥ã¾ããä»åã¯ä»¥ä¸ã®ããã« 3 㤠binding ã追å ãã¦ãã¾ãã
<site name="MvcApplication27" id="1458856189"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="..." /> </application> <bindings> <binding protocol="http" bindingInformation="*:8207:www.mydomain.com" /> <binding protocol="http" bindingInformation="*:8207:admin.mydomain.com" /> <binding protocol="http" bindingInformation="*:8207:subdomain.mydomain.com" /> </bindings> </site>
applicationHost.config ã®ä¿®æ£ãçµãã£ãã Visual Studio ã§èµ·åãã URL ãå¤æ´ãã¦ããã¾ãã
ããã§å®è¡ããã¨ãã« www.mydomain.com ããã©ã¦ã¶ã§è¡¨ç¤ºãããããã«ãªãã¾ãã
ãã¨ã¯ hosts ãã¡ã¤ã«ã« 3 ã¤åã®ã¬ã³ã¼ãã追å ããã°æºåå®äºã§ãã
127.0.0.1 www.mydomain.com 127.0.0.1 admin.mydomain.com 127.0.0.1 subdomain.mydomain.com
ãã¦ãããã§å ¨ã¦ã®æºåãå®äºããã®ã§ Visual Studio ã§å®è¡ãã¦ã¿ã¾ãããã
ï¼¼(^o^)ï¼ï½µï¾ï¾
ã¨ããã®ã¯åè«ã§ãIIS Express 㧠localhost 以å¤ã®ãã¹ãåãæå®ããå ´åã«ã¯ãVisual Studio ã管çè 権éã§èµ·åããå¿ è¦ãããããã§ãã
å®éã«ç®¡çè 権éã§ããã¸ã§ã¯ããå®è¡ããããã¡ããã¨å¥ã ã®ãã¹ãåãæå¹ã«ãªãã¾ãã
æåã¯ç®¡çè 権éã§èµ·åãããã¨ã«æ°ãä»ããªãã¦ã諦ãããã«ãªãã¾ãããä½ã¨ããªãã¾ããã
ãµããã¡ã¤ã³ã¨ ASP.NET MVC ã® Area ã¯çµã¿åãããã¨é¢ç½ãã®ã§ã以ä¸ã®è¨äºãåèã«ãã¦è²°ããã°ã¨æãã¾ãã
Azure と MVC でドメインベースのルーティングを行ってみた - しばやん雑記
追è¨
çéªããããã³ã¡ã³ã㧠netsh http add urlacl ãå©ãã°ç®¡çè 権éãè¦ããªãã¨æãã¦ããã£ãã®ã§è©¦ãã¾ããã
netsh http add urlacl url=http://www.mydomain.com:8207/ user=Everyone
ãããªæãã§ç®¡çè 権éã®ã³ãã³ãããã³ããã§ã³ãã³ããå©ãã¨ãVisual Studio ã管çè 権éã§èµ·åããªãã¦ããç¬èªã®ãã¹ãåã使ãã¾ããã