Salve Ragazzi,
Ho aggiunto un ReportViewer ad una Web form in Visula Studio 2017.
Tutto funziona bene localmente. Faccio il publish della Web form nel Web Server e quando provo ad aprirla ma da quest' errore:
Server Error in '/' Application.
Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object)'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MissingMethodException: Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object)'.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[MissingMethodException: Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object)'.]
Microsoft.Reporting.WebForms.SecurityAssertionHandler.RunWithSecurityAssert(CodeAccessPermission permission, Action action) +0
Microsoft.Reporting.WebForms.ReportViewer.SetToLegacyClientIDMode() +129
Microsoft.Reporting.WebForms.ReportViewer..ctor(IReportServerConnectionProvider reportServerConnectionProvider) +529
ASP.dashboard_aspx.__BuildControlRV_QA_Index() +623
ASP.dashboard_aspx.__BuildControlContent2(Control __ctrl) +548
System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) +125
ASP.masterpage_master.__BuildControlContentPlaceHolder1() +173
ASP.masterpage_master.__BuildControlform1() +818
ASP.masterpage_master.__BuildControlTree(masterpage_master __ctrl) +348
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +1285
System.Web.UI.Page.ApplyMasterPage() +75
System.Web.UI.Page.PerformPreInit() +211
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1844
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.36480
Cercando in giro, suggeriscono di aggiornare il .NET Framework Version alla versione 6.
Ho controllato e nel Web Server e' gia' installata.
Qualche suggerimento?
Grazie
Marco