AllowPartiallyTrustedCallers

I have a web service (.asmx) which invokes methods from another class library I wrote. Under 1.1 this all works fine. Under 2.0, I get a SecurityException: "That assembly does not allow partially trusted callers". I added the [assembly: AllowPartiallyTrustedCallers] attribute to the class library, but I still get that exception. What gives?
Also, I have no Framework 2.0 MMC Snap-In. I re-ran aspnet_regiis -i and it didn't fix it.
Help!!!
Thanks,
Mark
[475 byte] By [MarkA.Richman] at [2008-2-2]
# 1

I'm not sure about your first problem, but the MMC snap-in bug seems to be fairly common.

The following post has the fix:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2551

--Oren

OrenNovotny at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2
Hi Mark,

What would be really helpful would be if you could hook up a debugger and capture the SecurityException there. Then the exception will tell you what assembly was being referenced, and let you know which one needs APTCA applied.

-Shawn

ShawnFarkas-MS at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 3
The problem was caused by my code being run over UNC vs. local disk. This has the net effect of applying the LocalIntranet_Zone code group as opposed to the My_Computer_Zone, if am correct. I altered the permission set on LocalIntranet_Zone from LocalIntranet to FullTrust and everything works. For production purposes, this may not be the best approach. Not only will my code by running over UNC, but so will my customers' code, and I don't want to grant their code more trust than is necessary (I'm a web hoster). Any suggestions?
Thanks,
Mark
MarkA.Richman at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified