how to prevent modification(deletion, rename) to an assembly?

hi ,
suppose i have an application which uses a assembly "***.dll" and it loads the assembly using reflection and creates a object of it that too using refelection.

now i want that if the assembly is loaded nobody should be able to delete it or rename it.how can that be done.more specifically how to lock that particular assembly dll.

thanks and regards
ramneek

[387 byte] By [ramneek] at [2007-12-16]
# 1
Don't the operating system and the CLR do it for you? I thought unless you did something esoteric like Shadow copying and stuff, you won't be able to modify loaded assemblies?
senthilkumar at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2
yeh i also thought so.but it is happening and i am able to do exactly that.
ramneek at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 3
.NET does not provide that type of security. You must rely on the normal operating system permissions for files and folders. In other words, it must be installed by a different user (perhaps administrator), the user must not have the same permissions and cannot be administrator, and the file must be marked read-only. If you are trying to prevent the user from modifying files they install themselves, there is no way to do that.
FrankHileman at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified