Skip to main content

How to perform a SOAP Web Service Request in ASP.NET C# without using WSDL, proxy classes or SoapClient

If you are a well-seasoned ASP.NET Web Service developer you most certainly know about the SoapClient class and how it can be used to send SOAP messages using transport-independent protocols using two main methods:

  • The ASP.NET services, which is old way of doing SOA
  • The WCF framework, which is the “latest” and “newest” way to do that.

We already talked about these approaches in a couple posts some months ago (read here and here for further info). However, there could be some edge-case scenarios where you want (or need) to call a SOAP-based web service without using the WSDL and/or the Add Service Reference Visual Studio feature, maybe because you can’t possibly put the code bloat it produces into your code base.

When such need arises, the following helper class might be precisely what you’re looking for:

Read More

How to create a SOAP Web Service using ASP.NET WCF, Visual Studio and IIS 8+

As we recently wrote a few weeks ago in this older post, the most appropriate way to create a Web Service SOAP on ASP.NET is, by the end of 2016, to use the WCF Framework (acronym for Windows Communication Foundation): that’s a rather outdated architecture, yet it’s still preferable than the now more-than-obsolete ASMX pages.

In the above mentioned article, in addition to solving a specific problem related to the configuration of a WCF service on IIS8, we spent a few minutes reminding about the features of the architecture, proudly presented by Microsoft in October 2008 and then quickly removed from the spotlight to leave space for the Web API paradigm, with an exclusive focus on the REST-based Web Services. In this article we’ll summarize the steps needed to create a Web Service SOAP starting from scratch using the latest versions of the tools needed: Visual Studio (2012, 2013, 2015, or 2017 or later) and Internet Information Services (8 or later).

Read More

MediaWiki: Convert Pages and Categories to PDF Files with PdfBook extension (and HTMLDOC)

If you own a MediaWiki-based Wiki and you’re looking for a way to transform your pages to PDF files, look no further: the PdbBook extension has (almost) anything you need to do so. It even allows you to transform a whole category into a single PDF – just like the name implies! I personally found it incredibly useful, since I make a good use categories to organize many articles together, hence I can use that extension to conveniently “inflate” them into a kind of book. This extension allows such categories to be compiled into downloadable PDF files, together with a table of contents: each article forming the start of a new chapter; it also supports the sort-keys statements, so that they can be used to ensure that they are ordered properly within the “book”.

The only issue I found with this extension was installing it on Windows environments, where I still have some Wikis I have to manage: that’s the reason why I wrote this article – hoping that it will help those who’ll hit the same problems I had to overcome.

Read More

C# Random Password Generator for ASP.NET Core & ASP.NET MVC Identity Framework

Yesterday I had to create a C# method that creates a random generated password in C#. Before committing into it I spent some minutes surfing the web, trying to find something I could use. I stumbled upon this 2006 post from Mads Kristensen, which is a guy I seriously love for all the great work he did with some incredibly useful Visual Studio extensions such as Web Essentials, Web Compiler, ASP.NET Core Web Templates – and much more.

However, the function I found in that post didn’t help me much, because it had no way to ensure any strong-password requisite other than the minimum required length: more specifically, I need to generate password with at least one uppercase & lowercase letter, digit and non-alphanumeric character – and also a certain amount of unique characters. The random password generated against the Mads function could have them or not, depending on the randomness: that simply won’t do in my scenario, since I had to deal with the UserManager.CreateUserAsync(username, password)  method of the Microsoft.AspNetCore.Identity  namespace, which utterly crashes whenever the password isn’t strong enough.

Read More

Install & Enable AMP Auto Ads by AdSense Labs in Worpdress – How To

If you’re a Google AdSense user you will probably know about AdSense Lab, the incubator hosting those brand-new Ad-based features that aren’t yet ready to be rolled out to all AdSense publishers. The new deal these weeks is called AMP Auto Ads, a new family of advertising units that will be placed automatically within the AMP pages of our website/blog.

In the unlikely event you dont’ know what an AMP page is or if you never heard about the AMP Project, we strongly suggest to fill this huge SEO & accessibility gap by taking a look at the AMP Project’s official page.

The AMP Auto Ads feature is currently in beta and thus accessible only for those who are explicitly invited via e-mail from AdSense Lab. For additional info, read this official guide from Google AdSense. However, since you are here, there’s an high chance you already know everything about AMP Auto Ads and you’re looking for further info about how to properly implement them on your WordPress website or blog.

Read More