473,378 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Using only specified Assemblys

Hello,

i have a little application that search into a special folder to
assemblys. Founded assembly would be load by Assembly.LoadFrom().

Is there a way to load only assemblys that are from my company? I would
not that 3th party assemblys are loaded. So if i copy an assembly into
this folder on next restart the new assembly should be load only if
have the right strong name, or is certified??

What can i do?

Thanks a lot for any idears.
René

Nov 17 '05 #1
3 1204
>
Is there a way to load only assemblys that are from my company? I would
not that 3th party assemblys are loaded. So if i copy an assembly into
this folder on next restart the new assembly should be load only if
have the right strong name, or is certified??

What can i do?


You could get the AssemblyName first with
AssemblyName.GetAssemblyName(). Then use the GetPublicKey() method to
check if the assembly has a public key that matches your company.
Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 17 '05 #2
Hi,

Use Assembly.LoadFile() method. This will not load the assembly into your
AppDomain but will give you the possiblity the check the assembly out. Find
out what your need to know and then use Assembly.LoadFrom() to load the
assembly into your domain if the assembly applies to your requirements.

Kr. Soren
"René P." <rp***@gmx.net> skrev i en meddelelse
news:11********************@o13g2000cwo.googlegrou ps.com...
Hello,

i have a little application that search into a special folder to
assemblys. Founded assembly would be load by Assembly.LoadFrom().

Is there a way to load only assemblys that are from my company? I would
not that 3th party assemblys are loaded. So if i copy an assembly into
this folder on next restart the new assembly should be load only if
have the right strong name, or is certified??

What can i do?

Thanks a lot for any idears.
René
Nov 17 '05 #3
Hi Matias,

what happen if anyone makes the same settings like CompanyName etc? Is
it a secury way to check the PublicKey? How i can compare the PublicKey
from the Assembly to the ExecutingAssembly without writing clear text?

Thanks
René

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for...
3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
2
by: John Regan | last post by:
Hello All I am trying to find the owner of a file or folder on our network (Windows 2000 Server) using VB.Net and/or API. so I can search for Folders that don't follow our company's specified...
1
by: KR | last post by:
The DTS package runs fine through Enterprise manager successfully. However, when scheduled through a job that runs the dts through the following code: DECLARE @findfile int Exec @findfile =...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
11
by: Ed Bitzer | last post by:
I have been able using the namespace System.Web.Mail and its method Smtp.mail.send to mail simple text messages to a small group within our 55 and older community. I need help expanding the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.