Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > using File.Copy to copy files to shared hosting site

Reply
Thread Tools

using File.Copy to copy files to shared hosting site

 
 
Steve Richter
Guest
Posts: n/a
 
      04-18-2005
can File.Copy be use to copy files from my PC to the file system at my
shared hosting web site? If so, what is the format of the path name of
the file on the web site?

The idea being that if I login to my ftp site, any subsequent File.Copy
commands will not require server authentication.

this fails - invalid string format:
string source = "c:\\src#\\appl\\bin\\Debug\\orders.dll" ;
string dest = "ftp://(E-Mail Removed)/WineStore/orders.dll" ;
System.IO.File.Copy( source, dest, true ) ;

this did not work either:
string source = "c:\\src#\\appl\\bin\\Debug\\orders.dll" ;
string dest = "//www.domain.com/WineStore/orders.dll" ;
System.IO.File.Copy( source, dest, true ) ;

thanks,
-Steve

 
Reply With Quote
 
 
 
 
Wessel Troost
Guest
Posts: n/a
 
      04-18-2005
> string dest = "ftp://(E-Mail Removed)/WineStore/orders.dll" ;

What happens when you put this string in the address bar of Windows
Explorer?

Explorer uses the same mechanism to connect to the site, so you should make
sure this works first.

By the way, you can use a password like this:
ftp:://user(E-Mail Removed)

Greetings,
Wessel
 
Reply With Quote
 
 
 
 
Steve Richter
Guest
Posts: n/a
 
      04-18-2005

Wessel Troost wrote:
> > string dest = "ftp://(E-Mail Removed)/WineStore/orders.dll" ;

>
> What happens when you put this string in the address bar of Windows
> Explorer?


it works. only I have to leave off the file name at the end:
ftp://username(E-Mail Removed)/WineStore/bin

IE does not like the back slash in the address bar however. Only
forward slash works for me.

> Explorer uses the same mechanism to connect to the site, so you

should make
> sure this works first.
>
> By the way, you can use a password like this:
> ftp:://user(E-Mail Removed)


this works, so I am sure the format of the from path is ok.
string source, dest ;
source = "c:\\src#\\abc\\bin\\Debug\\orders.dll" ;
dest = "c:\\src#\\abc\\bin\\Debug\\orders.dll" ;
System.IO.File.Copy( source, dest, true ) ;

this does not:
source = "c:\\src#\\abc\\bin\\Debug\\orders.dll" ;
dest = "ftp://username(E-Mail Removed)/WineStore/bin/orders.dll"
;
System.IO.File.Copy( source, dest, true ) ;

here is the error:
System.NotSupportedException occured in mscorlib.dll
additional information: the given path's format is not supported

thanks for the help,
-Steve


>
> Greetings,
> Wessel


 
Reply With Quote
 
Wessel Troost
Guest
Posts: n/a
 
      04-18-2005
> the given path's format is not supported
>

Maybe it's telling you that the "FTP://" style URL is not supported in
..NET. At any rate, I found a KB article that explains FTP under .NET.
Perhaps it is of use to you, it certainly contains an alternative way of
transferring the file:

http://support.microsoft.com/?scid=kb;EN-US;832679

It does seem awfully complex.

Greetings,
Wessel
 
Reply With Quote
 
Steve Richter
Guest
Posts: n/a
 
      04-18-2005

Wessel Troost wrote:
> > the given path's format is not supported
> >

> Maybe it's telling you that the "FTP://" style URL is not supported

in
> .NET. At any rate, I found a KB article that explains FTP under

..NET.
> Perhaps it is of use to you, it certainly contains an alternative way

of
> transferring the file:
>
> http://support.microsoft.com/?scid=kb;EN-US;832679


wow! a full ftp socket program written in vb.net.

thanks for the help

-Steve

>
> It does seem awfully complex.
>
> Greetings,
> Wessel


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Hosting, Reseller Hosting, and Dedicated Hosting!!!!!! teo1991 Ruby 0 04-02-2009 01:50 PM
Web Hosting, Reseller Hosting, and Dedicated Hosting!!!!!! ufi02 ASP .Net 0 03-27-2009 07:49 PM
Best practices for using forms authentication and security in a hosted env (was: Re: Using a Forms authentication in a shared hosting environment) JEFF ASP .Net 1 11-12-2007 07:00 PM
Using a Forms authentication in a shared hosting environment JEFF ASP .Net Web Controls 2 11-12-2007 07:00 PM
FileIOPermission Erro using referenced dll on shared hosting brian@norman.org ASP .Net 4 05-31-2006 06:54 PM



Advertisments