.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

Serialization error in a for each loop

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :WPF
I have a for each loop in a 3.5 workflow. This takes a list if criteria to build a query string to call a Secure Webservive necesitating the use of a certificate. I load the certificate further up stream and pass it as a dependency property. The process returns a serialization error for the certificate. How do I avoid this error?  Thanks!

View Complete Post

More Related Resource Links

Error on 23rd Loop of Foreach

Hi, I have a MAster Package callling 8 Dimension Package and 5 fact table packages. Fact table Packages are in for eachloop. They have to loop 24 times during FirstRun Each fact table load more than 500000 rows in every loop, and out of 5, two package loads more than million rows in every loop. I got the following error message when the package was looping for the 23rd time. One of the five Fact table package failed with following error DTS primeoutput failed returned error code 0xC02020C4 SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Staging Table "(1) returned error code 0xC02020C4. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. After when I ran package explicitly, it ran well Please help on what to be done to avoid this error and what does this error mean?. I am Using SQL Server 2008, i5 Processor, 3.42GB RAm, DefaultBufferMaxRows = 10000 and Default BufferSize 10MB, EngineTHread=10 Thanks, Anuja

Assembly load error system.runtime.serialization

Hello ! I have a web project which i began there is some month, and compile perfectly until now. In fact, i have some compile error;   erreur 1 Could not load file or assembly 'System.Runtime.Serialization, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest.   on explorer :   The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) Description : Une exception non gérée s'est produite au moment de l'exécution de la demande Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code. Détails de l'exception: System.BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) Erreur source: Une exception non gérée s'est produite lors de l'exécution de la demande Web actuelle. Les informations relatives à l'origine et l'emplacement de l'exception peuvent être identifiées en utilisant la trace de la pile d'exception ci-dessous. Trace de la pile: [BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)] System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBa

De-serialization error, The referenced element with ID 'id0' was not found in the document.

I am trying to talk to a 3rd party (java Based) SOAP web service, and get the error "The referenced element with ID 'id0' was not found in the document." when it tries to de-serialise the repsonse the repsonse is below,  and seem to be correct and complete so i am looking for suggestions on how to resolve this, if it help i ONLY need to get the CONTEXT_ID out of the response <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header><ns1:sessionID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" href="#id0" xmlns:ns1="http://xml.apache.org/axis/session"/></soapenv:Header><soapenv:Body><ns2:initExportDeviceResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://diamondip.com/netcontrol/ws/"><initExportDeviceReturn href="#id1"/></ns2:initExportDeviceResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:long" xmlns:soapenc="-

Request.GetRequestStream() in a loop gives Timeout error

Hi,     I tried searching the net but didnt find any relevant information regarding this issue, I am trying to pass data to a servlet and am sending it in a loop as a different request everytime , after the second request the debugger  just hangs on this statement Request.GetRequestStream() and comes back after a lot of time or either gives a timeout error   Following is the code   try { log.Info(xmlTrade); UTF8Encoding encoding = new UTF8Encoding(); byte[] bytes = encoding.GetBytes(xmlTrade); HttpWebRequest request = (HttpWebRequest) WebRequest.Create(tradeServletPath); log.Debug("Servlet Path: " + tradeServletPath); request.Method = "POST"; request.ContentType = "text/xml"; request.ContentLength = bytes.Length; request.Timeout = timeout; Stream stream = request.GetRequestStream(); try { stream.Write(bytes, 0, bytes.Length); } finally { stream.Close(); } return "Success"; } catch(Exception ex) { log.Error("Exception occured when submitting this trade xml: " + xmlTrade); if(ex.Message.StartsWith("The underlying")) return "Connectionerror"; else return string.Empty; }

REST WCF Serialization error

How to handle serialization error. For example, how to handle this  "There is an error in XML document (1,2)" and throw an appropriate message back to the user. I am using REST Starter Kit. I have to throw HttpBadrequest instead for InternalServer Error. Pls. help.

Script task XML Serialization error



2008 SQL Integration Server package has the script task and in the Main method the following code is added-

Document document = new Document();

      document.Customers = new List<Customer>();
      Issuer issuer = new Issuer();
      issuer.IssuerID = "6650";
      issuer.IssuerContactFirstName = "import_testissuer_firstname";
      issuer.IssuerContactLastName = "import_testissuer_lastname";
      issuer.IssuerContactEmail = "import@testissuer.email";
      issuer.IssuerContactPhone = "6666";
      List<Customer> custs = new List<Customer>();
      Customer cust = new Customer();
      cust.custID = "6648";
      List<CustOrder> orders = new List<CustOrder>();
      CustOrder order = new CustOrder();
      order.CustOrderExpectedDelDate = &quo

2 Questions about serialization and error coding...


1. When using serialization on a controller any associated/aggregated classes returned an error that they weren't serialized. If I add serialization to these classes will they load automatically when I deserialize the controller class saving me many lines of code?

