473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

vbFTPClient - kb article 812404

Hi

I've downloaded the vbFTPClient mentioned in kb article 812404, but I'm not
able to run it

It seems that the problem occurs in the main function, when trying to
convert from WebRequest to FtpWebRequest,

Dim ftp As FtpWebRequest

Try

ftp = Convert.ChangeType(w, GetType(FtpWebRequest))

'the gettype won't work !!

Catch

ftp = Nothing

End Try
any advice would be nice :-)
Arne

Nov 20 '05 #1
4 2187
* "Arne" <do*****@microsoft.com> scripsit:
I've downloaded the vbFTPClient mentioned in kb article 812404, but I'm not
able to run it

It seems that the problem occurs in the main function, when trying to
convert from WebRequest to FtpWebRequest,

Dim ftp As FtpWebRequest

Try

ftp = Convert.ChangeType(w, GetType(FtpWebRequest))

'the gettype won't work !!


"Doesn't work"? Please be more specific.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
When I activate the sample with parms. then at this points it gives a not
handled exception. This is due to the fact that the ftp variable equals
nothing, due to the code in my snippet.

The whole suspected part of code says: when reaching ftp.passive it comes up
with an unhandled exception
I guess the problem have something to do with the GetType(FtpWebRequest)
command ??
Arne

Dim w As WebRequest = WebRequest.Create(szUri)

w.Method = szMethod

Dim ftp As FtpWebRequest

Try

ftp = Convert.ChangeType(w, GetType(FtpWebRequest))

Catch

ftp = Nothing

End Try

ftp.Passive = fPassive
If I do a gettype(ftpwebrequest) in debug (immediate window) it says :
?gettype(FtpWebRequest)

Type 'FtpWebRequest' is not defined.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2h************@uni-berlin.de...
* "Arne" <do*****@microsoft.com> scripsit:
I've downloaded the vbFTPClient mentioned in kb article 812404, but I'm not able to run it

It seems that the problem occurs in the main function, when trying to
convert from WebRequest to FtpWebRequest,

Dim ftp As FtpWebRequest

Try

ftp = Convert.ChangeType(w, GetType(FtpWebRequest))

'the gettype won't work !!


"Doesn't work"? Please be more specific.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3
* "Arne" <do*****@microsoft.com> scripsit:
When I activate the sample with parms. then at this points it gives a not
handled exception. This is due to the fact that the ftp variable equals
nothing, due to the code in my snippet.

The whole suspected part of code says: when reaching ftp.passive it comes up
with an unhandled exception
What exception? Please post the exact message.
If I do a gettype(ftpwebrequest) in debug (immediate window) it says :
?gettype(FtpWebRequest)

Type 'FtpWebRequest' is not defined.


Maybe you missed a namespace?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4
Hi Herfried,
when it tries to access the ftp property (ftp.passive) it says that there
isn't an instance of the object (thats because the ftp variable is nothing),
so thats understandable.

I don't see how It can be anything with the namespace, as It accept the
declarence of a variable of that type
- dim ftp as ftpWebRequest

I'va digged a bit more :-)
The fptwebrequest is placed in a module and if i use the modulename in front
of the class the gettype works (thats new to me, that this is needed)

I've also implemented an errorhandler and now It says that the "Object must
implement IConvertible"

As stated earlier, it's a MS Sample I downloaded (without any changes from
my side) so It's supprisingly to me that it hasn't been tested (or could it
relate to my system ???)

Arne

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2h************@uni-berlin.de...
* "Arne" <do*****@microsoft.com> scripsit:
When I activate the sample with parms. then at this points it gives a not handled exception. This is due to the fact that the ftp variable equals
nothing, due to the code in my snippet.

The whole suspected part of code says: when reaching ftp.passive it comes up with an unhandled exception


What exception? Please post the exact message.
If I do a gettype(ftpwebrequest) in debug (immediate window) it says :
?gettype(FtpWebRequest)

Type 'FtpWebRequest' is not defined.


Maybe you missed a namespace?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Bedford | last post by:
Hello, I've a search engine on my e-commerce website that returns 10 articles per page. Actually, the customer may make a search, click on any article result then come back to the list and click...
55
by: Cindy | last post by:
Hello!! I'm new at access and there's is an article by Arvin Meyer for beginners that is references in Google Groups but I can't seem to find the original post with the article's URL. Does anyone...
8
by: Will Chamberlain | last post by:
I came across a rather interesting article this morning and thought I'd share. We all know that Visual Studio is a great IDE, but I think we can all agree that it is adds a dramatic change to how...
0
by: dantan98 | last post by:
Hello, all! I am hoping you can help me. I am trying to find an online article about transferring an image via a web service. It involves encoding on one end into a byte stream, passing it to...
7
by: prateekbtbl | last post by:
Hi Friends, I am new in PHP/MySQL, i am developing article managemenst system for my assignment. Where in the members of the site after registering under different packages will allow to view...
0
by: intellaguy | last post by:
If you are interested in submitting content to article directories you are not alone. But of course, before you can do this you need to learn the submission process. This is a simple process to...
4
by: moswald | last post by:
I've been searching for a specific article for awhile now. About two years ago (maybe longer) there was an article in the C/C++ User's Journal that compared the performances of various stl...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.