Problem trying to call a form

Problem trying to call a form

Anonymous
Not applicable
580 Views
2 Replies
Message 1 of 3

Problem trying to call a form

Anonymous
Not applicable

I get the following error when I try to call a form using ShowModalDialog(MyForm):

 

Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

 

I've tried different syntax. I've even rebuilt my project from scrap (because this is a conversion of a VBA module... it had a sloppy start). Nothing helps.

 

I've never had so many problems trying to program anything in the last 30 years as I have run into with AutoCAD's .Net API.

 

If I wasn't already bald, I would be tearing my hair out!

 

Please, help me or shoot me. Either choice would be a relief at this point.

 

0 Likes
Accepted solutions (1)
581 Views
2 Replies
Replies (2)
Message 2 of 3

fieldguy
Advisor
Advisor
Accepted solution

Is your form on a network server?  That looks like a code access security message.  Search here for CASPOL or move the form to a local drive.

0 Likes
Message 3 of 3

Anonymous
Not applicable

That was, indeed, the problem. I moved the source from my area on the server (which is backed up) to my local drive (which isn't backed up), and I got past that error. Other errors came up, but it's early in the debugging process and hopefully they will all be 'normal' errors.

 

Thanks for the help!

 

Now, if only Microsoft had all their error messages make a bit more sense..... <sigh>

0 Likes