Blogs

Neat way to consume web services in DotNetNuke

Jan 17

Written by:
17 January 2012 14:22 

DotNetNuke and web services, they were simple back in the day but things have changed in the .NET framework.

For Web Services mostly you will be told to modify the web.config which for me is a not very nice and another thing to manage when you are deploying your module. With a few lines this can be done in code and is my preferred solution.

One thing to remember is that when you add a Web Reference to your project the IDE will add a web.config file for you. It is not needed for this type of solution and can be deleted.

VB (because it is not dead)

Dim binding As New System.ServiceModel.BasicHttpBinding

Dim endpoint As New System.ServiceModel.EndpointAddress("http://URLTo/TheWebService.asmx")

Dim AliasAdmin As New svcAliasAdminSoapClient(binding, endpoint)

C#

BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();

EndpointAddress endpoint = new System.ServiceModel.EndpointAddress("http://URLTo/TheWebService.asmx");

svcAliasAdminSoapClient AliasAdmin = new svcAliasAdminSoapClient(binding, endpoint);

Note: this is just your basic start point but will get you up and running.

Tags:
Categories: Development

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 

Comments

Re: PageSearch module Finished
Wow! Thank you!
Re: PageSearch module Finished
I read above content it is very informative
Re: Public Release of PageSearch Module for DotNetNuke
Interesting article.
website directory
Subzero Solutions >About Us >Company >Blog - PageSearch module Finished
# website directory
Re: PageSearch module Finished
What a fabulous post this has been.I am grateful to you and expect more number of posts like these. Thank you very much.
SEO Expert India | SEO Freelancer India
Re: PageSearch module Finished
Hello Leigh,
It's a great job. I would be pleased to receive a copy of the module to install it on my web site and collect feedback from my customers.
Sincerely,
Bertrand.
Re: DotNetNuke 3D Flags
the language skinobject allows you to use your own location for flagimages, so they won't be overwritten on upgrades. See this blog post for more info on how to use the language skinobject: www.dotnetnuke.com/Resources/Blogs/EntryId/1957/The-Language-SkinObject-explained.aspx

Search