I guess you know this file well, it's a file for binding some IP to hostnames.
C:\Windows\System32\Drivers\etc\hosts
Notepad can make changes on this file but C#
Text-stream
couldn't do anything on it and says access denied
.
Any ideas why this is happening?
P.S: My user has enough rights to edit that file because I can edit it with Notepad, but my programm couldn't.
EDIT: One more thing, it doesn't work with users that are created in ActiveDirectory. users who are not from this computer. They're administrator but they are not the owner.
Could it be ownership problem?