Solved

Using a 3rd Party DLL in C# Web Application

Posted on 2011-03-01
6
379 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
Comment Utility
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
Comment Utility
gactutil is not recognized as an internal or external command
0
 
LVL 16

Expert Comment

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

 
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:jmpatton
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

18 Experts available now in Live!

Get 1:1 Help Now