├── AspAndWebpack ├── src │ ├── index.ts │ └── index.less ├── Views │ ├── _ViewStart.cshtml │ ├── Home │ │ ├── About.cshtml │ │ ├── Contact.cshtml │ │ └── Index.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ └── _Layout_Template.cshtml │ └── Web.config ├── favicon.ico ├── Global.asax ├── App_Start │ ├── FilterConfig.cs │ └── RouteConfig.cs ├── Global.asax.cs ├── Controllers │ └── HomeController.cs ├── tsconfig.json ├── Web.Debug.config ├── Web.Release.config ├── webpack.dev.js ├── package.json ├── Properties │ └── AssemblyInfo.cs ├── packages.config ├── webpack.common.js ├── webpack.prod.js ├── Web.config ├── ApplicationInsights.config └── AspAndWebpack.csproj ├── README.md ├── AspAndWebpack.sln └── .gitignore /AspAndWebpack/src/index.ts: -------------------------------------------------------------------------------- 1 | import "./index.less"; 2 | import "bootstrap"; -------------------------------------------------------------------------------- /AspAndWebpack/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /AspAndWebpack/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonJam/aspnet_with_webpack/HEAD/AspAndWebpack/favicon.ico -------------------------------------------------------------------------------- /AspAndWebpack/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="AspAndWebpack.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /AspAndWebpack/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aspnet_with_webpack 2 | 3 | This project demonstrates how to use [webpack](https://webpack.js.org/) within an [ASP.NET MVC 5](https://docs.microsoft.com/en-us/aspnet/mvc/mvc5) project. 4 | 5 | See my [blog post](https://medium.com/@jonjam/combining-webpack-with-asp-net-mvc-5-a5bd07c49d0b) for more details. -------------------------------------------------------------------------------- /AspAndWebpack/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Error 6 | 7 | 8 |
9 |

Error.

10 |

