473,769 Members | 6,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WCF Byte Array Limitation in XBAP

I observed that WCF client running inside Full Trust mode XBAP application
can't read byte array over 16384. If return result is bigger than that size,
then client simply get null or Nothing in VB and there are no exceptions. I
have tried increasing limits on both client and server. Here is a typical
entry:

<binding name="myBasicHt tpBinding"
maxBufferSize=" 2097152" maxBufferPoolSi ze="8388608"
maxReceivedMess ageSize="209715 2"
transferMode="B uffered">
<readerQuotas maxDepth="32" maxStringConten tLength="209715 2"
maxArrayLength= "2097152"
maxBytesPerRead ="3097152"
maxNameTableCha rCount="2097152 " />
</binding>

I also tried changing to transferMode="s tream".

I have found that WCF call would work when XBAP is started from Visual
Studio 2008. WCF client would not work if started when deployed to IIS
server. I also experimented with presentationhos t.exe invocations. Here are
results:

Call works:

presentationhos t.exe -debug -debugSecurityZo neURL http://myhostname
"C:\fullpath\bi n\Debug\app.xba p"

Call returns null:

presentationhos t.exe http://myhostname/virtualDir/version/app.xbap

In the end I gave up and decided to try out returning String. I had no
problem with large size strings. So, for the moment I seem to have only one
option and that is to return Base64Encoded string. It seems like a waste.

So, how do I configure WCF to transmit large byte arrays? The goal I have
here is to send large binary file from server to XBAP client.

I am also concerned that this limitation affects all types of arrays. I've
seen somewhere that I can configure some behavior attribute related to byte
array size, so may be that is the answer...

Jun 27 '08 #1
3 3612
Hi lzorich,

From your description you're using WCF for remote commucation in a WPF
XBAP application. However, you found that when the size of the data sent
exceed a certain amount, the client-side can not receive the data without
any explicit error, correct?

Based on my experience, there are some common data receive/send issue which
is due to the maxReceiveBuffe r size or send size and it will result
explicit error. As for the problem, are you encountering it in this
particular project only or even if you try calling the wcf service in a
simple console project?

Also, have you tried using some network trace utility to see whether the
actual data has been arrived the client-side over http channel?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: =?Utf-8?B?SXpvcmljaA= =?= <Iz*****@nospam .nospam>
Subject: WCF Byte Array Limitation in XBAP
Date: Mon, 21 Apr 2008 10:00:01 -070

I observed that WCF client running inside Full Trust mode XBAP application
can't read byte array over 16384. If return result is bigger than that
size,
then client simply get null or Nothing in VB and there are no exceptions. I
have tried increasing limits on both client and server. Here is a typical
entry:

<binding name="myBasicHt tpBinding"
maxBufferSize=" 2097152" maxBufferPoolSi ze="8388608"
maxReceivedMess ageSize="209715 2"
transferMode="B uffered">
<readerQuotas maxDepth="32" maxStringConten tLength="209715 2"
maxArrayLength= "2097152"
maxBytesPerRead ="3097152"
maxNameTableCha rCount="2097152 " />
</binding>

I also tried changing to transferMode="s tream".

I have found that WCF call would work when XBAP is started from Visual
Studio 2008. WCF client would not work if started when deployed to IIS
server. I also experimented with presentationhos t.exe invocations. Here are
results:

Call works:

presentationhos t.exe -debug -debugSecurityZo neURL http://myhostname
"C:\fullpath\bi n\Debug\app.xba p"

Call returns null:

presentationhos t.exe http://myhostname/virtualDir/version/app.xbap

In the end I gave up and decided to try out returning String. I had no
problem with large size strings. So, for the moment I seem to have only one
option and that is to return Base64Encoded string. It seems like a waste.

So, how do I configure WCF to transmit large byte arrays? The goal I have
here is to send large binary file from server to XBAP client.

I am also concerned that this limitation affects all types of arrays. I've
seen somewhere that I can configure some behavior attribute related to byte
array size, so may be that is the answer...
Jun 27 '08 #2
Hi Lzorich,

