Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7612787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:00:11+00:00 2026-05-31T02:00:11+00:00

First off, I’m not asking how to find the path or use the IO

  • 0

First off, I’m not asking how to find the path or use the IO classes, etc.

The issue I have is often when restarting my site in development from Visual Studio (2010) (Win7), it’s still clinging onto prior references to ASP.NET Temporary Internet Files, and I’ve found that once I delete them the problem goes away.

Manually deleting, I’ve found I must drill down multiple layers of subfolders and delete their contents before I can delete in the root folder.

I’ve tried to programmatically do the deletes with a little utility program, but get permissions errors (UnauthorizedAccessException), even when I run 1) from VS started as “Run as Administrator” or when kicking off my exe directly with “Run as Administrator”.

Anyone have a smoother answer than manually drilling to subfolders?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:00:12+00:00Added an answer on May 31, 2026 at 2:00 am

    This isn’t a solution per se, though the reason you can’t delete the files is because IIS or Cassini (the built-in Visual Studio web server) is putting a lock on them.

    Kill the application pool running the application if you’re using IIS, or close Visual Studio (or kill the ASP.NET server from its tray icon) if you’re using Cassini; then you can delete the root folder in the Temporary ASP.NET Files directory.

    Then just restart the application pool or Visual Studio (if you closed it) and you’re back to work!

    If you’re using IIS and it’s version 7 or greater, there’s a command line utility you can run to stop it:

    appcmd start apppool /apppool.name: DefaultAppPool
    

    It would be easier to just whip up a batch script to do it for you:

    @echo off
    appcmd stop apppool /apppool.name: DefaultAppPool
    del "C:\Windows\Microsoft.NET\Framework\vx.xxx.x\Temporary..." /f /q
    appcmd start apppool /apppool.name: DefaultAppPool
    

    If you’re using IIS 6.0 then here’s an answer with a PowerShell script to start and stop it. You could modify it to delete the temp folder while it’s working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off: I do not want to use JQuery, i know it would make
First off, I am using Windows XP. I have multiple hard drives and it
First off if you're unaware, samba or smb == Windows file sharing, \\computer\share etc.
First off, there's a bit of background to this issue available on my blog:
First off, let me start off that I am not a .net developer. The
First off, thank you to everyone on this site...it's been INCREDIBLY helpful in getting
First off, I'm not terribly experienced in XML. I know the very basics of
First off, I'm not a math guy, so large number precision rarely filters into
First off, I will say i've spent 6 hours on this topic and have
First off I am pretty new to C, so I probably just have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.