2. Slightly more complicated. I'm doing a project that requires a text editor to have error correction for a particular language like VS does for c#,VB etc. This is going to be like BlueFish editor where you select the language and it tells you if there are mistakes with the code etc. As a small project it won't have full functionality but it's the code structure and OO technique that's important. Can anyone advise me or show example of the best and most efficient way to achieve this? I'll be doing my own research but I don't want to start it and after a week find it's unreliable or unefficient. If anyone has experience in this then let me know Thanks.

Error trying to set Correlation Token at runtime for ReAssigning Task inside while loop.


Hello Friends,

I have developed a custom sequential WF in VS 2010 using custom WorkFlow Content Type and ASPX forms.

Requirements are as below:

1.WF creates an approval task for User A. If User A rejects,then WF completes.
2.If User A approves,task is assigned to User B. If User B approves,then WF completes.
3.Is User A approves and User B rejects,then I need to ReAssign the task to User A.

I am facing problems in the 3rd point above.
I have a while loop having a Sequence Activity and the activities: CreateTaskWithContentType,onTaskChanged and CompleteTask are inside the Sequence Activity.

I am aware that the Correlation Token has to be set at design time in the VS 2010 WF Designer.

The issue is of dynamically assigning Correlation Tokens(Task Tokens) to the activities: CreateTaskWithContentType,onTaskChanged and CompleteTask which are inside Sequence Activity(Inside While Loop).

My Code:
CorrelationToken C_Token =
                 new System.Workflow.Runtime.CorrelationToken();
createTaskWithContentType1.CorrelationToken = C_Token;

I get the error:"This operation can not be performed at runtime" when trying to assign Correlation Token dynamically as above.

Can anyone please hel

Error Excel files in For Each Loop

=================================== Error at Package1 [Connection manager "Excel Connection Manager"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "The Microsoft Jet database engine cannot open the file '\\informatica\Programs\ExcelFile\'. It is already opened exclusively by another user, or you need permission to view its data.". Error at Data Flow Task [Excel Source [1]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

Error message "Infinite recursion detected. The loop of dependencies is: ." but I have no recursion?



I have a query like

   MEMBER [Product].[AttribE].[grp6] AS
      Aggregate( { [Product].[AttribE].&[a], [Product].[AttribE].&[b], [Product].[AttribE].&[c], [Product].[AttribE].&[d], [Product].[AttribE].&[e] } )
      ,Caption = 'Some text'
   MEMBER [Product].[AttribE].[grp0] AS
      Aggregate(( [Product].[AttribE].[AttribE].Members - { [Product].[AttribE].&[a], [Product].[AttribE].&[b], [Product].[AttribE].&[c], [Product].[AttribE].&[d], [Product].[AttribE].&[e] } ))
      ,Caption = 'All Others'
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[200903], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[200906], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[200909], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[200912], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[201003], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[201006], [Statistic].[Statistic].&[none])
    ({ ([Product].[AttribA].&[A], [Product].[AttribB].&[B1], [Product].[AttribC].&[C], [Product].[AttribD].&[D1]) } * ( { [Product]

WCF de serialization error -- finding the erring field (urgent)


Hi Folks,

Need some urgent help. I am writing a WCF client which calls a service. Now, while de serializing the response from the service, the WCF client errs out with 'De serialization error'. In the inner exception, it gives the co ordinates of the erring field (e.g.: 5, 113). This de serialization error in my case is caused because of data type mismatch between the data sent by the service, and that in the .Net wcf proxy.

My question is how do we pin point the exact field based on the co ordinates given in the inner exception, if at all we are using any http debugger like Fiddler. I am finding it very difficult to exactly pinpoint the erring field based on the inner exception.

Thanks a lot,


Odd xml serialization runtime error


What's wrong with the following code?

It throws a runtime exception complaining about missing XmlInclude attribute.

using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace ConsoleApplication10
  class Program
   static void Main(string[] args)
     //this works fine
     //var s = new XmlSerializer(typeof(VwDeviceMetaDeclaration));
     //s.Serialize(Console.Out, new VwDeviceMetaDeclaration());

     //this doesnt
     var s = new XmlSerializer(typeof(VwMetaDeclaration));
     s.Serialize(Console.Out, new VwMetaDeclaration());

  [XmlRoot(ElementName = "meta", Namespace = "http://schemas.cside.pt/METADATA")]

Microsoft's Collaborative Application Markup Language (CAML) Loop

discovered an interesting error recently while working with Microsoft's Collaborative Application Markup Language (CAML) that, surprisingly, had received no ink. Partly what surprises me about this is that the error may require you to rewrite large sections of your code if you haven't previously considered this SharePoint limitation. I'll start with some context, but first of all the error is:

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


Handling 404 page not found with Error page



      How do i handle 404 page not found?

Inserting personal error message in ValidationSummary



I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=
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