Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Http error 404 on transmitting big data

Reply
Thread Tools

Http error 404 on transmitting big data

 
 
hhp
Guest
Posts: n/a
 
      05-23-2008
Hi,

I have a web service with a method like:

public string InsertData(string type, byte[] content)
{ ... }

and a client which calls the method similar to:

using (BinaryReader reader=new BinaryReader(new FileStream(name,..)))
{
byte[] data = reader.ReadBytes((int) reader.BaseStream.Length);
webSvr.InsertData("file", data);
}


It's all ok but the data of content exceeds about 4 MByte of size. Then the
client gets an 404 http error. It's the same on XP and Vista.

What could happen here? Thanks in advance for any help.
Harald Pitro



 
Reply With Quote
 
 
 
 
Arnout Grootveld
Guest
Posts: n/a
 
      05-25-2008
=?Utf-8?B?aGhw?= <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> I have a web service with a method like:
>
> public string InsertData(string type, byte[] content)
> { ... }
>
> and a client which calls the method similar to:
>
> using (BinaryReader reader=new BinaryReader(new FileStream(name,..)))
> {
> byte[] data = reader.ReadBytes((int) reader.BaseStream.Length);
> webSvr.InsertData("file", data);
> }
>
> It's all ok but the data of content exceeds about 4 MByte of size.
> Then the client gets an 404 http error. It's the same on XP and Vista.


Check out the maxRequestLength attribute of httpRunTime (Web.config). This
defaults to 4 MB.


--
Arnout.
 
Reply With Quote
 
 
 
 
Joy
Guest
Posts: n/a
 
      05-26-2008
Hi,
You will need to add this Key in your Web.config:

<maxRequestLength = "YourValue">

Where YourValue = numeric value signifying the size in KB

regards,
Joy

"Arnout Grootveld" wrote:

> =?Utf-8?B?aGhw?= <(E-Mail Removed)> wrote in
> news:(E-Mail Removed):
>
> > I have a web service with a method like:
> >
> > public string InsertData(string type, byte[] content)
> > { ... }
> >
> > and a client which calls the method similar to:
> >
> > using (BinaryReader reader=new BinaryReader(new FileStream(name,..)))
> > {
> > byte[] data = reader.ReadBytes((int) reader.BaseStream.Length);
> > webSvr.InsertData("file", data);
> > }
> >
> > It's all ok but the data of content exceeds about 4 MByte of size.
> > Then the client gets an 404 http error. It's the same on XP and Vista.

>
> Check out the maxRequestLength attribute of httpRunTime (Web.config). This
> defaults to 4 MB.
>
>
> --
> Arnout.
>

 
Reply With Quote
 
hhp
Guest
Posts: n/a
 
      05-26-2008
Hi Joey, hi Arnout,

many thanks for your help! I'll give it a try.

Regards,
Harald Pitro


"Joy" wrote:

> Hi,
> You will need to add this Key in your Web.config:
>
> <maxRequestLength = "YourValue">
>
> Where YourValue = numeric value signifying the size in KB
>
> regards,
> Joy
>
> "Arnout Grootveld" wrote:
>
> > =?Utf-8?B?aGhw?= <(E-Mail Removed)> wrote in
> > news:(E-Mail Removed):
> >
> > > I have a web service with a method like:
> > >
> > > public string InsertData(string type, byte[] content)
> > > { ... }
> > >
> > > and a client which calls the method similar to:
> > >
> > > using (BinaryReader reader=new BinaryReader(new FileStream(name,..)))
> > > {
> > > byte[] data = reader.ReadBytes((int) reader.BaseStream.Length);
> > > webSvr.InsertData("file", data);
> > > }
> > >
> > > It's all ok but the data of content exceeds about 4 MByte of size.
> > > Then the client gets an 404 http error. It's the same on XP and Vista.

> >
> > Check out the maxRequestLength attribute of httpRunTime (Web.config). This
> > defaults to 4 MB.
> >
> >
> > --
> > Arnout.
> >

 
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
transmitting raw data vs. tree-structured data Max You Ruby 2 06-19-2010 09:06 PM
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net 0 12-26-2008 09:29 AM
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net Web Controls 0 12-26-2008 06:11 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Python 0 12-24-2008 07:35 AM
transmitting XML files vs. binary data Aleksej C++ 5 09-10-2006 09:39 AM



Advertisments