WCF / ASMX :: Implement The Chunking While Serializing?

May 28, 2010

I have an ASMX web service that returns a large dataset. The objects are custom. That is, I am not sending DataSets or other complex objects. I need to chunk the response because it could be large. Following this: http://support.microsoft.com/kb/278998, I have enabled chunked transfer encoding on the server. The client is java. I am doing something along these lines:

connection.setRequestProperty("Range", "bytes=" + rangeStart + "-" + rangeEnd);
int responseCode = connection.getResponseCode();

I see the request property come in on the server side. I see the server build the response. I am tracing the outbound soap, and it appears to be created. I expected to get a response code of 206 back when the response is large. But, I always get 200 (or an error if the request is too large, Request Entity too large on the BlackBerry).What do I need to do on the server side to chunk? I can explore moving to WCF if I have to, but, would rather avoid it. I am guessing I need to implement the chunking while serializing or possibly write a custom HTTP Handler to do it for me. The problem with the serializer approach is, the web service framework is doing the serilization for me. I can take this approach if needed.

View 2 Replies


Similar Messages:

WCF / ASMX :: Object Properties Serializing With PropertyName + Specified

Feb 22, 2011

I have a WCF service that when the objects serialize to clients an extra property is getting added with a 'Speficied' suffix. At first I thought it had to to with a couple of nullable type properties, but it is happening to all of my value types even if it is not declared Nullable. How can I get rid of this?

View 1 Replies

HttpHandlers / Modules :: File Chunking Fails When Served From IIS7 To Firefox

Oct 17, 2010

This seems as good a place as any for this question. It has to do with an .ASHX handler.

I have written a generic file serving handler in asp.net/vb.net - it has been working great. I recently moved to a windows 7 box and am now debugging under IIS7, and this is where the problems occure.

Whenever I serve a file to either FireFox or Chrome (IE8 works fine) from IIS 7, the download will fail.

- In FireFox the error is "[some file name and path].part could not be saved, because the source file could not be read."
- In Chrome the error is "Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error."
- In IE8 it works fine

If I run the same code in IIS6, it works fine. If I run the same code in the Visual Studio virtual web server, it works fine (on windows 7 or XP).

I am rather concerned about this as our production web server will soon be IIS7; which I'm starting to really love, and would hate to revert to IIS6 just because this won't work in IIS7.

Here is the code I'm using..I've tried a number of different patterns. It seems to always fail on the Flush() line with the error "System.Web.HttpException = {"The remote host closed the connection. The error code is 0x80070040."}"

One thing I have noticed, if I move the flush statment to the finally clause or remove it all together; firefox will attempt to read the entire file - it appears to be looping through the entire block of code just fine, until it hits the flush statement. If I remove the flush statment I still get an error and it still tries to read the entire file before asking me to save it.

--Edit: I removed the flush and tested again; firfox thinks it downloaded a zero byte file.

I'm assuming I just have some sort of header issue going on here, but I'm at a loss at this point as to what that would be.

[Code]....

View 2 Replies

WCF / ASMX :: How To Implement Security

Apr 14, 2010

i want to Ask One Question in Wcf,How we Implement Security In Wcf Plz Give me one example , and tell me how many types of security in wcf.

View 1 Replies

ASMX :: Implement Transaction With WCF Service?

Sep 21, 2010

We have a common WCF service Which takes stored procedure name and value as parameters from .ASPx page and execute in Database. In some cases, We need to execute 3-4 stored procedure in Sequence. Here, If any stored procedure fails then we need to rollback. How can we implement Transaction with WCF service.

View 1 Replies

WCF / ASMX :: How To Implement Form Authentication Service

Nov 1, 2010

How to implement form authentication wcf service?

View 1 Replies

WCF / ASMX :: How To Implement Web Services In A 3 Tier Architecture

Oct 5, 2010

how to implement web services in a 3 tier architecture and also give a brief idea about how to implement coding as soon as possible.

View 1 Replies

ASMX :: How To Implement Webservices On An E-commerce Website

Oct 26, 2010

I worked on an online store based . In this store i have a category for which there are almost 2000 products. So every time when there is some change in the price, it is very difficult to update the products with new price, descriptions, features etc.The manufacturer of this product is providing web services which can be linked with store owner's website who is selling their products.o is it possible to integrate e-commerce website with webservices API that are being provided by manufacturer ?

View 1 Replies

WCF / ASMX :: Implement Security In Case Of .net Webservice ? 

Nov 10, 2010

How can we implement security in case of asp.net webservice ? as per my knowledge, we can implement security by the following ways -

1. IIS authentication

