Solved

How to use DLL with a web service?

Posted on 2010-09-02
7
735 Views
Last Modified: 2012-05-10
Hello,

I would like to use a VB.NET application in the web, created a DLL for the application and trying to include it as part of a web service to view the application in the web.  I added to DLL as a reference in the webservice but don't know what to do from there, please help.

I am using Visual Studio 2008 (VB.NET) to create the DLL and webservice.

Thanks,

Victor
0
Comment
Question by:vcharles
  • 3
  • 3
7 Comments
 
LVL 21

Expert Comment

by:Dale Burrell
ID: 33593492
If its a standard asp.net web service then you put the DLL in the bin directory the same as a regular asp.net site.

http://msdn.microsoft.com/en-us/library/t990ks23.aspx
0
 
LVL 2

Expert Comment

by:larkvale
ID: 33602457
Just add a reference to your DLL in the Web Service project, then deploy the web service, it will include the dll in the bin folder
0
 

Author Comment

by:vcharles
ID: 33602567
The problem is even with the dll as part of the webservice, when I access the webservice in vb.net, I don't see the application that was converted to the dll, how do I access the dll?

How do I access the webservice from asp.net?

Thanks,

Victor
0
What Security Threats Are You Missing?

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.

 
LVL 21

Expert Comment

by:Dale Burrell
ID: 33602612
I'm not sure exactly what you are asking... are you familiar with building as asp.net web service?

Is this any help http://www.velocityreviews.com/forums/t113267-how-to-reference-a-dll-from-aspx.html
0
 

Author Comment

by:vcharles
ID: 33602738
I would Like to use a vb.net application in the web, converted it to a dll to use with asp.net in order to use it in the web. I was told to include it in a webservice than call the webservice with asp.net, is that correct? Or is there a way to use the dll with asp.net directly?
0
 
LVL 21

Accepted Solution

by:
Dale Burrell earned 500 total points
ID: 33605744
I quote from the link I posted earlier:

"If you have a precompiled class that you want to expose as a XML Web service
(and this class exposes methods marked with the [WebMethod] attribute),
you can create an .asmx file with only the following line :

<%@ WebService Class="MyWebApplication.MyWebService" %>

MyWebApplication.MyWebService defines the WebService class,
and is contained in the /bin subdirectory of the ASP.NET application."

I expect that your VB App/DLL isn't exposing methods using the [WebMethod] attribute, although you might be able to add that without affecting you regular app. Otherwise you need to put some code in you asmx file which acts as an interface to the DLL - I would suggest doing this anyway as it leaves your code more generic.

Here is a simple example of creating a web service... sorry its in C# but should be easily translated into VB. If you can get a simple "Hello World" working then you can easily write the interfaces to your DLL.

http://www.codeguru.com/Csharp/Csharp/cs_webservices/tutorials/article.php/c5477
0
 

Author Closing Comment

by:vcharles
ID: 33712388
Thank you, I appreciate the help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

13 Experts available now in Live!

Get 1:1 Help Now