.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

lists.asmx webservice an unexpected error occured

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :SharePoint

I have a sharepoint site and am using the list.asmx webservice to update rows in a list.  My code was working well.  For some reason, after doing a very large batch of updates, the same code now gives this error each time I run it.  The strange thing is that everything worked, I did a large batch then everything broke.  I switched to another site and it worked again.  I did a large batch and everything once again broke.

<Result ID="1,Update" xmlns="http://schemas.microsoft.com/sharepoint/soap/"><ErrorCode>0x80131904</ErrorCode><ErrorText>The operation failed because an unexpected error occurred. (Result Code: 0x80131904)</ErrorText>

View Complete Post

More Related Resource Links

ASMX ws: An unexpected error occurred on a receive; failing intermittently



we I have asmx web service, this seems to be working fine for 25 client machines but one site keeps failing. The client gets a small dataset and tries to send it across to server to process. The dataset saved in XML file only makes 450 - 550kB. The web service is contacted twice in a short time every half an hour. The other smaller dataset (50kB) goes across everytime without any troubles. This site is not trying to send the biggest dataset, other site are sending much bigger datasets without problem. The catch is this failing site keeps retrying for 20 times (10 hours) in average and then eventually goes across. I don't think the service webmethod is erroring out as that is all wrapped up in the try and catch and the exception is not getting thrown, also every other try for the exact same webmethod used by any other client site seems to be working fine.

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Ne

An unexpected error has occured

Hello I am using following sample code for some testing using Sharepoint 2010     SPSite siteColl = SPContext.Current.Site;     SPWeb site = SPContext.Current.Web;     string ListId = Request.QueryString["List"];     string ItemId =  Request.QueryString["ItemId"];     txtListId.Text = ListId;     txtItemId.Text = ItemId;     SPList list1 = siteColl.RootWeb.Lists["Tasks"];     Response.Write(ItemId.ToString());          SPListItem item1 = list1.Items.GetItemById(Convert.ToInt32(ItemId)); I am getting following error "An unexpected error has occured" in following line, please advise whats wrong I am doing here     SPListItem item1 = list1.Items.GetItemById(Convert.ToInt32(ItemId));

http://machinename:Portno/_vti_bin/lists.asmx throwing error


Hi All 

I am facing with this following error when i access http://machinename:Portno/_vti_bin/lists.asmx. [SharePoint server 2010], all other web services are accessible 


The top XML element 'string' from namespace 'http://schemas.microsoft.com/sharepoint/soap/' references distinct types Microsoft.SharePoint.SoapServer.SoapXml.SoapXmlElement and System.String. Use XML attributes to specify another XML name or namespace for the element or types.


Any help please.




Error while accessing the Sharepoint Foundation http://sharepoint server:port/_vti_bin/lists.asmx



Error while accessing the Sharepoint Foundation http://sharepoint server:port/_vti_bin/lists.asmx. we got below error. please help us to sort this below error.

The top XML element 'string' from namespace 'http://schemas.microsoft.com/sharepoint/soap/' references distinct types Microsoft.SharePoint.SoapServer.SoapXml.SoapXmlElement and System.String. Use XML attributes to specify another XML name or namespace for the element or types.


Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: fe7f8707-44db-4744-8a78-337a5e8a80de

Date and Time: 10/25/2010 10:32:28 AM

Thanks & Regards,



Webservice versions.asmx: Getversions-method returns error on an item of a custom list.


I using GetVersions from the webservice http://server/_vti_bin/versions.asmx. This method works Okay in SharePoint 2007, and in SharePoint 2010 it also works Okay on documents from a document library. But when I used on an item from a custom list, it returns an error stating: "Value cannot be null.\r\nParameter name: key". In SharePoint 2007 I could retrieve the histroy on an item with the call GetVersions("Lists/MyCustomList/5_.000"), in SharePoint 2010 this fails.

Do I need to change the parameter, or use another filename for an item instead of "5_.000"? Does any one have the same experience?

Thank you

Cannot access Sharepoint List using Lists.asmx webservice

var a = new ActiveXObject("Microsoft.XMLHTTP");
a.setRequestHeader("Content-Type", "text/xml;charset=utf-8");
a.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/GetListItems");

var d = "<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:tns='http://schemas.microsoft.com/sharepoint/soap/'><soap:Body><tns:GetListItems><tns:listName>

Activation error occured while trying to get instance of type Database, key "DBName"


Im using Enterprise library 5.0
I have a scenario, where I have to access two different databases in my application.

Basically this application is a webservice,delployed on my local for testing purpose.
I'm trying to access this web method from diffent windows application, default connection works fine but the other database throw's exception.

Problem is only my defaultDatabase is works fine, if I change defaultDatabase="MYCON1" with "MYCON2" it works fine, if I try to access the other database which is not default, throws exception.

<dataConfiguration defaultDatabase="MYCON1" />
<add name="MYCON1" connectionString="Data Source=server1;Initial Catalog=dbName1;User Id=Username1;Password=password1;"

" />
<add name="MYCON2" connectionString="Data Source=Server2;Initial Catalog=dbName2;User Id=Username2;Password=password2;"
providerName="System.Data.SqlClient" />

Database myDB=EnterpriseLibraryContainer.Current.GetInstance<Database>(); --> works fine for the default database (MYCON1)

Database myDB=EnterpriseLibraryCo

Writing Data to database with jQuery Forms, ASMX Webservice, & JSON - help!



