Changing kestrel's port from localhost:5000 to azure server?

-3

Currently when I deploy my app to azure then I will get below error

System.AggregateException: One or more errors occurred. --->
    System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
  at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.NativeMethods.uv_loop_size()
  at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.loop_size()
  at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvLoopHandle.Init(Libuv uv)
  at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelThread.ThreadStart(Object parameter)
--- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
  at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
  at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelEngine.Start(Int32 count)
  at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[TContext](IHttpApplication`1 application)
  at Microsoft.AspNetCore.Hosting.Internal.WebHost.Start()
  at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host, CancellationToken token, String shutdownMessage)
  at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
  at MocaApp.MocaRemoteWebSocket.ProgramMain.Main() in C:\\Users\\chirag.dodiya\\source\\repos\\MoCA\\moca_backend\\MocaApp\\MocaApp\\MocaRemoteWebSocket\\ProgramMain.cs:line 27
--->
    (Inner Exception #0) System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
  at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.NativeMethods.uv_loop_size()
  at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.loop_size()
  at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvLoopHandle.Init(Libuv uv)
  at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelThread.ThreadStart(Object parameter)<---"

I am using the following:

var host = new WebHostBuilder()
  .UseKestrel()
  .UseUrls("azure_server_url")                                           
  .UseContentRoot(Directory.GetCurrentDirectory())
  .UseIISIntegration()
  .UseStartup<Startup>()
  //.UseConfiguration(configuration)
  .Build();

host.Run();
c#
azure
websocket
kestrel
asked on Stack Overflow Jun 24, 2020 by chirag dodiya • edited Jun 25, 2020 by Luke Stevenson

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0