Adam
Adam

Reputation: 379

Creating a webservice inside a dll file? Can it be done?

I would like to create a c# dll that handles requests. I would like the requests to come as webservice calls so that websites can quickly call the dll. Is there a way to integrate the two - to have the code for the webservice be placed inside of the dll?

Or, if the webservice has to be separate - is there a way with visual studio to put the webservice into the project with the dll but tell the compiler to compile it as an external file? That way this would at least help me keep my project structure simple and clean.

Upvotes: 2

Views: 2436

Answers (2)

John Saunders
John Saunders

Reputation: 161783

All you need to do is create a new WCF Service Project. This will cause your services to be created as a separate application under IIS. Both projects would be in the same solution.

Upvotes: 0

Jim Mischel
Jim Mischel

Reputation: 134005

It's unclear to me what you're really trying to do. "A DLL that services requests" can be implemented in any number of ways.

One way to implement a Web service in a DLL would be to use an HttpListener.

You'll have to supply more information about what exactly you're trying to do before we can provide reasonable answers.

Upvotes: 1

Related Questions