473,473 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IWebRequestCreate

Hi Group

My FTP problem again.

I have a FTP class that can connect to a server with username and
password and so on.

I want to make this class available for a WebRequest like
HttpWebRequest i now wanne make a FtpWebRequest class. To do what I
need to make an Interface for my ftp class:

public class ftp : IWebRequestCreate
{
public string FtpCmd(string cmd)
{
string reply = "";
// my ftp connection and executing stuff
return reply;
}

public WebRequest Create(Uri uri)
{
return null; // It says by default
}
}

I know I must return a WebRequest from the Create method but it's a
FTP request which is not shipped with the Framework. So I have to
Register my own Prefix but what method and what would that look like ?

----------------------------------
This ?
----------------------------------

public WebRequest Create(Uri uri)
{

if (WebRequest.RegisterPrefix("ftp",this.ftp))
{
WebRequest wreq = new
WebRequest.Create("ftp://me:xxx@localhost");
}
else
{
return null;
}

}

Any help is appreciated I was lost reading the docs on
IWebRequestCreate

/- Kevin -\
Nov 22 '05 #1
2 2504
Cor
Hi Kevin,

Did you already look here, not that I know it is your solutions, but because
it is so hard to find on MSDN.

Microsoft webrequest
http://support.microsoft.com/default...b;EN-US;812409

Cor
Nov 22 '05 #2
"Cor" <no*@non.com> wrote in message news:<e8**************@TK2MSFTNGP11.phx.gbl>...
Hi Kevin,

Did you already look here, not that I know it is your solutions, but because
it is so hard to find on MSDN.

Microsoft webrequest
http://support.microsoft.com/default...b;EN-US;812409

Cor


Thx Cor

I'll take a look - it seems the perfect match though :)

/- Kevin -\
Nov 22 '05 #3

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

Similar topics

3
by: Kevin Steffer | last post by:
Hi group I have a webform which I want to make an ftp connection for a filetransfer from. The thing is when I use the WebRequest class it says "The URI prefix is not recognized" and my URI is...
2
by: Kevin Steffer | last post by:
Hi Group My FTP problem again. I have a FTP class that can connect to a server with username and password and so on. I want to make this class available for a WebRequest like...
5
by: Michael Rodriguez | last post by:
Can anyone please translate the following VB.NET code to C# for me? Imports System.Net Public Class NoKeepAliveHttpWebRequestCreate Implements IWebRequestCreate Overridable Overloads Function...
2
by: news.microsoft.com | last post by:
Hello I try to implement "retry" if connection to web ends with "time out". I want to give a chance to prolong waiting for response. The following code is taken from WebRequest.GetResponse()...
4
by: Sathyaish | last post by:
The WebRequest class implements IWebRequestCreate and hence, a method Create. This method has two other overloads, one of which is a private method. Here's how it looks: public static...
7
by: Mark Rae | last post by:
Hi, Has anyone successfully used the FTP stuff in the System.Net namespace against a VMS FTP server? I'm trying to do this at the moment and can't even get a directory listing, although there...
4
by: Morgan Cheng | last post by:
Days ago, I post a question on how to make SoapHttpClientProtocol instance make new TCP connection for each web service request. Now, I found how. SoapHttpClientProtocol has a protected method...
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
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...
1
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,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.