mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-02 19:44:02 +08:00
#17869: Fix medium trust issue
"Assembly.Location" propery is not allowed in medium trust. Use the virtual path of the assembly file instead. Work Item: 17869 --HG-- branch : 1.x
This commit is contained in:
@@ -53,11 +53,13 @@ namespace Orchard.Environment.Extensions.Loaders {
|
||||
if (assembly == null)
|
||||
return null;
|
||||
|
||||
var assemblyPath = _virtualPathProvider.Combine("~/bin", descriptor.Id + ".dll");
|
||||
|
||||
return new ExtensionProbeEntry {
|
||||
Descriptor = descriptor,
|
||||
LastWriteTimeUtc = File.GetLastWriteTimeUtc(assembly.Location),
|
||||
LastWriteTimeUtc = _virtualPathProvider.GetFileLastWriteTimeUtc(assemblyPath),
|
||||
Loader = this,
|
||||
VirtualPath = _virtualPathProvider.Combine("~/bin", descriptor.Id + ".dll")
|
||||
VirtualPath = assemblyPath
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user