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:
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