Windows Server R2 Standard to build asp.net core environment graphics and text Tutorial _ Practical skills

Source: Internet
Author: User
Tags dotnet net core windows server hosting server hosting

Objective:

With the release of ASP.net Core 1.0, the relevant articles in the Forum are also more and more, just have time in the test environment to build asp.net Core release environment, the process encountered problems to write to everyone, so that useful friends need.

Environment:

Windows Server R2 Standard with Update

MSDN Links:ed2k://|file|cn_windows_server_2012_r2_with_update_x64_dvd_6052725.iso|5545705472| 121ec13b53882e501c1438237e70810d|/

IIS 8.5

Open Server Manager and click Add Roles and Features.

 

Select a role-based or functionally based installation.

 

Select the server. Select webserver (IIS)

 

Select a role.

 

Open the Web server (IIS) option. Select Common HTTP Features.

 

Check the security options for the Common security option.

Application development options, make sure that the. NET 3.5,.net 4.5,isapi extension is selected.

 

Start the installation.

At the end of the IIS 8.5 installation, open http://localhost to view

asp.net core environment:

It's not so fine. The jars are installed first.

New version: Sdkdotnetcore.1.0.0-sdk.preview2-x64.exe

After installation, enter dotnet in CMD to see if the installation is successful

And then install Nodejs and NPM and Bower and gulp. There's a problem.

Nodejs version: node-v4.4.7-x64 Double-click Install always next

Install Bower and Gulp with NPM when Setup is complete

Command: npm install bower-g

Command: npm install gulp-g

Compile the project and publish:

Go to the console and switch to the project directory to run

dotnet Restore "D:\WorkSpace\trunk\src\XXXX. Web "This command restores the dependency pack

dotnet Build "D:\WorkSpace\trunk\src\XXX. Web "This command compiles the project

dotnet publish-o D:\Publish This command is published to the D:\Publish folder

At this point some friends may find that the last command failed, the reason for the error: no executable found matching command "Bower" is not installed Bower

But before it was clearly installed bower what's going on? No hurry, open the console input bower check it out.

found that the installation was successful, I found and had this problem on my own computer WIN10 and WIN7

To check environment variables found that NPM's location on the server does not point to the installation directory but to the C-Disk user folder app data, and then Dotnet Core is based on the environment variable to find bower.

Workaround Copy the bower under the installation directory to the environment variable directory

Continue to execute just the Publish command successfully.

IIS Publishing:

Add a site or something too simple to say, the application pool chooses no code-managed Integration:

  

Then run and find an error.

The error message also said very not understand, had to go to the net to view the relevant instructions published https://docs.asp.net/en/latest/publishing/iis.html

Found not to be fitted Install the. NET Core Windows Server Hosting Bundle

Download installed to open the site again to normal operation, at this point in the Windows Server R2 Standard deployment asp.net core program is over.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.