Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

Monday, March 10, 2008

Tarpitting IISFTP Service

If you have been running an FTP server on the internet for any amount of time at some point you have noticed hundreds or even thousands of errors in your System Event log with an Event ID of 100. In an attempt to stop these run the following command from the command prompt, but if you change the location of the script file put in the correct path for this to work.

eventtriggers /create /TR "Reset FTP Service" /TK C:\scripts\ResetFTP.bat /L System /EID 100 /SO MSFTPSVC /RU "system"

The batch file is very simple, I created mine in a folder I have on my drive called "Scripts" and named it ResetFTP.bat. The contents of the script are below.

net stop msftpsvc
ping -n 10 127.0.0.1
net start msftpsvc

Thats it! The script will run when someone enters the wrong username and password for a FTP session. It will effectively stop the server for 10 seconds (10 pings to localhost) and then restart the FTP service. On a side note it only works on Microsoft Windows 2003 Server (Windows XP) and later. Also does not work on Microsoft Windows 2000 Server as there is no "Eventtriggers" program native to Windows 2000.

Tuesday, December 18, 2007

App-Domain could not be created. Error: 0x80131902

Failed to execute request because the App-Domain could not be created. Error: 0x80131902
Event-ID: 1088
Source: ASP.NET 2.0.50727.0

I was getting this error in Event Viewer while trying to run a web app. This was fresh install of IIS, but on an older server. The problem is that after IIS is installed you need to re-install the .Net framework.

Step one is to un-install the .Net framework.
  • Open a Command Prompt
  • run "net stop w3svc"
  • cd %windir%\Microsoft.Net\Framework\v2.0.50727\
  • run "aspnet_regiis.exe -ua"
  • run "aspnet_regiis.exe -i "
  • run "net start w3svc"

aspnet_regiis.exe -r may have worked instead of the two step uninstall / reinstall based on it's discription but I didn't try that option.