{"id":243,"date":"2017-07-25T23:59:18","date_gmt":"2017-07-25T14:59:18","guid":{"rendered":"http:\/\/reasty.net\/?p=243"},"modified":"2017-07-25T23:59:18","modified_gmt":"2017-07-25T14:59:18","slug":"24%ec%9e%a5-asp-net-core-1-0-%ec%9b%b9-%ec%9d%91%ec%9a%a9-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%a8-%ed%94%84%eb%a1%9c%ec%a0%9d%ed%8a%b8","status":"publish","type":"post","link":"https:\/\/reasty.net\/?p=243","title":{"rendered":"24\uc7a5 ASP.NET Core 1.0 \uc6f9 \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \ud504\ub85c\uc81d\ud2b8"},"content":{"rendered":"<h1>24.1. \uc0c8\ub85c\uc6b4 \ud504\ub85c\uc81d\ud2b8 \uc2dc\uc2a4\ud15c (\ub354 \uc0c8\ub85c\uc6cc \uc838\uc11c&#8230;1.1 =_=)<\/h1>\n<p>\ub85c\uc990\ub9b0(Roslyn)\uc5d0 \uc758\ud558\uc5ec \ub3d9\uc801 \ucef4\ud30c\uc77c\uc774 \uac00\ub2a5\ud558\ub2e4. \uc218\uc815 \uc989\uc2dc \ubc18\uc601\ub41c\ub2e4.<\/p>\n<ul>\n<li><strong>global.json<\/strong> &#8211; Core 1.1\uc5d0\uc11c \ubcc0\uacbd\ub428<\/li>\n<li><strong>project.json<\/strong> &#8211; Core 1.1\uc5d0\uc11c \ubcc0\uacbd\ub428<\/li>\n<li><strong>wwwroot<\/strong> &#8211; \uc6f9 \uc0ac\uc774\ud2b8\uc758 root \ud3f4\ub354. \uc678\ubd80\uc5d0\uc11c\ub294 wwwroot\uc5d0 \uc62c\ub824\uc9c4 \ud30c\uc77c\ub4e4\ub9cc \uc11c\ube44\uc2a4\uac00 \ub41c\ub2e4.<\/li>\n<li><strong>Startup.cs<\/strong> &#8211; \uc751\uc6a9\ud504\ub85c\uadf8\ub7a8\uc758 \uc2dc\uc791\uc810<\/li>\n<li><strong>appsettings.json<\/strong> &#8211; ASP.NET\uc758 Web.config \ud30c\uc77c\uacfc \ub3d9\uc77c\ud55c \uae30\ub2a5\uc73c\ub85c, \ud658\uacbd \uc124\uc815 \ud30c\uc77c. \uc8fc\ub85c Startup.cs \uc5d0\uc11c <em>ConfigureServices()<\/em> \uba54\uc11c\ub4dc\uc5d0\uc11c \uc0ac\uc6a9\ub418\uc5b4 \uc9c4\ub2e4.<\/li>\n<li><strong>bundleconfig.json<\/strong> &#8211; Visual Studio\uc758 \ud655\uc7a5\ub3c4\uad6c\uc778 Bundler &amp; Minifier \uc5d0\uc11c \uc0ac\uc6a9\ub418\uc5b4 \uc9c4\ub2e4. CSS \ub610\ub294 javascript \ud30c\uc77c\uc744 \ucd95\uc18c\ud558\uac70\ub098 \ud569\uce60\uc218 \uc788\ub2e4\uace0 \ud55c\ub2e4. \uc774\ub7ec\ud55c \uc791\uc5c5\uc758 \uc124\uc815\ub4e4\uc774 \uc774 \ud30c\uc77c\uc5d0 \uc800\uc7a5\ub41c\ub2e4.<\/li>\n<li>\ubaa8\ub358 \uc6f9 \uac1c\ubc1c \ub3c4\uad6c\ub4e4\n<ul>\n<li><strong>NPM<\/strong> &#8211; Node.js \uad00\ub828 \ud328\ud0a4\uc9c0 \ub9e4\ub2c8\uc800<\/li>\n<li><strong>Bower<\/strong> &#8211; CSS, javascript, Image, Font \ub4f1 \uc815\uc801\uc778 \ud30c\uc77c \uad00\ub828 \ud328\ud0a4\uc9c0 \ub9e4\ub2c8\uc800<\/li>\n<li><strong>Gulp<\/strong> &#8211; \ud0dc\uc2a4\ud06c \ub7ec\ub108. javascript \ucf54\ub4dc\ub97c \ucd95\uc18c\ud558\uac70\ub098 \ub09c\ub3c5\ud654 \ucc98\ub9ac\ud560\ub54c \uc0ac\uc6a9<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h1>24.2. \uc2e4\uc2b5 (\ubb50 \uc5c6\uc74c&#8230;)<\/h1>\n<h1>24.3. HTTP \ud30c\uc774\ud504\ub77c\uc778\uacfc \ubbf8\ub4e4\uc6e8\uc5b4<\/h1>\n<p>\uac01\uc885 \ubbf8\ub4e4\uc6e8\uc5b4\ub97c \ud30c\uc774\ud504\ub77c\uc778\uc5d0 \ub4f1\ub85d\ud574\uc11c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4.<\/p>\n<h1>24.4. \uc815\uc801 \ud30c\uc77c \uc2e4\ud589\uc744 \uc704\ud55c UseStaticFiles() \ubbf8\ub4e4\uc6e8\uc5b4 \ucd94\uac00<\/h1>\n<p>wwwroot \ud3f4\ub354\uc5d0 \uc704\uce58\ud55c \uc815\uc801\ud30c\uc77c\ub4e4\uc744 \uc2e4\ud589\ud558\uae30 \uc704\ud55c \ubbf8\ub4e4\uc6e8\uc5b4<\/p>\n<pre title=\"UseContentRoot\" class=\"lang:c# decode:true\">IWebHostBuilder.UseContentRoot(Directory.GetCurrentDirectory())<\/pre>\n<p>\uc774 \uba54\uc11c\ub4dc \ud638\ucd9c\ub85c \uc778\ud558\uc5ec wwwroot\ud3f4\ub354\uac00 \ub8e8\ud2b8\ud3f4\ub354\uac00 \ub41c\ub2e4.<\/p>\n<p>Startup.cs \ud30c\uc77c\uc758 <em>Configure()<\/em> \uba54\uc11c\ub4dc\uc5d0 <em>IApplicationBuilder.UseStaticFiles()<\/em>\ub97c \ud638\ucd9c\ud574\uc57c \ud55c\ub2e4.<\/p>\n<p><em>IApplicationBuilder.UseFileServer()<\/em>\ub97c \ud638\ucd9c\ud574\ub3c4 \ub41c\ub2e4. (\uc880 \ub354 \ucd94\uac00\uae30\ub2a5\uc774 \ud3ec\ud568\ub418\uc5b4 \uc788\ub2e4.)<\/p>\n<h1>24.5. \uc2e4\uc2b5<\/h1>\n<p>Microsoft.AspNetCore.StaticFiles \ud328\ud0a4\uc9c0\uac00 \uc124\uce58\ub418\uc5b4 \uc788\ub294\uc9c0 \ud655\uc778\ud558\ub824\uba74 Visual Studio\uc758 \uc194\ub8e8\uc158\ud0d0\uc0c9\uae30\uc5d0\uc11c \ud574\ub2f9 \ud504\ub85c\uc81d\ud2b8\uc758 <em>Dependencies<\/em> \ud558\uc704 \ub178\ub4dc\uc758 <em>Nuget<\/em>\uc744 \ud655\uc778\ud55c\ub2e4.<br \/>\n\ud504\ub85c\uc81d\ud2b8\uba74.csproj \ud30c\uc77c\uc744 \ud14d\uc2a4\ud2b8\ud3b8\uc9d1\uae30\ub85c \uc5f4\uc5b4\ubcf4\uba74<\/p>\n<pre class=\"lang:xhtml decode:true \">&lt;ItemGroup&gt;\n    &lt;PackageReference Include=\"Microsoft.AspNetCore.StaticFiles\" Version=\"1.1.2\" \/&gt;\n&lt;\/ItemGroup&gt;<\/pre>\n<p>\uac00 \uc788\ub294\uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>\ubcc4\ub3c4\uc758 \uacbd\ub85c\uc5d0 \uc815\uc801\ud30c\uc77c\uc744 \uc704\ud55c \ud3f4\ub354\ub97c \ucd94\uac00\ud558\ub824\uba74,<\/p>\n<pre title=\"StaticFileOptions\" class=\"lang:c# decode:true \">\/\/app.UseStaticFiles();\napp.UseStaticFiles(new StaticFileOptions\n{\nFileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), \"MyStaticFiles\")),\nRequestPath = new PathString(\"\/StaticFiles\"),\n});\n\/\/ \uc2e4\uc81c \ub514\ub809\ud1a0\ub9ac\uba85\uc740 'MyStaticFiles'\uc774\uace0, \uc6f9 \uacbd\ub85c\ub294 '\/StaticFiles' \uc774\ub2e4.<\/pre>\n<h1>24.6. \uc8fc\uc694 \ubbf8\ub4e4\uc6e8\uc5b4<\/h1>\n<ul>\n<li><strong>UseDirectoryBrowser()<\/strong> &#8211; \ub514\ub809\ud130\ub9ac \ubaa9\ub85d \ubcf4\uae30<\/li>\n<li><strong>UseDefaultFiles()<\/strong> &#8211; \uae30\ubcf8 \ubb38\uc11c \uc81c\uacf5<\/li>\n<li><strong>UseStatusCodePages()<\/strong> &#8211; \uc0c1\ud0dc \ucf54\ub4dc \ud45c\uc2dc<\/li>\n<li><strong>UseWelcomePage()<\/strong> &#8211; \ud658\uc601 \ud398\uc774\uc9c0 \ucd9c\ub825<\/li>\n<li><strong>UseDeveloperExceptionPage()<\/strong> &#8211; \uc790\uc138\ud55c \uc5d0\ub7ec \uba54\uc2dc\uc9c0 \ud45c\uc2dc<\/li>\n<li><strong>UseFileServer()<\/strong> &#8211; UseDefaultFiles(), UseStaticFiles(), UseDirectoryBrowser() \uae30\ub2a5 \ubaa8\ub450\ub97c \ud55c\ubc88\uc5d0 \ud638\ucd9c\ud558\ub294 \uba54\uc11c\ub4dc<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h1>. \ucc38\uace0\uc790\ub8cc<\/h1>\n<p>https:\/\/www.slideshare.net\/SeongBaeHong\/aspnet-core-78230249<\/p>\n<p>&#8211; ASP.NET Korea Study Group<\/p>\n<p>[embeddoc url=&#8221;http:\/\/192.168.10.240:8080\/wp-content\/uploads\/2017\/07\/ASP.NET-Core-1.0-\uc6f9-\uc751\uc6a9-\ud504\ub85c\uadf8\ub7a8-\ud504\ub85c\uc81d\ud2b8.pdf&#8221; download=&#8221;all&#8221;] &#8211;\u00a0ASP.NET Korea Study Group, \uc548\uc9c0\uc624<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>24.1. \uc0c8\ub85c\uc6b4 \ud504\ub85c\uc81d\ud2b8 \uc2dc\uc2a4\ud15c (\ub354 \uc0c8\ub85c\uc6cc \uc838\uc11c&#8230;1.1 =_=) \ub85c\uc990\ub9b0(Roslyn)\uc5d0 \uc758\ud558\uc5ec \ub3d9\uc801 \ucef4\ud30c\uc77c\uc774 \uac00\ub2a5\ud558\ub2e4. \uc218\uc815 \uc989\uc2dc \ubc18\uc601\ub41c\ub2e4. global.json &#8211; Core 1.1\uc5d0\uc11c \ubcc0\uacbd\ub428 project.json &#8211; Core 1.1\uc5d0\uc11c \ubcc0\uacbd\ub428 wwwroot &#8211; \uc6f9 \uc0ac\uc774\ud2b8\uc758 root \ud3f4\ub354. \uc678\ubd80\uc5d0\uc11c\ub294 wwwroot\uc5d0 \uc62c\ub824\uc9c4 \ud30c\uc77c\ub4e4\ub9cc \uc11c\ube44\uc2a4\uac00 \ub41c\ub2e4. Startup.cs &#8211; \uc751\uc6a9\ud504\ub85c\uadf8\ub7a8\uc758 \uc2dc\uc791\uc810 appsettings.json &#8211; ASP.NET\uc758 Web.config \ud30c\uc77c\uacfc \ub3d9\uc77c\ud55c \uae30\ub2a5\uc73c\ub85c, \ud658\uacbd \uc124\uc815 \ud30c\uc77c. \uc8fc\ub85c Startup.cs \uc5d0\uc11c ConfigureServices() \uba54\uc11c\ub4dc\uc5d0\uc11c \uc0ac\uc6a9\ub418\uc5b4 \uc9c4\ub2e4. bundleconfig.json&#8230; <a href=\"https:\/\/reasty.net\/?p=243\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13,14],"tags":[18,19,21],"class_list":["post-243","post","type-post","status-publish","format-standard","hentry","category-asp-net-core","category-asp-net-core-net","tag-asp-net-core","tag-asp-net-korea-study-group","tag-c"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/posts\/243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=243"}],"version-history":[{"count":0,"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/posts\/243\/revisions"}],"wp:attachment":[{"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}