Hi,
I have written a logic to give the FullTrust to the assembly if it is on the network share location. But the behavior of the execution of the assembly changes with the way I specify the URL path.
For eg: If I give the UNC path as file://<machine-name>/TestProject/bin/* then my application executes without any problem. But if I provide URL as file://<ip address>/TestProject/bin/* then application fails to execute.
I found one more difference when I opened the .NET Configuration tool.
If I go inside "Runtime Security Policy"->Machine->Code Groups->LocalIntranet_Zone, I see the entry for my app code group with permission set as FullTrust. This entry appears for both type of URLs. If I choose "Evaluate Assembly" by right clicking on the "Runtime Security Policy" node and give the <ip address> path, and view code groups that grants permissions to the assembly, it shows assembly in the Machine Policy->All_Code->InterNet_Zone. View Permission granted to the assembly also shows only :
File Dialog,Isolated Storage File,Security....instead of Unrestricted.
Same steps if I do to Evaluate assembly which I gave using the <machine-name> url, shows the correct permissions and code group value.
Is there any constraint in .NET Security policy, that we cannot give FullTrust to URLs with IP Address, but can give FullTrust if the machine name is provided
Please let me know if more information is required on this issue.
Thanks,
Nitin
.NET Development3
|