Reputation: 3856
I'm trying to publish the template project "ASP.NET Core Web Application (.NET Framework)" from Visual Studio 2015 to IIS.
I use the Visual Studio publish to File System feature.
I'm using Windows 10.
I followed the guide from here.
I get this error:
I added a logs folder, but no logs get created.
Any ideas on how I can solve this?
EDIT:
Output of running the .exe from powershell:
PS C:\TestCoreWebsite> .\Web_CoreWebNetFramework.exe Hosting environment: Production Content root path: C:\TestCoreWebsite Now listening on: http://localhost:5000 Application started. Press Ctrl+C to shut down.
Then I navigate to http://localhost:5000 and the sample site works.
Upvotes: 3
Views: 2050
Reputation: 1509
For whoever faces the same issue as mine(running well in VS but got above issue when deploying into Local IIS), I missed Setting Environment Variable and It works after I added the Setting Environment Variable
Ref: How to add Setting Environment Variable in IIS
Upvotes: 0
Reputation: 751
With VisualStudio 2017, open up the .csproj file and add to the first block:
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
Usually the result will be:
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>
Upvotes: 0
Reputation: 553
I ran the following command in cmd
C:\fullpath\dotnet C:\fullpath\PROJECT.dll
on the command prompt, which gave me a much more meaningful error:
"The specified framework 'Microsoft.NETCore.App', version '1.0.1' was not found. - Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\shared\Microsoft.NETCore.App - The following versions are installed: 1.0.0 - Alternatively, install the framework version '1.0.1'.
I Installed the correct net core and the project worked correctly
Upvotes: 2
Reputation: 3856
Found the solution:
In the root web.config change:
processPath="%LAUNCHER_PATH%"
to:
processPath=".\Web_CoreWebNetFramework.exe"
Upvotes: 2