Popular Posts

Sunday, December 28, 2008

No network provider accepted the given network path

Unable to map network drives using windows scripting host object model. Possible resolutions:
  1. Run “sfc /scannow”
  2. Check Make sure you are able to ping the Workstation by FQDN
  3. Check File and Print Sharing For Microsoft Networks From Properties of Local Area Connection are enabled.
  4. Switch share resource definition from \\computername\sharename to \\ipaddress\sharename (http://aplawrence.com/Forum/TonyLawrence2.html)
  5. Check workstation service on client and server service on server (and their dependent services) are running. (http://www.chicagotech.net/troubleshooting/systemerror67.htm). It worked for me after the Net Logon, Messenger,Computer Browser,Distributed File System, Remote Procedure Call Services were restarted. As good as a reboot!

For now OK, but what should be the permanent solution ? GOK.


Saturday, December 27, 2008

Time Stamped File Names

This worked for me to generate files with timestamp as part of the name.

dim TimeStampedFileName as string = Now.ToString("MMMddyyyy_HHmmss") & ".log"

Windows Service Timer Fires only once

Problem Script

Public Class FileTransferAgentService

Protected Overrides Sub OnStart(ByVal args() As String)
Dim FTATimer As System.Threading.Timer
Const timerInterval As Integer = 60000
Dim timerDelegate As Threading.TimerCallback = AddressOf EventAction
FTATimer = New System.Threading.Timer(timerDelegate, Me, timerInterval, timerInterval)
EventLog.WriteEntry("FTA started.")
End Sub

:
:
:
End Class


Solution Script: Delcare the Timer thread as Global to the Class:

Public Class FileTransferAgentService

Dim FTATimer As System.Threading.Timer
Const timerInterval As Integer = 60000
Dim timerDelegate As Threading.TimerCallback = AddressOf EventAction

Protected Overrides Sub OnStart(ByVal args() As String)
FTATimer = New System.Threading.Timer(timerDelegate, Me, timerInterval, timerInterval)
EventLog.WriteEntry("FTA started.")
End Sub

:
:
End Class
Vista Home Edition Issues encountered when installing a windows service created by visual studio 2008

  1. Could not find the InstallUtil.exe - Check %WinDir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe
  2. Error Message: no public installers with the runinstallerattribute.yes - Add installers to the Windows service project. (Right click on the service project design page and add installers)
  3. Access denied when installing the service. - Create a short cut to cmd.exe and run it as administrator.
  4. No mapping between account names and security IDs was done - Check the user account selected for running service exists. The message is Greek version of saying "Account does not exist"