Base solution for your next web application
Open Closed

IIS publish Errors #11784


User avatar
0
muhittincelik created

I am developing on 12.0.1 Angular & Core

I can run application and angular site on my local PC.

I published to IIS Server and i got the following errors.

I am using 9901 port for core application and 4200 for angular application.

I got Error 404 when go to localhost:9901. Bun i can go localhost:9901/swagger.

stdout log is;

WARN 2023-11-27 11:17:35,035 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'AnnualPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:35,044 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'DailyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:35,045 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'MonthlyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:35,045 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'WeeklyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:35,045 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'Amount' on entity type 'SubscriptionPayment'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:36,965 [1 ] tion.Repositories.EphemeralXmlRepository - Using an in-memory repository. Keys will not be persisted to storage. WARN 2023-11-27 11:17:36,965 [1 ] taProtection.KeyManagement.XmlKeyManager - Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits. WARN 2023-11-27 11:17:37,383 [1 ] taProtection.KeyManagement.XmlKeyManager - No XML encryptor configured. Key {36746b23-1004-4ed3-870a-554d23941ef1} may be persisted to storage in unencrypted form. Hosting environment: Production Content root path: D:\WebSites\SmartInventory_12.0.0\CoreWebSite Now listening on: http://*:9901/ Application started. Press Ctrl+C to shut down. ERROR 2023-11-27 11:17:41,789 [10 ] HostedService.HealthCheckReportCollector - GetHealthReport threw an exception when trying to get report from https://localhost:44301/health configured with name Smart.Web.Host. System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:44301) ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 122


1 Answer(s)
  • User Avatar
    0
    muhittincelik created

    I found the problem.

    I add the following line to app.settings.production file

    "HomePageUrl": "",

    HomeController.cs is checking environment is dev or prod. Local pc is dev so core app is running. But on server dont redirect to /Ui/login page.