Solved

StrongNameIdentityPermission can't get it working

Posted on 2012-03-12
2
225 Views
Last Modified: 2012-04-03
Hi,

As part of the microsoft exam i'm just looking into this. So, I created an assembly (windows forms) and in the debug folder used the command prompt to put a .snk file. Then I looked at the public key using sn -k myassembly1.exe.

I went into my second assembly and put decorated the main() function with the code

   <StrongNameIdentityPermission(SecurityAction.Demand, PublicKey:="1fd86b19d3...............")> _

Open in new window


Then I used 'Diagnostics.Process.Start("E:\My Documents\assembly2\bin\Debug\assembly2.exe") to start the second assembly which ran fine. Then I changed the public key so that it was incorrect and should throw and exception but it still ran fine.

Then, not knowing what to do, i changed the security zone in each of the projects to 'internet' just in case it will always run because of full trust or something. Second assembly still ran.

What do I need to do here?

Thanks, Aiden
0
Comment
Question by:AidenA
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 37717467
0
 

Author Comment

by:AidenA
ID: 37781164
sorry must have missed this one... exam is tomorrow so don't have time to look at this, but will take a look on mon... thanks for input though
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now