locked
Report render error - Could not load file or assembly Microsoft.WindowsAzure.Diagnostics RRS feed

  • Question

  • User-59962394 posted

    Hi

    In my project I am using ReportViewer1.LocalReport.Render("PDF"); to convert report to pdf but its giving error only for one report and others work as expected. 

    {"Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}
        [System.IO.FileLoadException]: {"Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}
        Data: {System.Collections.ListDictionaryInternal}
        HelpLink: null
        HResult: -2146234304
        InnerException: null
        Message: "Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
        Source: "mscorlib"
        StackTrace: "   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)\r\n   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)\r\n   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)\r\n   at System.Type.GetType(String typeName)\r\n   at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData)\r\n   at System.Diagnostics.TypedElement.BaseGetRuntimeObject()\r\n   at System.Diagnostics.ListenerElement.GetRuntimeObject()\r\n   at System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()\r\n   at System.Diagnostics.TraceInternal.get_Listene
    rs()\r\n   at System.Diagnostics.TraceInternal.WriteLine(String message)\r\n   at System.Diagnostics.Trace.WriteLine(String message)\r\n   at Microsoft.Reporting.WebForms.LocalReport.WriteDebugResults(Warning[] warnings)\r\n   at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)\r\n   at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)\r\n   at Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)\r\n   at Microsoft.Reporting.WebForms.Report.Render(String format, String deviceInfo, Strin
    g& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)\r\n   at Microsoft.Reporting.WebForms.Report.Render(String format, String deviceInfo)\r\n   at Microsoft.Reporting.WebForms.Report.Render(String format)\r\n   at ClearpathWebApp.Accounts.Report_Emails.GenerateReport(String DataSourceName, String ReportName, String FileName) in C:\\Swapna_Workspace\\code\\SafeMoveScheme\\Release 1.2.3.2\\ClearpathWebApp\\Accounts\\Report_Emails.aspx.cs:line 210"
        TargetSite: {Void GetTypeByName(System.String, Boolean, Boolean, Boolean, System.Runtime.CompilerServices.StackCrawlMarkHandle, IntPtr, Boolean, System.Runtime.CompilerServices.ObjectHandleOnStack)}
    

    I am not sure why its working for some and not for others.

    Please suggest me how I can resolve it.

    Thanks,

    Swapna

    Wednesday, September 25, 2013 12:15 PM

Answers

  • User-59962394 posted

    I was thinking the same but not sure how the other reports are working and  only one report is not working. Some how this problem has resolved. I haven't changed any thing but it started working fine and generating the report after publishing the project again on the server.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 14, 2014 3:55 AM

All replies

  • User-983437161 posted

    Hi Swapna,

    From the error message it seems there is a mismatch in the versions. Can you reference "Microsoft.WindowsAzure.Diagnostics"  Version=1.8.0.0 assembly and try again.

    "Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference"

    Let me know if you still have an issue.

     

    Thanks,

    Sahas

    Wednesday, October 23, 2013 1:54 PM
  • User-59962394 posted

    I was thinking the same but not sure how the other reports are working and  only one report is not working. Some how this problem has resolved. I haven't changed any thing but it started working fine and generating the report after publishing the project again on the server.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 14, 2014 3:55 AM