2. Form/Passprt/Windows Authentication in web.config file of the webservice solution. is there any other way to implement the security in webservices ?can we implement security at web-method level ?

View 1 Replies

C# - Serializing Data From A RSS Feed?

May 20, 2010

I'd like the user to specify a RSS feed address and serialize the information from it. I am not interested in the XML format, but populate a strongly typed object from the XML. My question is, is there a standard that all RSS feeds support (Do all of them have date, title etc)? If so, is there a XSD that describes this.If not, how do I handle serializing a RSS feed to an object in ASP.NET?

EDIT:
The SyndicationFeed's Items have the following properties:

Title.Text -> Gives us the title
Summary.Text -> Gives the Summary

Q1 - The Summary includes the html tags. Is there a way to strip them? I am interested only in the text
Q2 - Do all RSS feeds have full content in the Summary element? I see that some RSS feeds have only a few lines for Summary while others have the entire content of the post.

View 6 Replies

Serializing Only Parts Of An Object With Json?

Feb 14, 2011

I have an object called MyObject that has several properties. MyList is a list of MyObject that I populate with a linq query and then I serialize MyList into json. I end up with something like this

List<MyObject> MyList = new List<MyObject>();

MyList = TheLinqQuery(TheParam);

var TheJson = new System.Web.Script.Serialization.JavaScriptSerializer();

string MyJson = TheJson.Serialize(MyList);

What I want to do is serialize only parts of MyObject. For instance, I might have Property1, Property2...Propertyn and I want MyJson to only include Property3, Property5 and Property8.
I thought of a way to do this by creating a new object with only the properties I want and from there create a new list for the serialization.

View 1 Replies

Serializing A Javascript Array With Jquery?

Sep 28, 2010

I have the following code:

<script type="text/javascript">
var checksSinceLastPostBack = new Array();
function clientSelectedIndexChanged(sender, eventArgs) {
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
var serializedCheckData = checksSinceLastPostBack.serializeArray();
if (ajaxManager != null)
ajaxManager.ajaxRequest(serializedCheckData);
}
</script>

The

var serializedCheckData = checksSinceLastPostBack.serializeArray();

doesn't seem to work. Am I misunderstanding this?

Also if this works, how would I deserialize it in the code behind?

View 1 Replies

C# - Serializing Request.Form To A Dictionary Or Something?

Jan 7, 2011

i need to pass my Request.Form as a parameter, but first i have to add some key/value pairs to it. I get the exception that the Collection is readonly.

I've tried:

System.Collections.Specialized.NameValueCollection myform = Request.Form;

and i get the same error.

and i've tried:

foreach(KeyValuePair<string, string> pair in Request.Form)
{
Response.Write(Convert.ToString(pair.Key) + " - " + Convert.ToString(pair.Value) + "<br />");
}

to test if i can pass it one by one to another dictionary, but i get:

System.InvalidCastException: Specified cast is not valid.

View 3 Replies

Serializing Two Dimensional Array With Newtonsoft.json

Apr 20, 2010

I am getting an error when trying to serialize an object products.
Product product = new Product();
product.Name = "Apple";
product.Expiry = new DateTime(2008, 12, 28);
product.Price = 3.99M;
product.Sizes = new string[3,2] { {"Small","40"}, {"Medium","44"}, {"Large","50"} };
string json = JsonConvert.SerializeObject(product);//this line is throwing an error

Array was not a one-dimensional array. Is there any way to serialize a two dimensional array with Newtonsoft.json.

View 2 Replies

Visual Studio :: Serializing Object Direct From Debug Window

Jan 11, 2010

Is it possible to serialize object direct from Visual Studio .NET Debug window. I have a very complex object structure which contains multiple sub objects along with List item etc. I mean the Hierarchy is complex. And I need to analyze the object graph closely for that I need an offline view (may be in the from of XML/ Serialization). I can not do that from VS.

(One can reccomend me to use XMLSeriliazation in my code to generate but please consider that may not be alwways possible because of

1. with default .NET Serialization class a complex object which has manu sub objcts with Collection. is not get serialized properly. So need custom serialization & deserilazation code for that, does not come witf Microsoft Librarry.)

2. I am using it somewhere (Silverlift app) where such operation may be not possible.

3. I do not want to spent time creating or evaluating any ones custom serilaization code/tool

View 1 Replies

Web Forms :: Serializing The Value From A Textbox In Aspx.cs File To JavaScript Code?

Feb 19, 2011

I have a list in a textbox in aspx.cs file and I want to pass it in the javascript code in the second web form.

View 12 Replies

WCF / ASMX :: Implement Caching Using System.Web.Caching?

May 15, 2010

