How do I get passed security issues while developing?

T

Tim Philomeno

I have a form that uses Imports System.Security.Principal in managed
code...when I try to run it during development, I get:

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

If I publish it trusted, it works fine...

Thanks,

Tim Philomeno, Sparling, Inc.
 
S

Scott L. Heim [MSFT]

Hi Tim,

There is a VS.NET/InfoPath "macro" where you can add "full trust" for the
project you can test from within the project - you will simply need to
download and install the InfoPath SDK.

Here are the steps:

- Download the InfoPath SDK

** NOTE: You can get this from:

InfoPath SDK
http://www.microsoft.com/downloads/details.aspx?FamilyId=351F0616-93AA-4FE8-
9238-D702F1BFBAB4&displaylang=en

- Install the SDK
- From the VS.NET InfoPath Project, choose: Tools|Macros|Load Macro Project
- Navigate to: C:\Program Files\Microsoft Office 2003 Developer
Resources\Microsoft Office InfoPath 2003 SDK\Macros
- Select the macro: InfoPathSDK.vsmacros
- In the InfoPath VS.NET Solution, expand InfoPath SDK under macros
- Expand IPFullTrust
- Right-click on the final IPFullTrust and choose Run - this will call the
"RegisterSolution" method to register the IP solution with Full Trust

I hope this helps!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top