You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same code works differently locally and in cloud (Azure AppService). Some thumbs won't load in Azure, everyone works locally. Same ttf-file locally and on Azure.
Used like this, won't work on Azure:
[ThumbnailIcon("fa-light-300.ttf", 0xf015)]
Used like this, works on Azure:
[ThumbnailIcon("fa-light-300.ttf", 0xf1ea)]
Error:
Parameter is not valid. at System.Drawing.Bitmap..ctor(String filename)
Seems like some icons works to generate thumbnails from, and some won't.
Some files seems to be zero sized too.
It seems like new Bitmap(path) won't work reliably in Cloud see here and here since .
Proposed fix might be changing this, if new Bitmap works best with stream instead of path:
if (File.Exists(cachePath))
{
using (var bmpTemp = new Bitmap(cachePath))
{
return new Bitmap(bmpTemp);
}
}
to this (dummy-coded):
if (File.Exists(cachePath))
{
using (StreamReader sr = new StreamReader(cachePath))
{
using (var bmpTemp = new Bitmap(sr))
{
return new Bitmap(bmpTemp);
}
}
}
The text was updated successfully, but these errors were encountered:
@degborta Seems like same behaviour occurs over time on local machine too — can check error logs the next time it happens. It happened after adding new thumbnails and Re-compiled. IIS-reset after clearing thumbs works locally too as a ”fix”.
Same code works differently locally and in cloud (Azure AppService). Some thumbs won't load in Azure, everyone works locally. Same ttf-file locally and on Azure.
Used like this, won't work on Azure:
Used like this, works on Azure:
Error:
Seems like some icons works to generate thumbnails from, and some won't.
Some files seems to be zero sized too.
It seems like
new Bitmap(path)
won't work reliably in Cloud see here and here since .Error exists in FontThumbnailService.cs.
Proposed fix might be changing this, if
new Bitmap
works best withstream
instead ofpath
:to this (dummy-coded):
The text was updated successfully, but these errors were encountered: