Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Offering an XML serviceOffering an XML service
Previous
 
Next
New Post
1/12/2009 10:44 PM
 

I have an XML service that I'd like to offer through my portal, is there a way to do this? Currently it sits in IIS 7.0 as its own little website, but I think bringing it into the DotNetNuke space would be kinda cool. Just curious.

 
New Post
1/13/2009 11:46 AM
 

There is no reason why you couldn't do this; you could just copy it into your DNN portal (assuming it is an ASMX or SVC file?) and if it is precompiled, copy the DLL into your BIN folder.

As an aside, putting a webservice into a module is also not out of the question either.  I frequently build webservices with my internal modules (at my day job) which I expose functionality to all sorts of other applications including other web apps, windows apps, windows services, etc.  Since they are packaged up with a module, however, the URL to access them is a little bit different (http://yourdomain/DesktopModules/yourmodule/yourfile.asmx).

Go for it though, webservices make things handy.

*EDIT*: BTW, for anybody using WebServices in a DNN module in general there are some caveats.  For one, the HttpContext within the webservice doesn't seem to populate portal details so you have to trick it.  I use the following method that I wrote to "initialize" a portal call (note that the idea for the "MacuAuthentication" object comes from Michael Washington's "secure webservice" tutorials):

// utility members; used for loading info for modules
private DotNetNuke.Entities.Portals.PortalAliasController _pac = null;
private ArrayList _portalAliases = null;
private DotNetNuke.Entities.Portals.PortalSettings _ps = null;
private DotNetNuke.Entities.Tabs.TabController _tc = null;
private DotNetNuke.Entities.Tabs.TabInfo _ti = null;
private DotNetNuke.Entities.Modules.ModuleController _mc = null;
private DotNetNuke.Entities.Modules.ModuleInfo _mi = null;

internal void InitializeCall(Macu.DNN.Web.Services.MacuAuthentication auth)
{
_pac = new DotNetNuke.Entities.Portals.PortalAliasController();
_portalAliases = _pac.GetPortalAliasArrayByPortalID(auth.PortalId);
_ps = new DotNetNuke.Entities.Portals.PortalSettings(auth.TabId, _portalAliases[0] as DotNetNuke.Entities.Portals.PortalAliasInfo);
_tc = new DotNetNuke.Entities.Tabs.TabController();
_ti = _tc.GetTab(auth.TabId, auth.PortalId, true);
_mc = new DotNetNuke.Entities.Modules.ModuleController();
_mi = _mc.GetModule(auth.ModuleId, auth.TabId, true);

// set contextual info
HttpContext.Current.Items["UserInfo"] = auth.UserInfo;
HttpContext.Current.Items["PortalSettings"] = _ps;
}


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Offering an XML serviceOffering an XML service


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out