8

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?

0

1 Answer 1

9

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.

3
  • 6
    The folder seems to appear after windows updates has been installed, so on our web servers I've added a scheduled task which runs aspnet_regiis.exe -ea when WindowsUpdateClient logs EventID 19. Hopefully this will be a good workaround until someone finds a permanent fix.
    – Sense545
    Oct 13, 2014 at 8:31
  • Good idea, @Sense545! It's logged to the System log to save others wondering.
    – EM0
    Sep 21, 2018 at 12:42
  • I found that the folder is also created when installing a new .NET Framework version, which does not log Event 19. I have now set the scheduled task to run on startup as well.
    – EM0
    Nov 28, 2018 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.