Monday, July 22, 2019
Technology has moved at a breakneck speed, after working with ASP.NET Core for a while, I realized that my ASP.NET MVC blog articles have become outdated. Don't get me wrong, MVC is still a very big part of ASP.NET Core, but that's the thing it's just a part of it. ASP.NET Core has decoupled the infrastructure from the application. You can deploy your web app on Docker imagine that! No longer is IIS your primary means of hosting your ASP.NET application.
However, with this new freedom comes added complexity. No longer can you just drag and drop components into your design surface. Those days are long gone. This post ist meant to ease your way into ASP.NET Core. I will using the release candidate version two of ASP.NET Core for this post and other subsequent posts. I found out that I can't really follow my blog posts anymore to create the project with the latest version which is 2.1. Don't use 2.2 for now because there's still not a lot of documentation on it. So here is the updated version I will be using Visual Studio 2017 for my development. You can use the command line interface and notepad to develop your ASP.NET Core application. But, I think that borders on insanity.
So let's begin our journey together!
Here are the steps to create an ASP.NET Core application from scratch:
1. Create an empty Visual Studio solution File → New → Project v Other Project Types → Visual Studio Solutions → Blank Solution. In the name field call the solution "NorthwindCafe" then press "OK"
2. Now that we have the blank solution we can add the ASP.NET Core project, right click on the "NorthwindCafe" solution, then select "Add" → New Project → Visual C# → ASP.NET Core Web Application . In the "Name" field give it the name "NorthwindCafe.Web" then click "OK"
3. On the "Select a template" screen select "Empty", leave the drop down to .NET Core, and ASP.NET Core 2.1, also uncheck the "Configure for HTTPS", then click "OK". Make sure you select ASP.NET Core 2.1 because there's still some issues with ASP.NET Core 2.2
4. After you click "OK" you will see the following folder structure for your project. As you can see it's very bare bones to start with. The first thing you will notice is that there is a "wwwroot" folder this is where you will server up your static files.
5. Although it's just a string output if you look at the Startup.cs file
However, with this new freedom comes added complexity. No longer can you just drag and drop components into your design surface. Those days are long gone. This post ist meant to ease your way into ASP.NET Core. I will using the release candidate version two of ASP.NET Core for this post and other subsequent posts. I found out that I can't really follow my blog posts anymore to create the project with the latest version which is 2.1. Don't use 2.2 for now because there's still not a lot of documentation on it. So here is the updated version I will be using Visual Studio 2017 for my development. You can use the command line interface and notepad to develop your ASP.NET Core application. But, I think that borders on insanity.
So let's begin our journey together!
Here are the steps to create an ASP.NET Core application from scratch:
1. Create an empty Visual Studio solution File → New → Project v Other Project Types → Visual Studio Solutions → Blank Solution. In the name field call the solution "NorthwindCafe" then press "OK"
2. Now that we have the blank solution we can add the ASP.NET Core project, right click on the "NorthwindCafe" solution, then select "Add" → New Project → Visual C# → ASP.NET Core Web Application . In the "Name" field give it the name "NorthwindCafe.Web" then click "OK"
3. On the "Select a template" screen select "Empty", leave the drop down to .NET Core, and ASP.NET Core 2.1, also uncheck the "Configure for HTTPS", then click "OK". Make sure you select ASP.NET Core 2.1 because there's still some issues with ASP.NET Core 2.2
4. After you click "OK" you will see the following folder structure for your project. As you can see it's very bare bones to start with. The first thing you will notice is that there is a "wwwroot" folder this is where you will server up your static files.
If you press Ctrl+F5 to run the application you will see "Hello World"
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.Run(async (context) => { await context.Response.WriteAsync("Hello World!"); }); }
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
Mua vé tại Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ giá rẻ
giá vé từ mỹ về việt nam
chuyến bay thương mại từ canada về việt nam
mở chuyến bay từ nhật về việt nam
giá vé máy bay từ hàn quốc về việt nam
Vé máy bay từ Đài Loan về VN
chuyến bay chuyên gia trung quốc