how to implement caching in wcf service using System.Web.Caching

View 2 Replies

Web Forms :: Serializing An Array From Code Behind Of One Web Form To JavaScript Of Another Web Form

Feb 16, 2011

I have a web form where I create an array of type structure.

In this form I have:

[code]....

but this is not OK.

View 1 Replies

"The EntityReference Object Could Not Be Serialized" When Serializing From .NET Web Site,?

Mar 22, 2010

I have an Entity Framework data model. Part of the model is a Customer entity. The web service provides a method to get a customer, and to receive an updated version of this customer to be persisted.

To test this, I created a new ASP.NET web Application, (Solution > Add > New Project > ASP.NET Web Application), then added a reference to my service reference using the standard Add Service Reference dialog. I then call the service using the following code:

var client = new CustomerServiceClient();
var customer = client.GetCustomerByID(18); // get it
customer.LimitDown = 100; // change it
client.SaveCustomer(customer); // persist it


Everything works as expected.

Now, I do exactly the same thing, but this time with as ASP.NET Web Site (Solution > Add > New Web Site > ASP.NET Web Site). I add the reference in a similar fashion and copy and paste the code above into the new site. But now I get the following exception thrown on the 4th line:

System.InvalidOperationException The EntityReference object could not be serialized. This type of object cannot be serialized when t RelationshipManager belongs to an entity object that does not implement IEntityWithRelationships.

Source Error:

Line 2474: Line 2475:
public
SkyWalkerCustomerService.OperationResult
SaveCustomer(SkyWalkerCustomerService.Customer[code]....

Googling for this error returns very little. Why doesn't this work?I guess one answer would be to use a web application instead of a web site, but I have an large existing site to which I need to add the service reference, and I'd rather not convert it.

View 1 Replies

State Management :: Serializing To File System To Maintain State?

Oct 25, 2010

I have a system that has several large objects that need to be built and populated each and every time, and these objects may be accessed quite often as well. As a strategy, caching would not be that good for me because there are potentially thousands of these objects which are fairly large. So I propose to serialize the objects to the file system and then deserialize it when I need those objects again. I have several classes that need this serialization functionality.

These objects change as well, so on the next access I check if there were any changes and then I grab only the changes and edit the object, and then reserialize the object.

My question is what is the best way to do this, since I have several classes ..

View 2 Replies

WCF / ASMX :: Create Web Service - How To Web Page Call Sales_Services.asmx

May 5, 2010

if i have the web application with many pages like add order page, edit order page, and delete order page actually they also interact with the Sql Server 2008 and i also create web service page call Sales_Service.asmx. i know just i need to put something like query into Web Method in Sales_Service.asmx but i have a lot of queries, i don't know which query i should put into it and how the web page call the Sales_Services.asmx

View 2 Replies

WCF / ASMX :: Passing Variable From Dropdownlist.selectedvalue To Asmx Webservice

Nov 10, 2010

On my page I have a dropdown for country.

On my asmx service I want to get the value of the dropdownlist to filter the next input which will be state/providence.

My code on the asmx:

[Code]....

I want to add another clause to the WHERE statement to restrict Country = @Country so I will need to get that value to the web service.

View 2 Replies

WCF / ASMX :: IIS Memory Increasing For Each Client Request In Asmx Web Service?

Nov 8, 2010

A customer reported that our asmx web service is continually increasing in memory (mem usage as well as private bytes). We are able to reproduce the problem in our lab with Windows 2003 Server SP2 (fully patched) on some of the machines. The customer is using Windows 2008.

We created a Hello World web service targeting the 2.0 framework built under VS2005 SP1 and a test client that continues to call it. The memory increases steadily - approximately 40K per client request. If the test app is paused, the memory remains the same. When it is closed, the memory drops. Explicit calling of GC.Collect does not drop the memory.

We have run the memory profiler on the service and the leak is all native memory. We have uninstalled/re-installed the Framework on one of the machines but no difference. To our knowledge all of the security and IIS settings are not modified. We have compared app pool, default web site and virtual directory properties to machines that have no problem and they are identical.

View 11 Replies

WCF / ASMX :: How To Call Asmx Web Service In A .net App From Classic Asp App Js File

Mar 17, 2011

I have a .net app developed in .net 4.0 version. And I implemented an asmx web service in this. Now I want to call one of the webservice method in another classis ASP application java script function.

View 2 Replies

WCF / ASMX :: Bulk Insert Data Into Asmx Webservice?

Feb 24, 2011

I have datatable consist of 20 records and i want to bulk insert into sqlserver through the asmx webservice. Can anybody guide to me or provide Sample BusinessLogic and webservice code.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved