I'm facing this situation, the customer wants to set the IIS on server , SQL Server on other server and uploaded files on other server. all servers linked in local network , IIS server connected to the internet only.
so how can I change asp.net core 6 wwwroot folder path to another server?
I tried to set shortcut of a network folder in the wwwroot but it's look like a .link not a folder
to solved this issue add:
app.UseStaticFiles(new StaticFileOptions()
{
FileProvider = new PhysicalFileProvider("\\\\192.168.1.234\\Arc\\Uploaded\\"),
});
this work fine in debug mode, in publish gives this error:
HTTP Error 500.30 - ASP.NET Core app failed to start
to solve it add account in IIS: