none
Assembly.LoadFrom only locking file when Server on a Domain RRS feed

  • Question

  • I am running into the dreaded Assembly.loadfrom file locking error.  But only when our server is added to our test domain.  If we remove it and put in just in a workgroup, we do not find this behavior.

    Please help.?

    Tuesday, November 19, 2013 10:46 PM

Answers

  • Hello,

    >>I am running into the dreaded Assembly.loadfrom file locking error

    What does it mean? Does it mean that you want to load a file with assembly.loadfrom() method.

    If it is, I suggest you having a try shadow copying?

    When we are using shadow copying, .NET copies the assembly to a temp directory and loads it from there (so it's the temp file that's locked, not the original assembly) -- but all the binding rules are based on the original file location.

    If I have misunderstood, please let me know.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, November 21, 2013 8:16 AM
    Moderator
  • Hi,

    As far as I know, computers on a network can be part of a workgroup or a domain. The main difference between workgroups and domains is how resources on the network are managed. Computers on home networks are usually part of a workgroup, and computers on workplace networks are usually part of a domain.

    In a workgroup:

    •All computers are peers; no computer has control over another computer.

    •Each computer has a set of user accounts. To use any computer in the workgroup, you must have an account on that computer.

    •There are typically no more than ten to twenty computers.

    •All computers must be on the same local network or subnet.

    In a domain:

    •One or more computers are servers. Network administrators use servers to control the security and permissions for all computers on the domain. This makes it easy to make changes because the changes are automatically made to all computers.

    •If you have a user account on the domain, you can log on to any computer on the domain without needing an account on that computer.

    •There can be hundreds or thousands of computers.

    •The computers can be on different local networks.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 27, 2013 7:54 AM
    Moderator

All replies

  • Hello,

    >>I am running into the dreaded Assembly.loadfrom file locking error

    What does it mean? Does it mean that you want to load a file with assembly.loadfrom() method.

    If it is, I suggest you having a try shadow copying?

    When we are using shadow copying, .NET copies the assembly to a temp directory and loads it from there (so it's the temp file that's locked, not the original assembly) -- but all the binding rules are based on the original file location.

    If I have misunderstood, please let me know.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, November 21, 2013 8:16 AM
    Moderator
  • My existing code already loads the DLL using Assembly.LoadFrom.  However, our code has reason to try and delete the dll and regenerate.  We are unable to delete the file when our test server is in a domain.  When in workgroup mode, we are able to delete the file.
    Monday, November 25, 2013 2:50 PM
  • Hi,

    >> We are unable to delete the file when our test server is in a domain.

    Does this operation throw any error? If it has, please share it.

    Regards.

    Tuesday, November 26, 2013 7:27 AM
  • Hi,

    As far as I know, computers on a network can be part of a workgroup or a domain. The main difference between workgroups and domains is how resources on the network are managed. Computers on home networks are usually part of a workgroup, and computers on workplace networks are usually part of a domain.

    In a workgroup:

    •All computers are peers; no computer has control over another computer.

    •Each computer has a set of user accounts. To use any computer in the workgroup, you must have an account on that computer.

    •There are typically no more than ten to twenty computers.

    •All computers must be on the same local network or subnet.

    In a domain:

    •One or more computers are servers. Network administrators use servers to control the security and permissions for all computers on the domain. This makes it easy to make changes because the changes are automatically made to all computers.

    •If you have a user account on the domain, you can log on to any computer on the domain without needing an account on that computer.

    •There can be hundreds or thousands of computers.

    •The computers can be on different local networks.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 27, 2013 7:54 AM
    Moderator