Chapter 3: originUrl issue (Medium trust)
I set the trust level to "Medium" and used originUrl attribute, but it looks like for a specific URL it doesn't work. Here are my settings:
<trust level="Medium" originUrl="http://www.microsoft.com/" />
I checked also the Medium policy file to see whether the WebPermission is properly set.
The test has been conducted on IE7 and Firefox browsers. The same result came up, a security exception like this one:
"[SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Obj ect demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Net.HttpWebRequest.CheckResubmit(Exception& e) +896"
But if I specify the URL as a regular expression like "http://www.microsoft.com/.*" everything works fine as it should.
I guess it might be a bug or the way it works. What do you think ?