Configuration error

Discussion in 'Site Programming, Development and Design' started by giorgos, Mar 9, 2010.

  1. Hi, in my site i use chart.

    when i try to run the chart on my site i have the follow configuration error

    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    Source Error:


    Line 44: <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    Line 45: <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    Line 46: <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    Line 47: <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
    Line 48: </compilation>


    Source File: E:\web\redusepo\web.config Line: 46

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



    Do you have any idea what is going wrong with assembly System.Web.DataVisualization

    Thanks a lot
     
  2. Ray

    Ray

    Did you upload the component and/or assembly within your applications bin directory?
     
  3. Hi i am using ASP:Chart
    When i run the program in my computer, i don't have any bin directory.
     
  4. Ray

    Ray

    You should always have a bin directory in your .net web site. It is one of the key folders for .Net. When you uploaded your web site (.Net web application) to our server you uploaded all kinds of different folders and files. Connect to our server using FTP.

    Try looking at this kb article. It gives some instructions on how to setup FileZilla to connect to our server using FTP. You'll need to download FileZilla from the Internet. It is free. Just do a search on Google for FileZilla.

    http://support.Winhost.com/KB/a660/configuring-filezilla-to-access-your-web-site.aspx

    Once you are connected you should see all kinds of folders and files. Look for a folder that is named "Bin". Navigate to it and make sure all your charting assemblies are uploaded. If you do not see it then that is probably why you are getting this error message.

    I know you said that this works on your computer but you may have installed it directly on your computer, so comparing it to a hosting server is really misleading and you should not compare how you setup your own computer to how a hosting server is setup. Especially if it is a shared hosting server.
     
    Last edited by a moderator: Oct 14, 2015
  5. I go to the folder :
    C:\Program Files\Microsoft Chart Controls\Assemblies

    I copy the System.Web.DataVisualization.dll
    with other dll files

    I create a Bin Folder from VS and i have put in the dll files

    Now i have the following errors

    Required permissions cannot be acquired.
    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.Security.Policy.PolicyException: Required permissions cannot be acquired.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [PolicyException: Required permissions cannot be acquired.]
    System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +7604211
    System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57

    [FileLoadException: Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
    System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
    System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
    System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
    System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
    System.Reflection.Assembly.Load(String assemblyString) +28
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

    [ConfigurationErrorsException: Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
    System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
    System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
    System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +600
    System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +128
    System.Web.Compilation.BuildManager.CompileCodeDirectories() +265
    System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +320

    [HttpException (0x80004005): Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
    System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
    System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

    [HttpException (0x80004005): Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8896063
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333


    I try to put inside Bin Folder only the System.Web.DataVisualization.dll
    and nothing change.

    Any idea?
     
  6. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015
  7. I have set <trust level="Full" />

    But now i have the following error

    Invalid temp directory in chart handler configuration [c:\TempImageFiles\].
    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.IO.DirectoryNotFoundException: Invalid temp directory in chart handler configuration [c:\TempImageFiles\].

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [DirectoryNotFoundException: Invalid temp directory in chart handler configuration [c:\TempImageFiles\].]
    System.Web.UI.DataVisualization.Charting.ChartHttpHandlerSettings.Inspect() +720
    System.Web.UI.DataVisualization.Charting.ChartHttpHandlerSettings.ParseParams(String parameters) +424
    System.Web.UI.DataVisualization.Charting.ChartHttpHandlerSettings..ctor(String parameters) +279
    System.Web.UI.DataVisualization.Charting.ChartHttpHandler.InitializeParameters() +110
    System.Web.UI.DataVisualization.Charting.ChartHttpHandler.EnsureInitialized(Boolean hardCheck) +177
    System.Web.UI.DataVisualization.Charting.Chart.GetImageStorageMode() +25
    System.Web.UI.DataVisualization.Charting.Chart.Render(HtmlTextWriter writer) +125
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
    System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
    System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
    System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
    System.Web.UI.Page.Render(HtmlTextWriter writer) +29
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


    Do you have any idea?

    Thanks
     
  8. Ray

    Ray

    Looks like a path issue. Your web application is looking for c:\TempImageFiles\. I suggest you go through your coding and make sure you update the path to match that of your hosting account. Log into your control panel and go to the Site Info Manager. On the left hand side you will see your server path that is the path name you should be using when you have your website on our server.
     
  9. Thanks a lot

    the problem was inside web.cofig
    when you use asp:Chart then you have inside web.config

    <appSettings>
    <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
    </appSettings>

    so i delete dir=c:\TempImageFiles\;

    Now works fine!!!
     

Share This Page