Skip to main content

Enable NTFS or Win32 long paths policy to remove the 255-260 characters limit in Windows 10


If you’re a Windows developer, system administrator or seasoned user, there’s  good chance you’re fully aware of the 255-260 character limit of filesystem paths. However, in case you never heard about it, here’s a small recap of the issue:

In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is “D:\some 256-character path string<NUL>” where “<NUL>” represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.) [extract from this MSDN official guide].

If you’re a standard user, chances are you won’t get bothered by this limitation: who needs these long paths anyway? However, if you happen to be a developer working with linux-native package managers such as NPM, you will be struck by that issue sooner or later. That’s because there are many popular script-based libraries which make an intensive use of folder-nesting: AngularJS, Angular2, React and SystemJS, just to throw out some good examples. If you use them with Visual Studio 2015, which will adds their solution/project folder structure to the loop, the chance of hitting that limit will be even higher.



How to get rid of MailPoet’s automatic new users auto-subscribe feature (and make the 2000 subscribers limit work as it should)

If you’re a WordPress enthusiast you’ve probably heard about MailPoet, formerly WYSIJA: to say it in a nutshell, it’s a WordPress plugin for manage newsletters. It’s being used by thousands – if not millions – of WordPress-based websites worldwide, because it delivers a ton of useful newsletter-handling features which nobody else have.

I like MailPoet. I really do. I actively use it in a number of WordPress blog I’m running and/or in charge of, including this one. Some of them are small, some are big: for the bigger ones – thousands of users and subscribers – I even had the owner purchase the premium license, not only because a product that’s so good deserves it, yet also because… well, because they need to, as the free version license has a limit of 2000 subscribed users. There’s also an hard-coded limit that checks the counter, so if your blog grows you’ll eventually have to pay for that.

I really like MailPoet… except for one thing: the fact that they try their best to make you think you need to pay for their product, even if you clearly don’t.



Unable to launch the IIS Express Web server error on Visual Studio 2015 – How to fix it

Working with Visual Studio on recent Windows versions such as Windows 10 can be tricky, as the improved security settings of the new OS might create some issues on a developer machine, which often need to have access to some system files – expecially when working with IIS Express. We talked about that in a number of post, for example here (error accessing IIS Metabase), here (allow external requests from remote machines) and also here (Process with an ID #### error).

Here we’ll introduce another issue you might stumble upon while working with an ASP.NET Core or MVC solution, right after you try to execute it in debug mode:

Unable to launch the IIS Express Web server

There are many workaround that might fix this issue: we suggest to try them one after another, stopping only when you manage to fix it.



Process with an ID #### is not running on Visual Studio 2015 – How to fix it

If you’re working with Visual Studio on recent Windows versions, such as Windows 10, you might stumble upon the following error when trying to open an ASP.NET Core or MVC solution:

Process with an ID #### is not running on Visual Studio 2015

If you look to the Visual Studio error log window panel, you should also see something like that:

This is clearly an IISExpress error. It’s worth noting that the solution will still be launched in debug mode, but the web browser will be unable to connect to the application, giving the following permanent error:

Unable to launch the IIS Express Web server.

The start URL specified is not valid. https://localhost:#####/

There are many workaround that might fix this issue: we suggest to try them one after another, stopping only when you manage to fix it.



C# Class to Serialize and Deserialize Objects in XML and JSON for any ASP.NET project

Today we’re sharing a small helper which we built some years ago and yet we’re still using to handle most serialization/deserialization tasks within any of our ASP.NET active projects. The supported formats are XML and JSON, simply because we never needed anything else other than these two, but it can be easily extended to support anything else.

As you can see we’re talking about a simple static class filled with multiple “pairs” of related methods: the former one will serialize any object of type T  into a string, while the latter will deserialize it from the corresponding format. It’s worth noting that the serialize methods can also be used as extension methods, assuming the class namespace is properly referenced wherever we want to use it. The class can be used as part of any C# class library or directly included in any Web Forms, Windows Forms, MVC, WebAPI, .NET Core or any other C#-based project type.

Here’s a brief list of the methods included within the class:

  • SerializeObject / DeserializeObject
  • SerializeObjectUsingBinaryFormatter / DeserializeObjectUsingBinaryFormatter
  • SerializeToXML / DeserializeFromXML
  • SerializeToJson / DeserializeFromJson