'm trying to set IIS server to work with ASP .NET core 1.1
Problem is when I publish application to the server, application is not working. I have follow next example for setup: Example
In event viewer is showing next error:
Also if I trie through cmd to run command: dotnet run nameofapp.dll
I'm getting message Could not find a project to run. Ensure a project exist in C:\inetpub\wwwroot\rnd/ Or pass the path to the project using --project
Program.cs public class Program { public static void Main(string[] args) { var host = new WebHostBuilder() .UseKestrel() .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup<Startup>() .Build(); host.Run(); } }
.csproj file
<ProjectToolsVersion="15.0"Sdk="Microsoft.NET.Sdk.Web"><PropertyGroup><TargetFramework>netcoreapp1.1</TargetFramework><TypeScriptCompileBlocked>true</TypeScriptCompileBlocked><IsPackable>false</IsPackable><IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled></PropertyGroup><ItemGroup><PackageReferenceInclude="Microsoft.AspNetCore.Server.IISIntegration"Version="1.1.2"/><PackageReferenceInclude="AutoMapper"Version="6.1.1"/><PackageReferenceInclude="Microsoft.AspNetCore"Version="1.1.0"/><PackageReferenceInclude="Microsoft.AspNetCore.Mvc"Version="1.1.1"/><PackageReferenceInclude="Microsoft.AspNetCore.SpaServices"Version="1.1.1"/><PackageReferenceInclude="Microsoft.AspNetCore.StaticFiles"Version="1.1.0"/><PackageReferenceInclude="Microsoft.AspNetCore.Identity.EntityFrameworkCore"Version="1.1.2"/><PackageReferenceInclude="Microsoft.Extensions.Logging.Debug"Version="1.1.0"/><PackageReferenceInclude="Microsoft.EntityFrameworkCore"Version="1.1.2"/><PackageReferenceInclude="Microsoft.EntityFrameworkCore.Tools"Version="1.1.1"/><PackageReferenceInclude="Microsoft.EntityFrameworkCore.SqlServer"Version="1.1.2"/><PackageReferenceInclude="Microsoft.Extensions.Configuration.Json"Version="1.1.2"/><PackageReferenceInclude="Microsoft.Extensions.Configuration.EnvironmentVariables"Version="1.1.2"/></ItemGroup><ItemGroup><!--Files not to show in IDE --><NoneRemove="yarn.lock"/><!--Files not to publish (note that the 'dist' subfolders are re-added below)--><ContentRemove="ClientApp\**"/></ItemGroup><TargetName="RunWebpack"AfterTargets="ComputeFilesToPublish"><!--As part of publishing, ensure the JS resources are freshly built in production mode --><ExecCommand="npm install"/><ExecCommand="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod"/><ExecCommand="node node_modules/webpack/bin/webpack.js --env.prod"/><!--Include the newly-built files in the publish output --><ItemGroup><DistFilesInclude="wwwroot\dist\**; ClientApp\dist\**"/><ResolvedFileToPublishInclude="@(DistFiles->'%(FullPath)')"Exclude="@(ResolvedFileToPublish)"><RelativePath>%(DistFiles.Identity)</RelativePath><CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory></ResolvedFileToPublish></ItemGroup></Target></Project> webconfig.cs<?xml version="1.0" encoding="utf-8"?><configuration><!--Configure your application settings in appsettings.json.Learn more at https://go.microsoft.com/fwlink/?LinkId=786380--><system.webServer><handlers><add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/></handlers><aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/></system.webServer></configuration>
I manage to save the log file. In Log file it is written next:
Ensure that Node.js is installed and can be found in one of the PATH directories.
I have install node on server and everything, what I missed ?