Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent aspnet_client folder being added to .NET sites

Tags:

asp.net

Yes, other questions here dive into the why. I know why the folder is added. But I haven't seen this question answered:

How do I make sure the aspnet_client is never added to my .net sites, EVER?

like image 298
Martin Kool Avatar asked Oct 27 '10 09:10

Martin Kool


1 Answers

Check out the MSDN documentation on the ASP.NET IIS Registration Tool (Aspnet_regiis.exe). There's an e and ea command line switch you should be able to use to clean it up after the fact.

You can use Aspnet_regiis.exe to install and remove system client-side script, such as script for client-side validation. Use the -c option to install client script for the version of ASP.NET that is associated with the tool. (Script is installed in the Aspnet_client subdirectory of each IIS site directory.) To remove the client-side script for just the ASP.NET version that is associated with the tool, use the -e option. To remove the client-side script for all installed versions of ASP.NET, use the -ea option.

(Emphasis added.)

Unfortunately, even the .NET 4 installer adds this directory, so clean-up will continue to be required.

like image 183
James Skemp Avatar answered Nov 14 '22 23:11

James Skemp