Have you got any progress on this issue?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

From: st*****@online. microsoft.com (Steven Cheng [MSFT])
Organization: Microsoft
Date: Tue, 22 Apr 2008 09:10:27 GMT
Subject: RE: WCF Byte Array Limitation in XBAP
Hi lzorich,

From your description you're using WCF for remote commucation in a WPF
XBAP application. However, you found that when the size of the data sent
exceed a certain amount, the client-side can not receive the data without
any explicit error, correct?

Based on my experience, there are some common data receive/send issue which
is due to the maxReceiveBuffe r size or send size and it will result
explicit error. As for the problem, are you encountering it in this
particular project only or even if you try calling the wcf service in a
simple console project?

Also, have you tried using some network trace utility to see whether the
actual data has been arrived the client-side over http channel?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
Jun 27 '08 #3
Hi:

Could you elaborate on the alternative solution you have suggested?
I have a Silverlight client that uses a WCF service. On my dev machine, like you mentioned, everything works good. On production it just doesn't work. So, I tried your "encoding" idea, but failed implementing it. Can you help?

Thanks

--tolga
Jun 27 '08 #4

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

Similar topics

1
4121
by: MMA | last post by:
Can an WBA/XBAP directly make a call to database server or does it need to go through the WS? Thanks in Advanec
30
3982
by: nano2k | last post by:
Hi I need an efficient method to convert a string object to it's byte equivalent. I know there are LOTS of methods, but they lack in efficiency. All methods allocate new memory to create the byte array. Of course, when memory allocation occurs, then naturally extra processing power is needed. To more explicit, MFC introduced a super-efficient method of dealing with this situation. As far as I remember (I switched from MFC to .NET few...
20
11450
by: Virtual_X | last post by:
Why bool type take 1 byte and as we know it must have only true or false (1 or 0) that mean that it need only one bit not the a whole byte
0
3027
by: Masudur | last post by:
Hi, I been searching net for a while for solution but unable to work. i have few questions regarding xbap applicaion. first of all can i really use wcf service with xbap browser application in partial trust that is in internet. if i can please help me with some specific guide line. second of all how can i communicate with the parent site... from xbap. that is if my xbap is hosted in http://mysite/app/default.aspx page in a iframe
2
3158
by: Steven Tang | last post by:
It seems that we can only embed XBAP Iframe to create a WPF gadget, the WPF application will not work at this time (I tried Stanimir's demo, it is not different to a standalone WPF application, it will not be able to dock into the sidebar when move the "Hello gadget" closing to the sidebar, I don't know if it is still a sidebar gadget if it could not dock into the sidebar). The problem I met in XBAP gadget is that it is difficult to set...
0
1469
by: | last post by:
It seems that we can only create a WPF gadget by embed XBAP Iframe, the WPF application will not work at this time (I tried Stanimir's demo, it is not different to a standalone WPF application, it will not be able to dock into the sidebar when move the "Hello gadget" closing to the sidebar, I don't know if it is still a sidebar gadget if it could not dock into the sidebar). The problem I met in XBAP gadget is that it is difficult to set...
2
11310
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
I'm creating a XBAP application and want it take some input from webpage dynamically? what is the best way? how to do it? Best Regards Steven -- ======================= Steven Tang SYWWUYU)
4
2947
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
I'm creating WPF gadget by embed XBAP Iframe: 1. Is it possible that create Pure WPF (non-XBAP) which could auto dock into the Vista sidebar when dragging the WPF application near Sidebar? 2. My current approach is using XBAP inside the iFram, The problem I met in XBAP gadget is that it is difficult to set padding so that the gadget could be drag out of the sidebar. I.E., the size of my XBAP is 190X145, my html launcher is <html>
5
5900
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
It seems that one page XBAP whose Unloaded event never get called, I need put some clearing stuff (I.G stop dispatcher time) when user close browser, it unload event doesn't work, where shall I put? -- ======================= Steven Tang SYWWUYU)
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10222
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9999
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8876
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.