Several pits encountered in writing ASP. NET 5 Applications using Visual Studio 2015

Source: Internet
Author: User
Tags ssl certificate

From ASP. 5 Beta 61 to now the ASP. NET RC1, all the way down, hit a lot of pits. The following are recorded in succession.

One, release

1, the server side and the client should install Web deploy, the version is currently 3.6;

2, server side should install Httpplatformhandler, version is currently 1.2, version 1.0 does not work;

3, server-side open Web Management service;

4, the server-side directory structure should be as follows:

    • SiteName
      • AppRoot
      • Logs
      • Wwwroot

Then, in IIS, point the Site directory to wwwroot. Do not arrange the directory as such, may make static files, such as js,css, pictures, etc. can not be accessed. Of course, you can adjust in some configuration files, temporarily not table.

5,SSL certificate issues, because Web Depoly uses HTTPS links, if you do not use a publicly valid certificate, in Visual Studio 2015 publishing ASP. NET 5, it will not be allowed. The future version of how to temporarily unknown.

Workaround: A, for a valid certificate; b, under your project, find the Publish file default Settings.pubxml, add <allowuntrustedcertificate>true</ Allowuntrustedcertificate>,

Then, modify the version number in the default SETTINGS-PUBLISH.PS1 to the latest version, $publishModuleVersion = ' 1.0.2-beta2 ', please go to github.com/ View under ASPNET vsweb-publish.

6, when you start Visual Studio 2015 publishing, instead of manually publishing using Dnu publish, you sometimes receive a "file name or directory path that is too long, more than 260" error, and is displayed in garbled characters.

Workaround: A, not found in the configuration file changes, so, the use of manual Dnu publish, set a shorter directory, and then manually webdeploy.exe release; b, delete the user-defined variable under environment variable TEMP and TMP, if it's too long, Then your project name is really long.

Second, NPM

1,visual Studio 2015 uses node NPM to manage node packages, and automatically uses NPM to obtain dependency packages, such as Gulp, for the first time, or when the project is first acquired from the source code.

But the domestic network is too bad, sometimes inexplicable terminal, resulting in the release or compile, unable to execute Project.json in the Prepublish command, at this time, close the solution, delete the node_modules under the directory, reopen the solution, waiting for a full download, or hang a VPN.

Several pits encountered in writing ASP. NET 5 Applications using Visual Studio 2015

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.