Published website can't find media folder because ...
# help-with-umbraco
d
When i publish my Umbraco website and put it on the server. it generates and error and the log shows Unhandled exception. System.IO.DirectoryNotFoundException: d:\web\localuser\site.dk\public_html\wwwroot\media\ at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters) at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root) at Umbraco.Cms.Core.IO.PhysicalFileSystem.Create() But the media folder is not created in the published content. I use the 14.3.1 version Do anyone knows why or what it could be?
l
In 13 I also sometimes have issues with a blank Umbraco site that the media folder isn't there because it's doesn't create it if it doesn't exist. It appears that's also the case in 14.
d
The problem is that the site works fine when i develop it / running localhost. As soon as i publish it and push it to the server then i get that problem. Also there is no local media folder in the project.
Fixed the problem with media folder, but now i get these errors ould not load d:\web\localuser\site.dk\public_html\aspnetcorev2_inprocess.dll for type scanning, skipping System.BadImageFormatException: PE image does not have metadata. File name: 'd:\web\localuser\site.dk\public_html\aspnetcorev2_inprocess.dll' ---> System.InvalidOperationException: PE image does not have metadata. at System.Reflection.PortableExecutable.PEReader.GetMetadataBlock() at System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader(PEReader peReader, MetadataReaderOptions options, MetadataStringDecoder utf8Decoder) at System.Reflection.Metadata.MetadataReader.GetAssemblyName(String assemblyFile) at System.Reflection.Metadata.MetadataReader.GetAssemblyName(String assemblyFile) at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile) at Umbraco.Cms.Core.Composing.ReferenceResolver.ResolveAssemblies() [16:48:17 DBG] Could not load d:\web\localuser\site.dk\public_html\clretwrc.dll for type scanning, skipping System.BadImageFormatException: PE image does not have metadata. File name: 'd:\web\localuser\site.dk\public_html\clretwrc.dll' ---> System.InvalidOperationException: PE image does not have metadata. at System.Reflection.PortableExecutable.PEReader.GetMetadataBlock() at System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader(PEReader peReader, MetadataReaderOptions options, MetadataStringDecoder utf8Decoder) at System.Reflection.Metadata.MetadataReader.GetAssemblyName(String assemblyFile) at System.Reflection.Metadata.MetadataReader.GetAssemblyName(String assemblyFile) at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile) at Umbraco.Cms.Core.Composing.ReferenceResolver.ResolveAssemblies()
k
This sounds unrelated to Umbraco. Make sure the .NET 9 (or is it 8 for U14?) Hosting Bundle is installed on the server, make sure the IIS site and app pool are configured correctly, make sure the
Web.config
on the server (which may not be in your project) is correct.
44 Views