---
title: "Protecting dll files from use."  
description: "Protecting dll files from use."  
author: "James Smith"  
published: 2011-04-16  
updated: 2011-04-16  
canonical: https://www.mindstick.com/forum/223/protecting-dll-files-from-use  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Protecting dll files from use.

I have a [dll](https://www.mindstick.com/forum/34704/dll-dynamic-link-library-in-c-sharp) which I have written that contains [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) for encrypting and decrepting [strings](https://www.mindstick.com/forum/161912/explain-the-python-strings), how would I do about [preventing](https://www.mindstick.com/news/2244/issue-preventing-users-from-accessing-facebook-s-social-networking-platforms-has-been-resolved) its use by [someone else](https://www.mindstick.com/forum/160828/what-should-i-do-if-i-suspect-someone-else-is-using-my-account-in-mindstick-training) who [say](https://answers.mindstick.com/qa/116645/a1-wreckers-reviews-what-do-customers-say) writes another .net [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) and then attempts to include the [method](https://www.mindstick.com/forum/166/webservice-method) from that [library](https://www.mindstick.com/forum/34615/software-framework-vs-library) for referncing it?

## Replies

### Reply by Anonymous User

Make use of the System.Security; namespace

decorate your code by this attribute\
[assembly:FileIOPermission(Security.Action.RequestMinimum,Unresticted.True)|SecurityPermission(SecurityAction.RequestRefuse, SkipVerification = false)]


---

Original Source: https://www.mindstick.com/forum/223/protecting-dll-files-from-use

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