An error occurred while processing your request.

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /AspAndWebpack/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace AspAndWebpack 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AspAndWebpack/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /AspAndWebpack/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Optimization; 7 | using System.Web.Routing; 8 | 9 | namespace AspAndWebpack 10 | { 11 | public class MvcApplication : System.Web.HttpApplication 12 | { 13 | protected void Application_Start() 14 | { 15 | AreaRegistration.RegisterAllAreas(); 16 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 17 | RouteConfig.RegisterRoutes(RouteTable.Routes); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AspAndWebpack/src/index.less: -------------------------------------------------------------------------------- 1 | @import "../node_modules/bootstrap/less/bootstrap.less"; 2 | 3 | body { 4 | padding-top: 50px; 5 | padding-bottom: 20px; 6 | } 7 | 8 | /* Set padding to keep content from hitting the edges */ 9 | .body-content { 10 | padding-left: 15px; 11 | padding-right: 15px; 12 | } 13 | 14 | /* Override the default bootstrap behavior where horizontal description lists 15 | will truncate terms that are too long to fit in the left column 16 | */ 17 | .dl-horizontal dt { 18 | white-space: normal; 19 | } 20 | 21 | /* Set width on the form input elements since they're 100% wide by default */ 22 | input, 23 | select, 24 | textarea { 25 | max-width: 280px; 26 | } 27 | -------------------------------------------------------------------------------- /AspAndWebpack/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace AspAndWebpack 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AspAndWebpack/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace AspAndWebpack.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public ActionResult About() 17 | { 18 | ViewBag.Message = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public ActionResult Contact() 24 | { 25 | ViewBag.Message = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /AspAndWebpack/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, // Includes: alwaysStrict, noImplicitAny, noImplicitThis, strictNullChecks 4 | "forceConsistentCasingInFileNames": true, 5 | "noFallthroughCasesInSwitch": true, 6 | "noImplicitReturns": true, 7 | "noUnusedLocals": true, 8 | "noUnusedParameters": true, 9 | "allowSyntheticDefaultImports": true, 10 | "noEmitOnError": true, 11 | "sourceMap": true, 12 | "removeComments": true, 13 | "skipLibCheck": true, 14 | "target": "es5", 15 | "module": "esnext", // Could be es6 but its in case we use Dynamic import() 16 | "moduleResolution": "Node", 17 | "typeRoots": [ 18 | "node_modules/@types" 19 | ], 20 | "lib": [ 21 | "dom", 22 | "es2015.promise", 23 | "es5" 24 | ] 25 | }, 26 | "exclude": [ 27 | "node_modules", 28 | "wwwroot", 29 | "obj", 30 | "bin" 31 | ] 32 | } -------------------------------------------------------------------------------- /AspAndWebpack.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26730.15 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspAndWebpack", "AspAndWebpack\AspAndWebpack.csproj", "{BFA9629B-B6EB-4B93-B629-3B20933EC39B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {BFA9629B-B6EB-4B93-B629-3B20933EC39B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {BFA9629B-B6EB-4B93-B629-3B20933EC39B}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {BFA9629B-B6EB-4B93-B629-3B20933EC39B}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {BFA9629B-B6EB-4B93-B629-3B20933EC39B}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {6034E561-0AD5-4887-AC9D-D5E5D7AFEE1A} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /AspAndWebpack/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /AspAndWebpack/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /AspAndWebpack/webpack.dev.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const webpack = require("webpack"); 3 | const Merge = require("webpack-merge"); 4 | const CommonConfig = require("./webpack.common.js"); 5 | 6 | module.exports = Merge(CommonConfig, { 7 | devtool: "inline-source-map", 8 | 9 | entry: path.resolve(__dirname, "src/index.ts"), 10 | 11 | output: { 12 | filename: "bundle.js", 13 | path: __dirname + "/dist", 14 | // Making sure the CSS and JS files that are split out do not break the template cshtml. 15 | publicPath: "/dist/", 16 | // Defining a global var that can used to call functions from within ASP.NET Razor pages. 17 | library: "aspAndWebpack", 18 | libraryTarget: "var" 19 | }, 20 | 21 | module: { 22 | loaders: [ 23 | // All css files will be handled here 24 | { 25 | test: /\.css$/, 26 | use: ["style-loader", "css-loader"] 27 | }, 28 | 29 | // All files with ".less" will be handled and transpiled to css 30 | { 31 | test: /\.less$/, 32 | use: ["style-loader", "css-loader", "less-loader"] 33 | } 34 | ] 35 | }, 36 | 37 | plugins: ([ 38 | new webpack.DefinePlugin({ 39 | "process.env": { 40 | "NODE_ENV": JSON.stringify("development") 41 | } 42 | }) 43 | ]), 44 | }) -------------------------------------------------------------------------------- /AspAndWebpack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aspandwebpack", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "dependencies": { 7 | "bootstrap": "^3.3.7", 8 | "jquery": "^3.2.1", 9 | "jquery-validation": "^1.17.0", 10 | "jquery-validation-unobtrusive": "^3.2.6" 11 | }, 12 | "devDependencies": { 13 | "@types/bootstrap": "^3.3.36", 14 | "@types/jquery": "^3.2.12", 15 | "@types/jquery-validation-unobtrusive": "^3.2.32", 16 | "@types/jquery.validation": "^1.16.3", 17 | "awesome-typescript-loader": "^3.2.3", 18 | "clean-webpack-plugin": "^0.1.16", 19 | "css-loader": "^0.28.7", 20 | "extract-text-webpack-plugin": "^3.0.0", 21 | "file-loader": "^0.11.2", 22 | "html-loader": "^0.5.1", 23 | "html-webpack-plugin": "^2.30.1", 24 | "less": "^2.7.2", 25 | "less-loader": "^4.0.5", 26 | "source-map-loader": "^0.2.1", 27 | "style-loader": "^0.18.2", 28 | "typescript": "^2.5.2", 29 | "webpack": "^3.6.0", 30 | "webpack-merge": "^4.1.0" 31 | }, 32 | "scripts": { 33 | "build:dev": "webpack --config webpack.dev.js", 34 | "build:dev-watch": "webpack --config webpack.dev.js --watch ./src", 35 | "build:prod": "webpack --config webpack.prod.js", 36 | "test": "echo \"Error: no test specified\" && exit 1" 37 | }, 38 | "author": "", 39 | "license": "ISC", 40 | "-vs-binding": { 41 | "BeforeBuild": [ 42 | "build:dev" 43 | ] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /AspAndWebpack/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AspAndWebpack")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AspAndWebpack")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("98303d19-2402-4a94-b06c-5ebcaa30a292")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /AspAndWebpack/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Home Page"; 3 | } 4 | 5 |
6 |

ASP.NET

7 |

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

8 |

Learn more »

9 |
10 | 11 |
12 |
13 |

Getting started

14 |

15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that 16 | enables a clean separation of concerns and gives you full control over markup 17 | for enjoyable, agile development. 18 |

19 |

Learn more »

20 |
21 |
22 |

Get more libraries

23 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

24 |

Learn more »

25 |
26 |
27 |

Web Hosting

28 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

29 |

Learn more »

30 |
31 |
-------------------------------------------------------------------------------- /AspAndWebpack/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /AspAndWebpack/Views/Shared/_Layout_Template.cshtml: -------------------------------------------------------------------------------- 1 | @* 2 | NOTE: _Layout.cshtml is generated by webpack. Please edit _Layout_Template.cshtml. 3 | *@ 4 | 5 | 6 | 7 | 8 | 9 | @ViewBag.Title - My ASP.NET Application 10 | 11 | 12 | 31 |
32 | @RenderBody() 33 |
34 | 37 |
38 | 39 | @* 40 | If you want to call a function from within the webpack bundle on a View, then this RenderSection needs to be moved 41 | here outside and after body. This is because webpack injects script/link tags at the end of the body, so this section 42 | needs to be here for the ordering to be right. 43 | *@ 44 | @RenderSection("scripts", required: false) 45 | 46 | -------------------------------------------------------------------------------- /AspAndWebpack/Views/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /AspAndWebpack/webpack.common.js: -------------------------------------------------------------------------------- 1 | const webpack = require("webpack"); 2 | const CleanWebpackPlugin = require("clean-webpack-plugin"); 3 | const HtmlWebpackPlugin = require("html-webpack-plugin"); 4 | 5 | module.exports = { 6 | target: "web", 7 | 8 | resolve: { 9 | // Add ".ts" and ".tsx" as resolvable extensions. 10 | extensions: [".ts", ".tsx", ".js", ".json", ".html"], 11 | }, 12 | 13 | module: { 14 | loaders: [ 15 | // All files with a ".ts" or ".tsx" extension will be handled by "awesome-typescript-loader". 16 | { test: /.ts$/, loader: "awesome-typescript-loader" }, 17 | 18 | // All image files will be handled here 19 | { 20 | test: /\.(png|svg|jpg|gif)$/, 21 | use: [ 22 | "file-loader" 23 | ] 24 | }, 25 | 26 | // All font files will be handled here 27 | { 28 | test: /\.(woff|woff2|eot|ttf|otf)$/, 29 | use: [ 30 | { 31 | loader: "file-loader" 32 | } 33 | ] 34 | }, 35 | 36 | // All files with ".html" will be handled 37 | { test: /\.html$/, loader: "html-loader" }, 38 | 39 | // All output ".js" files will have any sourcemaps re-processed by "source-map-loader". 40 | { enforce: "pre", test: /\.js$/, loader: "source-map-loader" } 41 | ] 42 | }, 43 | 44 | plugins: ([ 45 | // make sure we allow any jquery usages outside of our webpack modules 46 | new webpack.ProvidePlugin({ 47 | $: "jquery", 48 | jQuery: "jquery", 49 | "window.jQuery": "jquery" 50 | }), 51 | 52 | // Clean dist folder. 53 | new CleanWebpackPlugin(["./dist"], { 54 | "verbose": true // Write logs to console. 55 | }), 56 | 57 | // avoid publishing when compilation failed. 58 | new webpack.NoEmitOnErrorsPlugin(), 59 | 60 | new HtmlWebpackPlugin({ 61 | inject: "body", 62 | filename: "../Views/Shared/_Layout.cshtml", 63 | template: "./Views/Shared/_Layout_Template.cshtml" 64 | }) 65 | ]), 66 | 67 | // pretty terminal output 68 | stats: { colors: true } 69 | }; -------------------------------------------------------------------------------- /AspAndWebpack/webpack.prod.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const webpack = require("webpack"); 3 | const Merge = require("webpack-merge"); 4 | const CommonConfig = require("./webpack.common.js"); 5 | const ExtractTextPlugin = require("extract-text-webpack-plugin"); 6 | 7 | // Images, Fonts Loading: https://webpack.js.org/guides/asset-management/ 8 | // LESS Loading: https://webpack.js.org/loaders/less-loader/ 9 | // Code splitting: https://webpack.js.org/guides/code-splitting 10 | // Caching: https://webpack.js.org/guides/caching/ 11 | 12 | const extractLess = new ExtractTextPlugin({ 13 | filename: "[name].[contenthash].css" 14 | }); 15 | 16 | module.exports = Merge(CommonConfig, { 17 | devtool: "hidden-source-map", 18 | 19 | entry: { 20 | index: path.resolve(__dirname, 'src/index.ts'), 21 | vendor: [ 22 | "jquery", 23 | "jquery-validation", 24 | "bootstrap", 25 | "jquery-validation-unobtrusive" 26 | ] 27 | }, 28 | 29 | output: { 30 | filename: "[name].[chunkhash].js", 31 | path: __dirname + "/dist", 32 | // Making sure the CSS and JS files that are split out do not break the template cshtml. 33 | publicPath: "/dist/", 34 | // Defining a global var that can used to call functions from within ASP.NET Razor pages. 35 | library: "aspAndWebpack", 36 | libraryTarget: "var" 37 | }, 38 | 39 | module: { 40 | loaders: [ 41 | // All css files will be handled here 42 | { 43 | test: /\.css$/, 44 | use: extractLess.extract({ fallback: "style-loader", use: ["css-loader"] }) 45 | }, 46 | 47 | // All files with ".less" will be handled and transpiled to css 48 | { 49 | test: /\.less$/, 50 | use: extractLess.extract({ 51 | use: [{ 52 | loader: "css-loader", options: { 53 | sourceMap: true 54 | } 55 | }, { 56 | loader: "less-loader", options: { 57 | sourceMap: true 58 | } 59 | }] 60 | }) 61 | }, 62 | ] 63 | }, 64 | 65 | plugins: [ 66 | new webpack.DefinePlugin({ 67 | "process.env": { 68 | "NODE_ENV": JSON.stringify("production") 69 | } 70 | }), 71 | 72 | // Split out library into seperate bundle and remove from app bundle. 73 | new webpack.HashedModuleIdsPlugin(), 74 | new webpack.optimize.CommonsChunkPlugin({ 75 | name: "vendor" 76 | }), 77 | 78 | // Webpack boilerplate and manifest in seperate file. 79 | new webpack.optimize.CommonsChunkPlugin({ 80 | name: "runtime" 81 | }), 82 | 83 | // Write out CSS bundle to its own file: 84 | extractLess, 85 | 86 | new webpack.LoaderOptionsPlugin({ 87 | minimize: true, 88 | debug: false 89 | }), 90 | 91 | new webpack.optimize.UglifyJsPlugin({ 92 | beautify: false, 93 | mangle: { 94 | screw_ie8: true, 95 | keep_fnames: true 96 | }, 97 | compress: { 98 | screw_ie8: true 99 | }, 100 | comments: false 101 | }) 102 | ] 103 | }) -------------------------------------------------------------------------------- /AspAndWebpack/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # .NET Core 46 | project.lock.json 47 | project.fragment.lock.json 48 | artifacts/ 49 | **/Properties/launchSettings.json 50 | 51 | *_i.c 52 | *_p.c 53 | *_i.h 54 | *.ilk 55 | *.meta 56 | *.obj 57 | *.pch 58 | *.pdb 59 | *.pgc 60 | *.pgd 61 | *.rsp 62 | *.sbr 63 | *.tlb 64 | *.tli 65 | *.tlh 66 | *.tmp 67 | *.tmp_proj 68 | *.log 69 | *.vspscc 70 | *.vssscc 71 | .builds 72 | *.pidb 73 | *.svclog 74 | *.scc 75 | 76 | # Chutzpah Test files 77 | _Chutzpah* 78 | 79 | # Visual C++ cache files 80 | ipch/ 81 | *.aps 82 | *.ncb 83 | *.opendb 84 | *.opensdf 85 | *.sdf 86 | *.cachefile 87 | *.VC.db 88 | *.VC.VC.opendb 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | *.vspx 94 | *.sap 95 | 96 | # TFS 2012 Local Workspace 97 | $tf/ 98 | 99 | # Guidance Automation Toolkit 100 | *.gpState 101 | 102 | # ReSharper is a .NET coding add-in 103 | _ReSharper*/ 104 | *.[Rr]e[Ss]harper 105 | *.DotSettings.user 106 | 107 | # JustCode is a .NET coding add-in 108 | .JustCode 109 | 110 | # TeamCity is a build add-in 111 | _TeamCity* 112 | 113 | # DotCover is a Code Coverage Tool 114 | *.dotCover 115 | 116 | # Visual Studio code coverage results 117 | *.coverage 118 | *.coveragexml 119 | 120 | # NCrunch 121 | _NCrunch_* 122 | .*crunch*.local.xml 123 | nCrunchTemp_* 124 | 125 | # MightyMoose 126 | *.mm.* 127 | AutoTest.Net/ 128 | 129 | # Web workbench (sass) 130 | .sass-cache/ 131 | 132 | # Installshield output folder 133 | [Ee]xpress/ 134 | 135 | # DocProject is a documentation generator add-in 136 | DocProject/buildhelp/ 137 | DocProject/Help/*.HxT 138 | DocProject/Help/*.HxC 139 | DocProject/Help/*.hhc 140 | DocProject/Help/*.hhk 141 | DocProject/Help/*.hhp 142 | DocProject/Help/Html2 143 | DocProject/Help/html 144 | 145 | # Click-Once directory 146 | publish/ 147 | 148 | # Publish Web Output 149 | *.[Pp]ublish.xml 150 | *.azurePubxml 151 | # TODO: Comment the next line if you want to checkin your web deploy settings 152 | # but database connection strings (with potential passwords) will be unencrypted 153 | *.pubxml 154 | *.publishproj 155 | 156 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 157 | # checkin your Azure Web App publish settings, but sensitive information contained 158 | # in these scripts will be unencrypted 159 | PublishScripts/ 160 | 161 | # NuGet Packages 162 | *.nupkg 163 | # The packages folder can be ignored because of Package Restore 164 | **/packages/* 165 | # except build/, which is used as an MSBuild target. 166 | !**/packages/build/ 167 | # Uncomment if necessary however generally it will be regenerated when needed 168 | #!**/packages/repositories.config 169 | # NuGet v3's project.json files produces more ignorable files 170 | *.nuget.props 171 | *.nuget.targets 172 | 173 | # Microsoft Azure Build Output 174 | csx/ 175 | *.build.csdef 176 | 177 | # Microsoft Azure Emulator 178 | ecf/ 179 | rcf/ 180 | 181 | # Windows Store app package directories and files 182 | AppPackages/ 183 | BundleArtifacts/ 184 | Package.StoreAssociation.xml 185 | _pkginfo.txt 186 | 187 | # Visual Studio cache files 188 | # files ending in .cache can be ignored 189 | *.[Cc]ache 190 | # but keep track of directories ending in .cache 191 | !*.[Cc]ache/ 192 | 193 | # Others 194 | ClientBin/ 195 | ~$* 196 | *~ 197 | *.dbmdl 198 | *.dbproj.schemaview 199 | *.jfm 200 | *.pfx 201 | *.publishsettings 202 | orleans.codegen.cs 203 | 204 | # Since there are multiple workflows, uncomment next line to ignore bower_components 205 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 206 | #bower_components/ 207 | 208 | # RIA/Silverlight projects 209 | Generated_Code/ 210 | 211 | # Backup & report files from converting an old project file 212 | # to a newer Visual Studio version. Backup files are not needed, 213 | # because we have git ;-) 214 | _UpgradeReport_Files/ 215 | Backup*/ 216 | UpgradeLog*.XML 217 | UpgradeLog*.htm 218 | 219 | # SQL Server files 220 | *.mdf 221 | *.ldf 222 | *.ndf 223 | 224 | # Business Intelligence projects 225 | *.rdl.data 226 | *.bim.layout 227 | *.bim_*.settings 228 | 229 | # Microsoft Fakes 230 | FakesAssemblies/ 231 | 232 | # GhostDoc plugin setting file 233 | *.GhostDoc.xml 234 | 235 | # Node.js Tools for Visual Studio 236 | .ntvs_analysis.dat 237 | node_modules/ 238 | 239 | # Typescript v1 declaration files 240 | typings/ 241 | 242 | # Visual Studio 6 build log 243 | *.plg 244 | 245 | # Visual Studio 6 workspace options file 246 | *.opt 247 | 248 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 249 | *.vbw 250 | 251 | # Visual Studio LightSwitch build output 252 | **/*.HTMLClient/GeneratedArtifacts 253 | **/*.DesktopClient/GeneratedArtifacts 254 | **/*.DesktopClient/ModelManifest.xml 255 | **/*.Server/GeneratedArtifacts 256 | **/*.Server/ModelManifest.xml 257 | _Pvt_Extensions 258 | 259 | # Paket dependency manager 260 | .paket/paket.exe 261 | paket-files/ 262 | 263 | # FAKE - F# Make 264 | .fake/ 265 | 266 | # JetBrains Rider 267 | .idea/ 268 | *.sln.iml 269 | 270 | # CodeRush 271 | .cr/ 272 | 273 | # Python Tools for Visual Studio (PTVS) 274 | __pycache__/ 275 | *.pyc 276 | 277 | # Cake - Uncomment if you are using it 278 | # tools/** 279 | # !tools/packages.config 280 | 281 | # Telerik's JustMock configuration file 282 | *.jmconfig 283 | 284 | # BizTalk build output 285 | *.btp.cs 286 | *.btm.cs 287 | *.odx.cs 288 | *.xsd.cs 289 | 290 | # Project specific ignores 291 | **/dist 292 | **/src/**/*.js 293 | **/src/**/*.js.map 294 | _Layout.cshtml -------------------------------------------------------------------------------- /AspAndWebpack/ApplicationInsights.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | search|spider|crawl|Bot|Monitor|AlwaysOn 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 31 | core.windows.net 32 | core.chinacloudapi.cn 33 | core.cloudapi.de 34 | core.usgovcloudapi.net 35 | localhost 36 | 127.0.0.1 37 | 38 | 39 | 40 | 57 | 58 | 59 | 60 | 61 | 62 | 64 | 65 | 66 | 67 | 72 | System.Web.Handlers.TransferRequestHandler 73 | Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler 74 | System.Web.StaticFileHandler 75 | System.Web.Handlers.AssemblyResourceLoader 76 | System.Web.Optimization.BundleHandler 77 | System.Web.Script.Services.ScriptHandlerFactory 78 | System.Web.Handlers.TraceHandler 79 | System.Web.Services.Discovery.DiscoveryRequestHandler 80 | System.Web.HttpDebugHandler 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 5 91 | Event 92 | 93 | 94 | 5 95 | Event 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /AspAndWebpack/AspAndWebpack.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Debug 9 | AnyCPU 10 | 11 | 12 | 2.0 13 | {BFA9629B-B6EB-4B93-B629-3B20933EC39B} 14 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} 15 | Library 16 | Properties 17 | AspAndWebpack 18 | AspAndWebpack 19 | v4.6.1 20 | false 21 | true 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 2.4 31 | true 32 | 33 | 34 | true 35 | full 36 | false 37 | bin\ 38 | DEBUG;TRACE 39 | prompt 40 | 4 41 | 42 | 43 | true 44 | pdbonly 45 | true 46 | bin\ 47 | TRACE 48 | prompt 49 | 4 50 | 51 | 52 | 53 | ..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll 54 | 55 | 56 | ..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.4.0\lib\net45\Microsoft.AI.Agent.Intercept.dll 57 | 58 | 59 | ..\packages\Microsoft.ApplicationInsights.DependencyCollector.2.4.1\lib\net45\Microsoft.AI.DependencyCollector.dll 60 | 61 | 62 | ..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.2.4.1\lib\net45\Microsoft.AI.PerfCounterCollector.dll 63 | 64 | 65 | ..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.4.0\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll 66 | 67 | 68 | ..\packages\Microsoft.ApplicationInsights.Web.2.4.1\lib\net45\Microsoft.AI.Web.dll 69 | 70 | 71 | ..\packages\Microsoft.ApplicationInsights.WindowsServer.2.4.1\lib\net45\Microsoft.AI.WindowsServer.dll 72 | 73 | 74 | ..\packages\Microsoft.ApplicationInsights.2.4.0\lib\net46\Microsoft.ApplicationInsights.dll 75 | 76 | 77 | ..\packages\Microsoft.AspNet.TelemetryCorrelation.1.0.0\lib\net45\Microsoft.AspNet.TelemetryCorrelation.dll 78 | 79 | 80 | ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll 81 | 82 | 83 | 84 | ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll 85 | 86 | 87 | 88 | 89 | ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | True 109 | ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll 110 | 111 | 112 | 113 | 114 | 115 | 116 | True 117 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll 118 | 119 | 120 | True 121 | ..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll 122 | 123 | 124 | ..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll 125 | 126 | 127 | True 128 | ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll 129 | 130 | 131 | True 132 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll 133 | 134 | 135 | True 136 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll 137 | 138 | 139 | True 140 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll 141 | 142 | 143 | ..\packages\WebGrease.1.6.0\lib\WebGrease.dll 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | Global.asax 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | PreserveNewest 164 | 165 | 166 | 167 | Web.config 168 | 169 | 170 | Web.config 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 10.0 197 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | True 211 | True 212 | 23043 213 | / 214 | http://localhost:23043/ 215 | False 216 | False 217 | 218 | 219 | False 220 | 221 | 222 | 223 | 224 | 225 | 226 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 227 | 228 | 229 | 230 | 231 | 237 | --------------------------------------------------------------------------------