Skip navigation
Currently Being Moderated

Systematically killing ASP.NET's red-headed stepchild, the aspnet_client folder.

Oct 17, 2013 5:46 PM

For those of you who don't know the "pleasure", upon installing .NET on your server (we had to, a 3rd party app we need uses it), Microsoft sees fit to propagate a "aspnet_client" folder into the root of every site on IIS as well as randomly through each site's subdirectories.  Truly, if I find the person responsible for this imbecile-ry, the b*tch-slapping will be pride obliterating.

 

But that aside, I have created a scheduled task to find all instances of this folder for a directory and below (the web root) and to remove it.  Well, the problem is that doing a <cfdirectory> listing, even when just specifying "dir" for type and "aspnet_client" for the filter, ColdFusion takes over 30 seconds and times out before it can get a complete listing of where these folders exist.

 

Can anyone think of an alternate way to get a listing of these folder locations?  Maybe directly through Java for a faster reading?  I run this script every hour on the hour, and it's just been timing out and never running (and the 'aspnet_client' folders have come back.)  I know this is a band-aid solution, but scouring the net for solutions on how to keep .NET from creating these abominations throughout a server has yielded nothing.

 

At least CF has the decency to just create a 'CFIDE' and 'jakarta' vdir in the root of the sites you connect CF to.  THAT shows smart programming.  Microsoft on the other hand..... the other.... b*tch slappin hand....

 
Replies
  • Currently Being Moderated
    Oct 18, 2013 10:31 AM   in reply to Aegis Kleais

    I created a .bat file in the root directory to identitify and remove all "aspnet_client" subdirectories.  (These sub-directories appear to be created whenever there is a Windows update... so you shouldn't have to run it hourly.)

     

    c:\remove_aspnet_client.bat

    FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *aspnet_client*') DO RMDIR /S /Q "%%G"

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 18, 2013 11:54 AM   in reply to Aegis Kleais

    I'm also not that well versed with writing loops and exception filters using the command line.

     

    Maybe another option would be to occassionally + manually create a BAT file with a RMDIR command for each project to clean and leave out all non-.NET webroots.  (The sub-directory isn't not added automatically... so you would only have to run it after an update.)

     

    I use a Windows file manager called Total Commander (32/64 bit, Windows, free, awesome IMHO). It has a "Find Files" feature that allows the results to be fed back to the listbox. After the "aspnet_client" sub-directories are in the listbox, I use a command to "Copy Names with Path to Clipboard".  I copy them to a BAT file and add the RMDIR command in front of each directory listing.  (For help on RMDIR syntax, go to DOS and enter RMDIR /?)   You can also use CFDirectory's delete with the "recurse" option, but I prefer not impact or be dependent on ColdFusion if I can help it.  (We also tend to use nnCron instead of CFSchedule.)

     

    Total Commander   http://www.ghisler.com/

    nnCron   http://www.nncron.ru/

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points