Lỗi resource load error please restart avatar star năm 2024

There may be a few reasons behind the error which you can only identify by debugging. You can try to debug this error using the steps below:

  1. Navigate to the root directory of the application using CMD
  2. Run the application using the command

    dotnet ServerApp.dll

    0

If there are any errors, they should appear in the output.

Alternatively, you can check "Event Viewer" (search Event Viewer using Windows search) and navigate to

  • Windows Logs
    • Application

Update:

dotnet (yourApplicationName).dll

and check http://localhost:5000/ for error

Lỗi resource load error please restart avatar star năm 2024

biberman

5,6924 gold badges11 silver badges35 bronze badges

answered Apr 22, 2021 at 11:28

Lỗi resource load error please restart avatar star năm 2024

Go there, and try to manually start your project... i.e.

dotnet ServerApp.dll

Lỗi resource load error please restart avatar star năm 2024

answered Feb 2, 2022 at 14:42

130nk3r5130nk3r5

1,24811 silver badges12 bronze badges

5

open Windows Event Viewer, find the error message and click it, open the Detail tab, you will see the exception.

answered Nov 8, 2021 at 8:29

Lỗi resource load error please restart avatar star năm 2024

Harrison WuHarrison Wu

3862 silver badges6 bronze badges

1

I recently encountered this issue deploying my .net core 5 app to IIS. I am using environment variables for my various envrionments and the web.config that was deployed was missing the xml tags.

Changing this line:


to:


   
        
   

This fixed my 500.30 issue.

I took guidance from @Mohammed https://stackoverflow.com/a/59390437/6155498

answered Sep 23, 2021 at 9:41

PaulGrantPaulGrant

3763 silver badges9 bronze badges

I had this error running the application on local IIS in windows 10, then I gave full control permission to IIS_IUSRS for App_Data and Logs folders so it worked.

Lỗi resource load error please restart avatar star năm 2024

answered Nov 14, 2021 at 20:00

Lỗi resource load error please restart avatar star năm 2024

I solved this issue by taking the following steps:

  1. Go to "Windows search"
  2. search "Event viewer" and open the application
  3. Search under the folder "Windows Logs" > "Application"
  4. Check the "Error" level warnings

This should identify your error, you should now take steps to take the appropriate actions. In my case, I had the error of "System.IO.DirectoryNotFoundException".

This error arose due to my application not having the rights to access an external sever.

I went back to my "Application Pool" settings, changed my "application pool Identity" to a user which did have access rights to the server, restarted my application and viola!

All works well.

This is my experience of this error. As said in an earlier post, this error has many remedies depending on the underlying issue

answered Mar 15, 2023 at 14:29

DwalteDwalte

1011 silver badge5 bronze badges

This is a very vague error message, there can be 100s of different reasons behind it. Check your server error logs.

In my case Redeploying the application targeting the 64-bit platform fixed the issue.

answered Oct 13, 2021 at 5:13

Lỗi resource load error please restart avatar star năm 2024

Manzur AlahiManzur Alahi

1,95023 silver badges19 bronze badges

0

I got the error using Azure App Service

HTTP Error 500.30 - ASP.NET Core app failed to start

The documentation and App Service logs did not get me anywhere.

I then logged on to the database and checked

dotnet ServerApp.dll

1 and saw that

dotnet ServerApp.dll

2 was set to No. Switching

dotnet ServerApp.dll

2 to Yes solved the error.

Lỗi resource load error please restart avatar star năm 2024

A good place to check is also Azure App Service - Diagnose and solve problems. Another problem I had could be solved using Application Event Logs.

Lỗi resource load error please restart avatar star năm 2024

In this case it was the error:

System.InvalidOperationException: Couldn't find a valid certificate with subject 'CN=certificate' on the 'CurrentUser\My'

Turned out I had a expired certificate, renewed and everything worked.

answered Nov 24, 2021 at 16:59

OgglasOgglas

65k38 gold badges349 silver badges438 bronze badges

When the top two answers didn't immediately resolve this error, I started down a deep road of depression wondering "what happened to the azure point, click, done experience I've enjoyed for over 10 years?". And began randomly clicking around the app service page, grasping without hope.

As a last chance (it's always the last chance, isn't it?) I clicked on the "Diagnose and solve problems" link. I had gone down this road before and thought it on only had alert-related stuff.

