7

I'm about to create a self-hosted Web API application, and somewhere I need to URL Decode the input. But I truly don't want to add a reference to System.Web.dll, because AMAIK, it's a heavy DLL and one of the main reasons of getting far from ASP.NET and IIS.

If I'm right, and I don't add a reference to System.Web, then how can I URL Decode effectively without bugs?

h.Ebrahimi
  • 87
  • 1
  • 7

1 Answers1

11

//.Net 4.0+

you can use WebUtility.UrlDecode(). It is not part of system.web.

And you can see this blog: Html and Uri String Encoding without System.Web

Anik Saha
  • 4,313
  • 2
  • 26
  • 41