Using a 3rd Party DLL in C# Web Application

Posted on 2011-03-01
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?

Question by:jmpatton
  • 4
  • 2
LVL 16

Accepted Solution

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

Author Comment

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

Expert Comment

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

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.

Author Comment

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"

Author Comment

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.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

679 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