Category Archives: IIS

Enable error pages to the user

If you want to see error pages on IIS 7

1. Open the site truh the IIS manager
2. Selevt  ASP, and then “Debugging Properties”
3. Change the “Send Errors To Browser” to “True”, choose “Apply”
4. Go back to the site and choose “Error Pages”
5. Choose “Edit Feature Settings”
6. change the value to “Detailed errors”
7. select OK

Delete Logfiles on IIS

To delete log files the easy way you can create at schedule task that runs this:

To delete files:

c:\windows\system32\Forfiles.exe -p “C:\WINDOWS\system32\LogFiles\W3SVC1” -s -m *.log -d -14 -c “Cmd /C DEL @File”

Just to check that i works you can use this command in a CMD:

c:\windows\system32\Forfiles.exe -p “C:\WINDOWS\system32\LogFiles\W3SVC1” -s -m *.log -d -14 -c “Cmd /C ECHO @File”