Search This Blog

Wednesday, November 12, 2014

System.InvalidOperationException: The path / could not be assigned report viewer (Der Pfad / konnte nicht zugeordnet werden)

Report Viewer and (Vista x64 or Windows 7 64 bit)
I have the following problem:

1. Create a new website
2. Insert the reportviewer control.
3. Run the application. An error occurs. The same code runs under XP x86 with no problem, but does not work with Vista x64.

Source of the aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>



Untitled Page







This is the error message:


[InvalidOperationException: The path / cannot assigned.]
System.Web.Configuration.ProcessHostConfigUtils.MapPathActual(String siteName, VirtualPath path) +261
System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) +580
System.Web.Configuration.ProcessHostMapPath.GetPathConfigFilenameWorker(String siteID, VirtualPath path, String& directory, String& baseName) +19
System.Web.Configuration.ProcessHostMapPath.System.Web.Configuration.IConfigMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +37
System.Web.Configuration.HostingPreferredMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +77
System.Web.Configuration.WebConfigurationHost.GetStreamName(String configPath) +166
System.Configuration.Internal.DelegatingConfigHost.GetStreamName(String configPath) +10
System.Configuration.BaseConfigurationRecord.InitConfigFromFile() +249

[ConfigurationErrorsException: Error during load of configuration file.: The path / cannot assigned.]
System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) +246879
System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) +40
System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) +412
System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) +29
System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) +961
System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) +84
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(String path) +36
Microsoft.Reporting.WebForms.ReportViewer.ConfigContainsHandler() +80
Microsoft.Reporting.WebForms.ReportViewer.OnInit(EventArgs e) +96
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7092
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) in c:\Users\fritz.MSE\AppData\Local\Temp\Temporary ASP.NET Files\website1\7d6f2e0f\c6b6426d\App_Web_9thttpm_.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +362
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

Solution

You have to run as administrator due to UAC on Windows Vista/7

Popular Posts