Я даю IIS каждую функцию в Windows, но если у вас есть совет, пожалуйста, поделитесь мной. В любом случае я хочу развернуть на сервере IIS LAN, но я не могу. Я не знаю, как это исправить. Я использую ".net.5.0".
Мои приложения как это: < /p>
program.csобразноpublic class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration().UseUrls("http://localhost:8080/")
.UseStartup()
.Build();
}
}
< /code>
Startup < /p>
namespace EcommerceGastro.API
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext();
services.AddScoped();
services.AddScoped();
services.AddScoped();
services.AddScoped();
services.AddAutoMapper(typeof(AutoMapperProfile));
services.AddControllers();
services.AddControllers().AddNewtonsoftJson(opt =>
{
opt.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseStaticFiles();
//Initiliazer.HomePageControl().Wait();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}
< /code>
Appsettings.json
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"ConnectionStrings": { "DefaultConnection": "server=.; database=GastroDB; user id=sa; password=123;" }
}
< /code>
Мои настройки публикации:
< /p>
Настройки IIS:
Моя ошибка:
Application '/LM/W3SVC/1/ROOT' with physical root 'C:\Users\Tuğçe\Desktop\iisDeneme\EcommerceGastro.API\bin\Release\net5.0\publish\' failed to load coreclr. Exception message:
CLR worker thread exited prematurely
< /code>
Application '/LM/W3SVC/1/ROOT' with physical root 'C:\Users\Tuğçe\Desktop\iisDeneme\EcommerceGastro.API\bin\Release\net5.0\publish\' has exited from Program.Main with exit code = '0'. Please check the stderr logs for more information.
< /code>
And i browse this iis web app its open but look like :
HTTP Error 500.30 - ASP.NET Core app failed to start
Common solutions to this issue:
The app failed to start
The app started but then stopped
The app started but threw an exception during startup
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028265
Подробнее здесь: https://stackoverflow.com/questions/673 ... d-exited-p
ASP .NET CORE IIS развертывает ошибку модуля IIS ASPNECOR ⇐ C#
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
В ASP.NET на .NET 4.8 буферизуется ли StreamContent с помощью ASP.NET или IIS?
Anonymous » » в форуме C# - 0 Ответы
- 44 Просмотры
-
Последнее сообщение Anonymous
-
-
-
В ASP.NET на .NET 4.8 буферизуется ли StreamContent с помощью ASP.NET или IIS?
Anonymous » » в форуме C# - 0 Ответы
- 42 Просмотры
-
Последнее сообщение Anonymous
-