Monday, March 26, 2012

Exposing Web Services defined in class libraries

I have a class library (or will have) that defines a bunch of web services. I can reference Atlas if necessary. How do I expose all these web services to Atlas via IIS/ASP.Net. In other words, I do *not* want the code for my web services to be in the web project, I want them to be in an external project and optimally just included with a single line for all services, or a line per service if necessary.

Thanks.

All you need to do is to add your assembly as a reference to the web project and then add it to the ScriptManager service reference as following:

 <atlas:ScriptManager ID="ScriptManager1" runat="server" > <Services> <atlas:ServiceReference Type="namepsace.typename" /> </Services></atlas:ScriptManager>

Replace the bold text with the type name of your web service.


Seems that this has changed since way back when... How do I reference a service in a class library now? How do I then hook it up to an extender, e.g. an AutoCompleteExtender?

Thanks.

No comments:

Post a Comment