Can someone point me in the right direction on how to submit data from a jQuery form to a ASMX webservice? I have gotten everything on the form ready to be submitted to the database and now I am stuck on how to send it over using $.ajax(). Everything I have read tells me how to get data from a webservice and display it with jQuery, but not the other direction nor how to access the json data within the within the webservice service(similar to a Request.Form approach with ASP.NET forms).

In other words: 

1. What do I need to do to my webservice to make sure it can receive data from the jQuery form. 

2. What do I need to do in jQuery to receive an acknowledgement the save on the server side was successful. 

I can explain more if need be, but if there is a comprehensive tutorial on not only reading, but also WRITING data with jQuery, JSON, etc. I would love to get pointed in that direction. 

The underlying connection was closed: An unexpected error occurred on a send.


I am consuming a third party web service wsdl using my .net aps.net page. And I am getting following error message. Cannt get to resolve it. Its working on my machine but not in my development machine. I have installed the certificate also in certificates on that machine. Can somone please help.?

Error -->  The underlying connection was closed: An unexpected error occurred on a send.





'An unexpected error has occurred' on upload after changing limit



I recently changed the max upload size for attachments to TFS work items on our SharePoint site.  I did this by going to the http://tfsserver1:8080/tfs/ProductCollection/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize URL and entering the new size in bytes.

This worked a treat, but not I cannot upload any documents to another site on the same server.

I can open and save documents that are already there, but when I click the 'Upload' button it gives a white page with 'An unexpected error has occurred.' on it.

Is there something else I have to set when I increase the upload limit for work items?


Writing Bitmap to Response.OutputStream - Generic Error Occured in GDI+



This is what I'm trying to do when I get the error on the server (it works on my local machine):

System.Drawing.Image image = System.Drawing.Image.FromFile(filepath);
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(image); 

Response.ContentType = "image/bmp";
bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Bmp);

I don't think it can be a permissions problem because this works on the server:

System.Drawing.Image image = System.Drawing.Image.FromFile(filepath);
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(image);

Response.ContentType = "image/jpeg";
bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);

So how do I get this to work for a bitmap?


System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a rec

Hello Guys,         I am getting following exception while web service (ASMX) is returning the response. <!-- [if gte mso 10]> <mce:style> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive.     <!-- [if gte mso 10]> <mce:style>                                                     InnterException (System.IO.Exception): "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."       I think either the Asp.net web server is closing the connection or the response is too long.   Following is my simple code.    1)   namespace JFA.IndiePay.BusinessAccess { public class VerTexProcessor { public DataSet ProcessVerTexForBatch(DataSet dsInputRequest) { DataSet dsResponse = new DataSet(); //Call vertex web service here. VertexService.Service texCalculator = new VertexService.Service(); texCalculator.Timeout = 500000;

SSIS Import/Export Wizard: "Unexpected Unrecoverable Error"

For whatever reason, whenever the SSIS Import/Export Wizard needs to display an error message, it throws up "Unexpected Unrecoverable Error" instead. The three buttons - Abort, Retry, and Ignore - all cause the wizard to close. I see some activity in Process Monitor that looks like DTSWizard.exe is probing around for some System.Web assemblies, and not finding them. I'm running 2008 SP1 on Win 7 x86, and I've reinstalled the client tools and Integration Services. Anybody else seen this issue? Should I file a report on Connect?

The underlying connection was closed: An unexpected error occurred on a receive

Hi All,   i have developed a web application to call WCF service (which is hosted in IIS) from client application using .Net 1.1 it works fine.   but i got an error "The underlying connection was closed: An unexpected error occurred on a receive." when the return object is getting complex.   i analysis the issue with different level of object complexity and i found it get failed for following structure.   eg:   ObjectA - outer object that has some primitive data types and the list of ObjectB ObjectB - this also contain some primitive data and list of ObjectC.   Hope you can understand the hierarchy (complexity) of the return object. This works up to 2nd level of object hierarchy.   Does anyone have idea about the solution for this exception?   Thanks in Advance Shazvi

Failed to add relation(s) Unexpected error

I am getting the following error message when using the Data Source Configuration Wizard in Visual Studio 2008 to create a connection to a MySQL database.Failed to add relation(s) Unexpected error.I have found a KB article (KB954740) on the problem, but can not seem to find the fix.I have just started using Visual Studio but I am knowledgeable with VB from many years of work in Microsoft Access.Thanks in advance for any help you may provide,Ricky HicksMicrosoft Access MVP 2005, 2006, 2007, 2008, 2009 Ricky Hicks

SP Webservice:Lists.GetListItems

i want to get all list items in "test" list Lists.GetListItems("test", null,null,null,null,null,null), but it returns only the first page. about Lists.GetListItems Method http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx, in the "Remarks",  "includes a ListItemCollectionPositionNext attribute inside the rs:Data element", i can find the node but how can i get the next page items? any help?  

WCF REST webservice authentication error when hosted with godaddy

Hi guys, I'm currently hosting my site on a shared windows hosting box with Godaddy. I have upgraded my hosting account to .NET 3.5 and having IIS7 as well which is in integrated pipeline mode. I recently build a simple WCF web service using the REST started kit preview 2. Once i uploaded it to the server, I am getting this error"IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used." You can see it here:http://sawasdeethaiart.com/service.svcThe obvious fix for as i have read from various websites, is to make sure I configure my IIS to have either Basic or Anonymous specification enabled. But as i am on a shared hosting account, i dont have any access to do this. (I have checked all my options in the IIS hosting panel, but there is no option). I am also done this in my web.config<authentication mode="None"></authentication> Is there any other option I can add  to my web.config to overcome this? or is there any other fix for this? Any help will be greatly appreciated. Thanks,Mark  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend