i created a new ASP.NET Core 2.1 Web Application using the Angular Template.
Ran locally in both Debug and Release mode with success.
Created a publish profile to file system, it published successfully to a local folder.
installed: .NET Core 2.1 Runtime & Hosting Bundle for Windows
Then in IIS,
- Created a new Application pool- that uses
.net CLR
= "No Managed Code" - Then under
Default Web Site
> created new application that uses the new application pool that i have created, and point to the file-system, to the published directory that published with the help of VS 2017
when i Browse
to the appliction, this message appear in the browser
So in web.config
file i changed, environmentVariable
to Development in order to see the error
<aspNetCore processPath="dotnet" arguments=".\WebApplication1.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>
I have no clue on what to do next, i have already tried to search for solutions for that, on Stack-overflow and Google here, here and a lot more.
when i am setting stdoutLogEnabled
to true
in web.config
, then i see this in the logs of the application
Hosting environment: Production Content root path: C:\prodSites\beedeal Now listening on: http://127.0.0.1:26261 Application started. Press Ctrl+C to shut down. warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware3 Failed to determine the https port for redirect. fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware1 An unhandled exception has occurred while executing the request. System.InvalidOperationException: The SPA default page middleware could not return the default page '/index.html' because it was not found, and no other middleware handled the request. Your application is running in Production mode, so make sure it has been published, or that you have built your SPA manually. Alternatively you may wish to switch to the Development environment.
at Microsoft.AspNetCore.SpaServices.SpaDefaultPageMiddleware.<>c__DisplayClass0_0.b__1(HttpContext context, Func`1 next) at Microsoft.AspNetCore.Builder.UseExtensions.<>c__DisplayClass0_1.b__1(HttpContext context) at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
but didn't find a solution for that..