Database not found after deploying IIS

Good afternoon,

I created a .NET Core 3.1 Radzen application, deployed to ZIP, copied the content of the to webserver Default Web Site/RadzenTest folder.

The application starts, I can switch pages but it says unable to load myTable.
"Failed to load resource: the server responded with a status of 404 (Not Found) " odata/database/mytable$top=10&$skip=0&$count=true

It seems that the custom methods are also "not reachable" while is giving 404 too.

My base ref at deploying was /RadzenTest and the physical path at IIS is set to "C:\Sites\RadzenTest\wwwroot"

Locally everything works fine!

What could cause these problems?


Hi @tester13,

In my opinion the server app is missing. Here is how it looks normally Angular + .NET Core application when deployed to IIS:

.NET Core app in the root of the virtual folder:

Angular app in wwwroot:

Mine looks the same.

And you have .NET Core 3.1 Windows Hosting installed?

Yes, 3.1.11. I guess if it's not installed, my app wouldn't run.

You need special pack for IIS hosted .NET Core apps:

In this case I’m afraid that I don’t have other ideas. Check the log file for errors.

Is the database deployed and accessible to the deployed app? Verify the connection in deployed appsettings.production.json

Guess it is configured well, check the previously attached picture.
By the way, after going to the server and running the application from command line with "dotnet server.dll", the applicatoin starts at localhost:5000, the database is loaded and everything seems ok!

Are you using windows authentication for the database? If yes - that's the problem. You need to allow the IIS process access to the database. Or use a different form of database authentication.

No, it's Sql Server Authentication. :frowning:

Then it must be something IIS related consider the fact it works when run via dotnet server.dll. Some IIS module is perhaps interfering. Not sure how to determine that though.

Just to make sure it's not me and my application configuration that causes problems.

When I made the deploy, the base href was the basic "/".
After that I set the physical path in IIS to "C:\Sites\RadzenTest\wwwroot"

Copied the content to the RadzenTest directory. With these settings nothing happened when I tried to reach the, so I changed the index.html's base href to "./". It made the application start, but cannot reach the database related things (neither ServerMethods).

Is there a way to modify the routing of the database like with the base href?

The database is set in appsettings.production.json as mentioned above. Check the Radzen logs for any errors as likely IIS configuration or missing dependency causing process failure. If logs are missing check the permissions,
see also

Maybe its caused by CORS issue.
Have you try this browser addons?

Make sure CORS Everywhere enabled.

The Base href is set in the Deploy to ZIP screen.