Re: WebClient.UploadData()

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Alvin Bruney [MVP] (vapor)
Date: 03/10/04


Date: Tue, 9 Mar 2004 21:17:59 -0600

usually this kind of error indicates a problem resolving the path or url.
make sure the path is available and you have the appropriate access
permissions. it helps to configure iis to return friendly http messages
instead of the 500 error code. you can do this by going to
Tools/InternetOptions/Advanced and clearing the check mark

-- 
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Al Cadalzo" <cadalzo@hotmail.com> wrote in message
news:ejaJsXeBEHA.2348@TK2MSFTNGP09.phx.gbl...
> Alvin,
>
> No, I have not resolved this issue.
> On one execution it will fail, then I will rerun it and it will succeed
and
> I will get the page returned.
> I would say it fails about 70% of the time.
> I have reposted under a new subject line 'IO Exception: Cannot close
stream
> until all bytes are written.'
>
> Thanks,
> Al
>
> "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
> news:OKDqepdBEHA.2600@TK2MSFTNGP09.phx.gbl...
> > Your post went unanswered. Have you resolved this issue? If you still
need
> > help, please post the original question with your request.
> >
> > -- 
> > Regards,
> > Alvin Bruney [ASP.NET MVP]
> > Got tidbits? Get it here...
> > http://tinyurl.com/3he3b
> > "Al Cadalzo" <cadalzo@hotmail.com> wrote in message
> > news:u3%23fnUfAEHA.684@tk2msftngp13.phx.gbl...
> > > I'm using VS.Net v7.1.3052
> > >
> > > I'm using WebClient to do a POST:
> > > Here's a code snippet:
> > >
> > >
> > > (C#)
> > >
> > > Byte[] responseArray = null;
> > > try
> > > {
> > > responseArray = _webClient.UploadData(_curURL, "POST", byteArray);  <<
> > > Exception occurs here.
> > > _curPage = System.Text.Encoding.ASCII.GetString(responseArray);
> > > }
> > >
> > > In DEBUG mode with 'Break into the debugger' option turned on I get an
> IO
> > > Exception:
> > > 'Cannot close stream until all bytes are written.'
> > > Followed by a 'WebException':
> > > The RemoteServer returned an error (500) Internal Server Error.
> > > at System.Net.HttpWebRequest.CheckFinalStatus()
> > >
> > > Any ideas?
> > >
> > > Thanks,
> > > Al
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: WebClient.UploadData()
    ... usually this kind of error indicates a problem resolving the path or url. ... > On one execution it will fail, then I will rerun it and it will succeed ... > I have reposted under a new subject line 'IO Exception: ... >> Alvin Bruney ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Sweeney update
    ... seriously interested in resolving this puzzle, as some profess to be, ... Edward farming at Altnadague, right where one finds an older man of the ... Eamon Rua - Edward Sweeney identity. ... You fail to understand the ...
    (rec.heraldry)
  • MSBuild Error MSB3422
    ... The exception says: "The project is either missing from disk or access ... Task "ResolveNonMSBuildProjectOutput" skipped, due to false condition; ... Resolving VC project reference "..\MyProject.FinLib ... \v2.0.50727\Microsoft.Common.targets: warning MSB3422: The project is ...
    (microsoft.public.dotnet.general)
  • Re: Exception raised while resolving RootPOA
    ... Stefan Naewe wrote: ... the following exception is thrown, ... Exception raised while resolving the ...
    (comp.object.corba)
  • Re: Exception raised while resolving RootPOA
    ... klaritydefect@xxxxxxxxxxx schrieb: ... the following exception is thrown, ... Exception raised while resolving the ...
    (comp.object.corba)