Solved

Using a 3rd Party DLL in C# Web Application

Posted on 2011-03-01
6
385 Views
Last Modified: 2012-05-11
I am building a very small one function web application that needs to call a 3rd party dll, pass in two variables and return an encrypted URL for the user to click on.  I have the third party dll loaded in the bin folder of the web application, I have added a reference to it, but cannot seem to see any of its methods.  If i type "using ...." at the top of thhe page, intellisense doesnt pick it up.  Im sure I added it wrong or something.  Can someone tell me the proper way to add a reference to a third party dll in a C# web app?

So i need to register it on my machine first, or can I just put it in the bin folder and reference it?

Thanks
0
Comment
Question by:jmpatton
  • 4
  • 2
6 Comments
 
LVL 16

Accepted Solution

by:
Kalpesh Chhatrala earned 500 total points
ID: 35008439
put file in project directory and add DLL file reference.


Command for register in GAC

gactutil -i c:\foldername\assemblyname\bin\assemblyname.dll
0
 

Author Comment

by:jmpatton
ID: 35009742
gactutil is not recognized as an internal or external command
0
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 35010201
you can run gacutil command from "Visual Studio Command Prompt (2010/2008)"

 
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:jmpatton
ID: 35010219
Ok I got that.  Now it is telling me that the dll i am trying to put into the GAC is failing because it doesnt have a strong name.  I created the ".snk" file and now the AssembleKeyFile will not recognize the path to theh .snk file.
0
 

Author Comment

by:jmpatton
ID: 35010353
ok next thing.  I got the AssemblyKeyFileAttribute to recognize the .snk file.  Stll get "GAC is failing because it doesnt have a strong name"
0
 

Author Comment

by:jmpatton
ID: 35017448
OK, i got it added to the GAC, but I still cant use it my program.  If I type "Using..."  Intellisense still doesnt pick it up.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C# Error - Add Failed 12 78
Is setting this variable making a duplicate in memory 4 30
Get id from json Data with NewtonSoft 3 33
C# Json POSt to Rest API 4 36
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

910 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

19 Experts available now in Live!

Get 1:1 Help Now