I have a new site with Umbraco 11.0 and uSync 11. All is fine on the developer machine. When I publish to IIS, uSync's css and js files are missing and the uSync dashboard is not loading (404).
On the developer machine, there is no uSync folder inside of AppPlugins. However, looking at browser's developer console, uSyncs css and js files are loaded (via Smidge I guess) as if they are coming from AppPlugins/uSync
When I load the site from the server/IIS, I see 2 errors in the browser's developer console:
Yeah it works a little different than with Umbraco7/8 which where .net framework - with .netcore the concept of 'publishing' is a little different.
so I think it depends on the way you have 'published' the site to IIS.
During development the uSync files (and many other packages depending on what you have installed) will actually coming from your local .nuget cache (usually in c:\users\username.nuget\packages).
Asp & dotnet are doing something clever with fileproviders to make it look like those files live in your projects app_plugins folder but they don't
with a dotnet project when you publish it (either via dotnet publish or publish in visual studio or similar) what happens is those files are copied into wwwroot/app_plugins/ - so when the site runs their the files are local.
(you can tell if its being 'published' because a published dotnet core site has dll's in the root! , and you should see a app_plugins folder under wwwroot).
if you "just" copy the files from a project to an IIS folder or if you point IIS at an existing folder then it usually doesn't work because the account running the IIS website can't see the .nuget cache (where the files still are).
so -
For development on IIS - you need to give the account running the IIS site (usually network service) permissions to the .nuget folder under your account.
For published/live sites - you have to do a "dotnet publish" at somepoint to create the published version of your site - which is what you then point IIS at.
*dotnet publish - might not be you explicity typing that, visual studio/rider do it under the hood when you 'publish' sites via their UI
The site is published to IIS (through Visual Studio Publish command). And you are right, there are some folders in AppPlugins on the server which are not there on the development machine, like "AppPlugins/UmbracoForms" etc.. They are created during publish.
However, there is no uSync folder in App_Plugins on the server. This is the part I am not getting.
I changed permissions on the .nuget cache folder but this make sno difference. I also uninstalled and reinstalled uSync nuget package - no difference.
My understanding is (and that's what you confirmed) that the App_Plugin/uSync folder should be created during Publish, but for some reason, this is not happening.
just to check what version do you have installed, this is all working locally for me.
also are you looking in wwwroot/appplugins or just apppluigns.
after publish there is still a apppluigins in the root, but there is another wwwroot/appplugins, which is where the published files from packages like usync will be getting placed.
I sorted it out, see my reply above. Thank you for responding, and sorry for wasting your time on an issue which was caused by something entirely different.
uSync 11: js/css files mssing on server after publish
Hi Kevin,
I have a new site with Umbraco 11.0 and uSync 11. All is fine on the developer machine. When I publish to IIS, uSync's css and js files are missing and the uSync dashboard is not loading (404).
On the developer machine, there is no uSync folder inside of AppPlugins. However, looking at browser's developer console, uSyncs css and js files are loaded (via Smidge I guess) as if they are coming from AppPlugins/uSync
When I load the site from the server/IIS, I see 2 errors in the browser's developer console:
Any idea what this is and how I get it t o work?
Kind regards, Mikael
Hi,
Yeah it works a little different than with Umbraco7/8 which where .net framework - with .netcore the concept of 'publishing' is a little different. so I think it depends on the way you have 'published' the site to IIS.
During development the uSync files (and many other packages depending on what you have installed) will actually coming from your local .nuget cache (usually in c:\users\username.nuget\packages).
Asp & dotnet are doing something clever with fileproviders to make it look like those files live in your projects app_plugins folder but they don't
with a dotnet project when you publish it (either via dotnet publish or publish in visual studio or similar) what happens is those files are copied into wwwroot/app_plugins/ - so when the site runs their the files are local.
(you can tell if its being 'published' because a published dotnet core site has dll's in the root! , and you should see a app_plugins folder under wwwroot).
if you "just" copy the files from a project to an IIS folder or if you point IIS at an existing folder then it usually doesn't work because the account running the IIS website can't see the .nuget cache (where the files still are).
so -
*dotnet publish - might not be you explicity typing that, visual studio/rider do it under the hood when you 'publish' sites via their UI
Hi Kevin,
thank you for the answer.
The site is published to IIS (through Visual Studio Publish command). And you are right, there are some folders in AppPlugins on the server which are not there on the development machine, like "AppPlugins/UmbracoForms" etc.. They are created during publish.
However, there is no uSync folder in App_Plugins on the server. This is the part I am not getting.
I changed permissions on the .nuget cache folder but this make sno difference. I also uninstalled and reinstalled uSync nuget package - no difference.
My understanding is (and that's what you confirmed) that the App_Plugin/uSync folder should be created during Publish, but for some reason, this is not happening.
Kind regards, Mikael
Hi Mikael,
just to check what version do you have installed, this is all working locally for me.
also are you looking in wwwroot/appplugins or just apppluigns.
after publish there is still a apppluigins in the root, but there is another wwwroot/appplugins, which is where the published files from packages like usync will be getting placed.
Hi Kevin,
I found the cause of the issue.
I had excluded the /uSync import/export folder with the following skip directive:
However, this also skipped the uSync folder in App_Plugins. Removing the directive solved the problem.
Kind regards, Mikael
Hi Kevin,
I sorted it out, see my reply above. Thank you for responding, and sorry for wasting your time on an issue which was caused by something entirely different.
Kind regards, Mikael
No worries,
Its good you found (and shared) the problem, if someone else has a similar problem there is an answer now 👍
is working on a reply...