Click here to Skip to main content
15,924,679 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Luc Pattyn15-Jan-09 6:18
sitebuilderLuc Pattyn15-Jan-09 6:18 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Brady Kelly15-Jan-09 6:41
Brady Kelly15-Jan-09 6:41 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Luc Pattyn15-Jan-09 6:46
sitebuilderLuc Pattyn15-Jan-09 6:46 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Brady Kelly15-Jan-09 7:07
Brady Kelly15-Jan-09 7:07 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Luc Pattyn15-Jan-09 7:28
sitebuilderLuc Pattyn15-Jan-09 7:28 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Brady Kelly15-Jan-09 10:38
Brady Kelly15-Jan-09 10:38 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Luc Pattyn15-Jan-09 10:52
sitebuilderLuc Pattyn15-Jan-09 10:52 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Brady Kelly15-Jan-09 11:20
Brady Kelly15-Jan-09 11:20 
Luc Pattyn wrote:
whatever offers access without an account


I just tried the below code on "ftp.microsoft.com" and got the same exception, but not before some console output, i.e:
deskapps
KBHelp
MISC1
Products
ResKit
Softlib


FtpWebRequest req = (FtpWebRequest)FtpWebRequest.Create("ftp://ftp.microsoft.com");
req.Proxy = null;
req.Method = WebRequestMethods.Ftp.ListDirectory;

using (FtpWebResponse res = (FtpWebResponse)req.GetResponse())
{
    StreamReader sr = new StreamReader(res.GetResponseStream(), Encoding.UTF8);
    string fileName;
    do
    {
        fileName = sr.ReadLine();
        Console.WriteLine(sr.ReadLine());
    }
    while (fileName != null);
}

GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Luc Pattyn15-Jan-09 11:54
sitebuilderLuc Pattyn15-Jan-09 11:54 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Brady Kelly15-Jan-09 12:06
Brady Kelly15-Jan-09 12:06 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Luc Pattyn15-Jan-09 12:47
sitebuilderLuc Pattyn15-Jan-09 12:47 
GeneralI suspect the problem is solved Pin
Luc Pattyn15-Jan-09 12:07
sitebuilderLuc Pattyn15-Jan-09 12:07 
GeneralRe: I suspect the problem is solved Pin
Brady Kelly15-Jan-09 22:16
Brady Kelly15-Jan-09 22:16 
GeneralRe: I suspect the problem is solved Pin
Luc Pattyn16-Jan-09 0:58
sitebuilderLuc Pattyn16-Jan-09 0:58 
GeneralRe: I suspect the problem is solved Pin
Brady Kelly16-Jan-09 1:57
Brady Kelly16-Jan-09 1:57 
GeneralRe: I suspect the problem is solved Pin
Luc Pattyn16-Jan-09 2:08
sitebuilderLuc Pattyn16-Jan-09 2:08 
GeneralRe: Cannot access a disposed object: Object name: ‘System.Net.Sockets.NetworkStream’. Pin
Brady Kelly15-Jan-09 6:44
Brady Kelly15-Jan-09 6:44 
GeneralRe: Textboxes Pin
Luc Pattyn15-Jan-09 6:53
sitebuilderLuc Pattyn15-Jan-09 6:53 
Questioncontrol.focus();???? Pin
bfis10813714-Jan-09 22:47
bfis10813714-Jan-09 22:47 
AnswerRe: control.focus();???? Pin
Eddy Vluggen14-Jan-09 23:04
professionalEddy Vluggen14-Jan-09 23:04 
GeneralI found the solution Pin
bfis10813714-Jan-09 23:12
bfis10813714-Jan-09 23:12 
QuestionWithevents for dynamicly created controls Pin
David Hovey14-Jan-09 17:16
David Hovey14-Jan-09 17:16 
GeneralRe: Withevents for dynamicly created controls Pin
Anshumas14-Jan-09 17:52
Anshumas14-Jan-09 17:52 
AnswerRe: Withevents for dynamicly created controls Pin
Dave Kreskowiak14-Jan-09 18:00
mveDave Kreskowiak14-Jan-09 18:00 
GeneralRe: Withevents for dynamicly created controls Pin
David Hovey16-Jan-09 8:17
David Hovey16-Jan-09 8:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.