Issue 1
Consider the following scenario:
- You have the
FTP service installed in Internet Information Services (IIS)
6.0.
- You run the FTP service on Microsoft
Cluster service.
- You locate the FTP root on the physical disk resource
of Microsoft
Cluster service.
In this scenario, the file
change
notifications
that are generated here are lost and the cache is never cleared or updated.
Issue 2
Consider the following scenario. You overwrite a file by using a new file in a directory that has content that you are making available through Internet Information Services (IIS)
6.0. When you access the new file in this scenario, you notice that the contents of the file are the same as the contents of the original file.
Cause of Issue 1
When the FTP service starts, the passive node of the service cannot access the location of the FTP root directories on the physical disk resource. Therefore, the FTP service cannot register to receive file change notifications for the physical disk.
Cause of Issue 2
When the FTP service starts, the passive
node of the service cannot access the location of
the FTP root directories on the physical disk
resource. Therefore, the FTP service cannot be registered to receive file change notifications for the physical disk.
Method 1: Disable the file caching
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756Â
(http://kbalertz.com/Feedback.aspx?kbNumber=322756/
)
How to back up and restore the registry in Windows
To
disable file caching in the FTP Service in IIS 6.0, change the
DisableMemoryCache registry entry. To do this, follow these steps:
- Click Start, click Run,
type regedit, and then click OK.
- Locate and then click the following registry subkey:HEKY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InetInfo\Parameters
- Right-click Parameters, point to
New, and then click DWORD Value.
- In the New Value #1 box, type
DisableMemoryCache, and then press ENTER.
- Right-click DisableMemoryCache, and then
click Modify.
- In the Value data box, type 1, and then
click OK.
- Close Registry Editor, and then restart the
computer.
Method 2: Restart the FTP Service when the resource comes online
When a physical disk resource
on
the FTP root is
online,
restart the FTP service. If you want to do this automatically, change the
Online function of the Clusftp.svc
file to restart the FTP service automatically.
The
following is a sample script that restarts the FTP service when the resource
is
online.
Function Online()
Dim objWmiProvider
Dim objService
Dim strServiceState
' Check whether the service is running
Set objWmiProvider = GetObject("winmgmts:/root/cimv2")
Set objService = objWmiProvider.get("win32_service='msftpsvc'")
strServiceState = objService.state
If ucase(strServiceState) = "RUNNING" Then
Online = True
response = objService.StopService()
response = objService.StartService()
Else
' If the service is not running, try to start it. If it does not, log an error
response = objService.StartService()
' response = 0 or 10 indicates that the request to start was accepted
If (response <> 0) And (response <> 10) Then
Resource.LogInformation("The resource failed to come Online because the MSFTPSVC service is not running.")
Online = False
Else
Online = True
End If
End If
End Function
The
following is a sample script that stops the FTP service when the resource is offline.
Function Offline()
Dim objWmiProvider
Dim objService
Dim strServiceState
' Check whether the service is running
Set objWmiProvider = GetObject("winmgmts:/root/cimv2")
Set objService = objWmiProvider.get("win32_service='msftpsvc'")
strServiceState = objService.state
If ucase(strServiceState) = "RUNNING" Then
response = objService.StopService()
End If
Offline = True
End Function