Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2006

Tip: Looking for answers? Try searching our database.

Size of Request to Webservice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stanley Omega - 30 Sep 2006 11:00 GMT
Hello,

I have a webservice that has a max httpRequest size of 85kb. I do not want
to change this.

I have been reducing the size of my datasets that Im sending to the
webservice until they come in under 85kb....or so i thought. I am using
xmlwrite.length to get the length in bytes <85 but i have found that the xml
serializer can blow the actual size fo the data tranfered much higher. For
instance a 47kb data using my method can blow out to 120kb??? What is the
reccomnded way of calculating the size of the data to be transferred so that
it can pass httpLength restriction?

Thanks
Gaurav Vaish (www.EduJiniOnline.com) - 30 Sep 2006 20:10 GMT
> instance a 47kb data using my method can blow out to 120kb??? What is the
> reccomnded way of calculating the size of the data to be transferred so
> that

I don't think it would be possible before hand because of various reasons:

1. Namespace prefixes to be used would be unknown
2. Indentation needs to be taken care of
3. Encoding needs to be taken care of... though normally it's UTF-8.
4. You may not know what 'exact' data would be Xml-Serialized and their
namespaces (and may be new prefixes)...

Signature

Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.com
http://www.edujinionline.com
http://articles.edujinionline.com/webservices
-------------------

Stanley Omega - 01 Oct 2006 00:31 GMT
Thank you Gaurav.

I am very silly. I was working around an artificial restriction. I did not
want images being uploaded to my website beyond 85kb. I used
<httpRuntime maxRequestLength="85"/>

to enforce this. That meant i couldn't upload datasets bigger than 85kb. Now
that i actually think about it and the power of the dotNet framework, i can
just add another web.config to my webservices directory that overrides this
setting
<httpRuntime maxRequestLength="500"/>

And now I get to have my cake and eat it too.

Thanks

>> instance a 47kb data using my method can blow out to 120kb??? What is the
>> reccomnded way of calculating the size of the data to be transferred so
[quoted text clipped - 7 lines]
> 4. You may not know what 'exact' data would be Xml-Serialized and their
> namespaces (and may be new prefixes)...

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.