loadFromRemoteSources and local network share RRS feed

  • Question

  • Hi,

    The documentation for the <loadFromRemoteSources> setting in the .config file says:

    "In the .NET Framework 4.5, assemblies on local network shares are run as full trust by default; you do not have to enable the <loadFromRemoteSources> element. "

    How does the framework know if a share is "local network" or not? Can I inspect/change it?

    I have a .Net 4.5.1 application running from a share "\\server\sharename\myapp.exe."

    It will not load assemblies from the share unless I add <loadFromRemoteSources> in the config file.
    (the assmeblies are not flagged as "from the web")

    Does this mean the share is not "local network"?

    Monday, April 6, 2015 11:37 AM


  • I believe a local network share is a share from the PC that is executing the code. If the share is being hosted by any other PC or device on the network then it is a remote network share (not local to the PC executing the code). In your example if \\server\ is the name of the PC also executing the .net code then it is local network share, if it is not then it is not a local network share.

    Mark as answer or vote as helpful if you find it useful | Igor

    • Marked as answer by Fred Bao Wednesday, April 15, 2015 4:32 AM
    Monday, April 6, 2015 1:20 PM