Reputation: 4262
I am working on a project that utilizes .Net API (several .Net DLLs) provided by the customer. I have built an application based on this API. Application works as expected on my machines. But when I tried deploying it on client’s machine it fails with a rather generic exception. I tried googling for this exception but nothing conclusive could be found.
To give a rough idea about this API, it wraps a web service consumer and therefore requires marshaling of method parameters into XML (no source code available for this). Following is the stack trace for the exception:-
System.InvalidOperationException: There was an error generating the XML document. ---> System.ArgumentException: String cannot have zero length. at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterStreamInformation.Write5_StreamInformation(Object o) --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces) at Microsoft.SqlServer.DataWarehouse.Loader.StringSerializer`1.Serialize(TSerializable instance) at Microsoft.SqlServer.DataWarehouse.Loader.LoaderClient.BeginExecuteBinary(AsyncCallback endLoadCallback, AsyncCallback startSendingDataCallback, Object state) > at Microsoft.SqlServer.DataWarehouse.Loader.AABinLoaderClient.CofingDoLoad(String[] configVals)
frame in Italic represents our application while Frame in bold represents the client's API If anyone has encountered this exception in the past and know any workaround please do let me know.
Upvotes: 1
Views: 574
Reputation: 931
I have come across this kind of error when trying to parse XML. The most common place I have seen the "String cannot have zero length" error is when it is trying to find a particular place within a string. Do you know if this API is using the XML namespace?
Without seeing any code it is difficult to provide any detailed analysis of your problem.
Upvotes: 1