And then I saw the "Genie" link. "Omg I am so done with the failed promise of chat bots!" I scroamed (screamed and groaned) silently and clicked the link, eyes closed.

And got this...

Lỗi resource load error please restart avatar star năm 2024

I had initially wanted to self-host and had been using (minimal api template) "builer.WebHost.UseKestrel". Commented it out and good to go.

answered Jan 8, 2023 at 20:16

Lỗi resource load error please restart avatar star năm 2024

RodneyRodney

1897 bronze badges

Check whether the attribute value of hostingModel in the configuration file is OutOfProcess. If the value of the hostingModel property is InProcess, try to change it to OutOfProcess and start the project again.

answered Apr 23, 2021 at 2:29

Lỗi resource load error please restart avatar star năm 2024

Ding PengDing Peng

3,8321 gold badge5 silver badges8 bronze badges

3

Ran into this problem today (NET 5 app, win-x64 target runtime). I managed to fix it by disabling 32-bit applications support in the IIS Application Pool (see screenshot below):

Lỗi resource load error please restart avatar star năm 2024

As soon as I've switched from Enable 32-Bit Applications: true to false, the HTTP Error 500.30 disappeared.

For additional info, see this post on my blog.

answered Nov 30, 2021 at 14:37

Lỗi resource load error please restart avatar star năm 2024

DarksealDarkseal

9,3859 gold badges80 silver badges114 bronze badges

I also encountered this bug. With the difference that the target framework of my program is .NET 6.

The mistake I made was not to put the

dotnet ServerApp.dll

4 command in the

dotnet ServerApp.dll

5.

answered Dec 23, 2021 at 15:58

Lỗi resource load error please restart avatar star năm 2024

This may happen, when something is wrong with Startup.cs file. For instance it can be placing interface instead of realization class

services.AddScoped();

When you need to specify realization class:

services.AddScoped();

answered Oct 13, 2021 at 7:49

Lỗi resource load error please restart avatar star năm 2024

0

I have .Net 6 application I was getting this issue because I had some errors in Dependency Injection. Best way would be to put the try catch over your

dotnet ServerApp.dll

6 in Program.cs, either throw the error or Log it anywhere or put a debugger.

I was missing some dependency mapping.

Use this way to find the error:

            try
            {
                Log.Information("Starting Service");
                CreateWebHostBuilder(args).Build().Run();
                return 0;
            }
            catch (Exception ex)
            {
                Log.Fatal(ex, "Terminated");
                return 1;
            }

answered Jun 1, 2022 at 14:05

Lỗi resource load error please restart avatar star năm 2024

KushalSethKushalSeth

3,7371 gold badge29 silver badges31 bronze badges

2

Sometimes you need to refresh the application pool in combination with one of the aforementioned solutions.

answered Mar 16, 2022 at 3:42

Lỗi resource load error please restart avatar star năm 2024

Farzad M.Farzad M.

1593 silver badges14 bronze badges

I had a project running on Digital Ocean. After a year, I needed to port that project which was running fine on my local Mac and the Digital Ocean to azure. Then I got the 500.30 error I had tried all of the above but with no luck. Finally, in my case, it was that for my project to work with the Digital Ocean I had to make it work in port 8080, I was using the code below to do that.

if (app.Environment.IsDevelopment())
{
    app.Run();
}
else
{
    app.Run("http://0.0.0.0:8080");
}

when at the end delete that code and kept only

app.Run()

everything works just fine. The same is true if you want to deploy the app in IIS.

answered Dec 11, 2022 at 8:27

Lỗi resource load error please restart avatar star năm 2024

Aris SkamAris Skam

1061 silver badge4 bronze badges

  • Most often, this issue is caused by a faulty dependency injection in one of your classes.
  • Ensure your interfaces are registered in your startup class properly.
  • Also check your Logger interfaces you inject in your classes, those could cause issues sometimes.

answered Jan 27, 2023 at 11:43

Lỗi resource load error please restart avatar star năm 2024

answered May 9, 2023 at 14:53

juFojuFo

18.1k10 gold badges106 silver badges150 bronze badges

I found out how to fix this issue. If your project is inside of a folder that has been renamed or moved, that means you need to change the folder and drive for that route. If your project is in the drive d:\, leave that and make a new folder in another drive like e:\ or c:\ and test it again.

Jeremy Caney

7,31381 gold badges51 silver badges79 bronze badges

answered Jul 26, 2021 at 16:32

Lỗi resource load error please restart avatar star năm 2024

2

On my end, I found that on Azure, I accidentally chose .NET Core 3.1, whereas I was deploying an app targeting ASP.NET Core 5.0. After changing the version to .NET 5.0 on the Azure App Service, it works.

Lỗi resource load error please restart avatar star năm 2024

Jeremy Caney

7,31381 gold badges51 silver badges79 bronze badges

answered May 15, 2021 at 13:37

Lỗi resource load error please restart avatar star năm 2024

This error message also comes when you try to install the published package to the ISP-hosted shared IIS server or an ISP-hosted Virtual Machine.

  • Deployment mode: Framework-Dependent
  • Target Runtime: Win-x64 or Portable

In my case, when I tried to deploy ASP.NET Core 5 application, it occurred due to not setting the change (read/write/delete) permission to the web application folder for the user group, basically the root folder.

answered Nov 17, 2021 at 12:55

DushDush

1,28528 silver badges30 bronze badges

2

Try to change deployment mode into self contained

answered Nov 29, 2021 at 20:27

Lỗi resource load error please restart avatar star năm 2024

1

if your host bundle is 5 and also your app is 5 or your host bundle is 6 and aslo your app is 6

(for check host version : [email protected] )

then, set this in your publish setting befr publish:

(Deployment mode: self-contained & Target Runtime: Win-x64 or Portable) this option added ~75MB~ necessary files to your published project

answered Jan 15, 2022 at 21:39

Lỗi resource load error please restart avatar star năm 2024

مهدیمهدی

3794 silver badges7 bronze badges

Another possible reason: The app throws an exception at startup, e.g. in a static initializer or the like. In that case, the eventlog does not always show any related entries at all, but the console output will tell.

answered Jan 27, 2022 at 12:03

JensGJensG

13.3k4 gold badges46 silver badges56 bronze badges

I had the same problem when deploying a site which had been upgraded from dotnet core 3.1 to dotnet 6. Running @uvylight's suggestion revealed that it was complaining about a DLL dependency, and upon investigation the (standard Microsoft) DLL in question had not been updated.

In my case the solution was to change the "Delete existing files" option (in the VS Publish dialogue) to true, which forced it to clear the entire folder on the target server & recopy everything. This took dramatically longer than usual - 17 minutes instead of the usual 1-minute-or-so - but it did the trick, installing the newer versions of all the standard DLLs and resolving the problem. I recommend unticking "Delete existing files" afterwards though.

answered Aug 30, 2023 at 7:58

Lỗi resource load error please restart avatar star năm 2024

In my case it was throwing an exception when loading the startup file due to mismatching version of one DLL file.

Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

To get the actual exception and stacktrace, you can set the

dotnet ServerApp.dll

7 to

dotnet ServerApp.dll

8 in

dotnet ServerApp.dll

9 file, which will log the exceptions in log file and then you can check actual exception.

You can set the

dotnet ServerApp.dll

7 to


1 after you resolve the issue.

Lỗi resource load error please restart avatar star năm 2024

TylerH

20.9k69 gold badges77 silver badges102 bronze badges

answered Nov 17, 2023 at 13:15

Lỗi resource load error please restart avatar star năm 2024

Ravi PatilRavi Patil

1372 silver badges16 bronze badges

**

in .net most: server(host) .net ver > your application .net ver :: server net ver = 6.0.5 <> application ver = 6.0.6 >> not work application ver = 6.0.4 >> ok work :: if ver of .net in each first digit is same "x" (x.0.0) and other digit (0.x.x) in server was lower, you can select self-contained from developmentmode in publishing.

**

@Environment.Version()

answered Jun 15, 2022 at 4:56

Lỗi resource load error please restart avatar star năm 2024

مهدیمهدی

3794 silver badges7 bronze badges

Struggled with this for a bit. Had some start-up code that relied on information in my config files and I did not set an environment variable in my Azure App Service.

Once I sorted that out all was well.

answered Jul 27, 2022 at 11:41

0

I was getting this same error and none of the answers helped me. My scenario was I had multiple sites setup on the server and i had set my WebAPI Core 6 app to run on port 8080 in the bindings. The problem was i had not allowed that port through the firewall on the server. I hope this helps someone else so you dont waste hours on this like i did.