Jump to content


Photo

Initialize fails on UPnPNATManager


  • Please log in to reply
3 replies to this topic

#1 dan m

dan m
  • Members
  • 2 posts
  • Gender:
    Male

Posted 08 June 2010 - 12:19 PM

[I am implementing the library on behalf of Blue Tahiti Software]

I am using the sample vb.net code and when I run it fails on the Initialize method call as below.

Dim objUPnP As sfFTPLib.UPnPNATManager
objUPnP = New sfFTPLib.UPnPNATManager
objUPnP.Initialize()

The stack trace is below. If someone could offer some wisdom as to why this is happening I'd greatly appreciate it.

regards,
dan

System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2147467259
Message=Error HRESULT E_FAIL has been returned from a call to a COM component.
Source=Interop.sfFTPLib
StackTrace:
at sfFTPLib.UPnPNATManagerClass.Initialize()
at BTS.PC.FTP.Init() in C:\Users\dmatthews\Local Projects\BTS.PC.Importer\BTS.PC.FTP\FTP.vb:line 184
at BTS.PC.FTP.SecureFTP(Object sourceFTPDirectory) in C:\Users\dmatthews\Local Projects\BTS.PC.Importer\BTS.PC.FTP\FTP.vb:line 51
at BTS.PC.Importer.FTPSender.SendFile(Object sender, FileSystemEventArgs e) in C:\Users\dmatthews\Local Projects\BTS.PC.Importer\FTPSender\FTPSender.vb:line 130
at System.IO.FileSystemWatcher.OnCreated(FileSystemEventArgs e)
at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String name)
at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
InnerException:

#2 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 08 June 2010 - 12:20 PM

There is probably no UPnP capable device available. Catch the exception and ignore it.

#3 dan m

dan m
  • Members
  • 2 posts
  • Gender:
    Male

Posted 08 June 2010 - 01:01 PM

There is probably no UPnP capable device available. Catch the exception and ignore it.

Thanks but when I ignore it I get an 'ftpErrorConnect' as LastError.

I have set the Host, Port, Username and Password and I can ping the target Host.

thanks,
dan

#4 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 08 June 2010 - 01:10 PM

Set the LogFile.File property. Then take a look at the generated log file.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users