This is a migrated thread and some comments may be shown as answers.

Failed to map the path '/'.

8 Answers 580 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alex Tushinsky
Top achievements
Rank 2
Alex Tushinsky asked on 23 Dec 2007, 01:14 AM
I keep getting "Failed to map the path '/'. " error while trying to run a report using the WebViewer module.

I thought it might have something to do with AJAX or other controls on the page, so I started fresh on a blank page, but the problem persists.

Also, the report is in my App_Code folder.  I moved it to a different location, but that just made it disappear from the Properties window (Report prop).

Here's a copy of that code.  Any help is greatly appreaciated.

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<%

@ Register assembly="Telerik.ReportViewer.WebForms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server">

<title>Untitled Page</title>

</

head>

<

body>

<form id="form1" runat="server">

<div>

<telerik:ReportViewer ID="ReportViewer1" runat="server"

Report="monthly_admin_log_in_report, App_Code.epo0catl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" />

</div>

</form>

</

body>

</

html>

8 Answers, 1 is accepted

Sort by
0
Milen | Product Manager @DX
Telerik team
answered on 27 Dec 2007, 09:22 AM
Hi Alex Tushinsky,

We apologize for the late reply.

The problem is caused because each time a web site is built, a different assembly name is created for the code in the App_Code folder. For example:

"monthly_admin_log_in_report, App_Code.epo0catl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"

The segment in red will change each time and your reference will therefore be invalid.

The best way to add Telerik reports to your Solution is to create a ClassLibrary project to hold your reports. Then add a reference to this ClassLibrary in your WebSite project and use the reports that you have created. By doing so you will avoid the problem you are facing.

For more information, please review the help article Creating a simple report.

Write us again if you have any further questions.

Greetings,
Milen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Szymon
Top achievements
Rank 2
answered on 12 Jan 2008, 12:32 PM
Hi,

I'm getting the same error although I took your addvice and placed my reports in separater class library project. I have a Web Site project and I'm trying to run it on a ASP.NET Development Server from VS2008 on Vista 64bit.

I will try to run this on IIS next to verify if this is a problem with ASP.NET Dev Server.

Here is the exact exception stack trace:

[InvalidOperationException: Nie można zmapować ścieżki '/'.]
   System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) +3449430
   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: Wystąpił błąd podczas ładowania pliku konfiguracyjnego: Nie można zmapować ścieżki '/'.]
   System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) +245611
   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
   Telerik.ReportViewer.WebForms.ReportViewer.ConfigContainsHandler() +122
   Telerik.ReportViewer.WebForms.ReportViewer.OnInit(EventArgs e) +75
   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.Control.InitRecursive(Control namingContainer) +198
   System.Web.UI.Control.InitRecursive(Control namingContainer) +198
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7248
   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.reportget_aspx.ProcessRequest(HttpContext context) in c:\Users\Szymon\AppData\Local\Temp\Temporary ASP.NET Files\hst\c639fed2\fdce085c\App_Web_8ljcwtol.8.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


0
Svetoslav
Telerik team
answered on 14 Jan 2008, 08:42 AM
Hi Szymon,

From the both stack traces you have sent us it seems that you have some problems with the web.config. In order to understand the exact problem could you please send us the exact error messages translated in English.

Sincerely yours,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Szymon
Top achievements
Rank 2
answered on 14 Jan 2008, 10:09 AM
Hi Svetoslav,

The first exception is the same as orginal one mentioned on this thread: Failed to map the path '/'.

So the second one is: "Error loading config file: "Failed to map the path '/'. "

Now I configured the project to run on IIS and it works fine, so as I suspected the problem is present only on the ASP.NET Dev Server. I think you should be using the "~/" syntax when calling MapPath methods. See here: 
http://geekswithblogs.net/vivek/archive/2007/01/21/104101.aspx 

Best Regards,
Szymon
0
Chavdar
Telerik team
answered on 15 Jan 2008, 11:41 AM
Hi Szymon,

Thank you for the feedback, but unfortunately we cannot do anything to modify the code. The exception is raised by the WebConfigurationManager class which belongs to the .net framework and we do not have access to it.

However, it is a good news that you managed to set up the application to work correctly on the IIS.

All the best,
Chavdar
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Szymon
Top achievements
Rank 2
answered on 15 Jan 2008, 12:37 PM
Hi Chavdar,

You are right, this is caused by call to WebConfigurationManager.OpenWebConfiguration, so it is beyond your control.

In fact I already found that this error is caused by combination of VS2008 running on Vista, and in order to fix it you need to run VS as administrator. This allows me to run the web site and reports on Cassini dev server.

Here is more details on this: http://cs.rthand.com/blogs/blog_with_righthand/archive/2007/12/01/WebConfigurationManager.OpenWebConfiguration-throws-Failed-to-map-the-path-_27002F0027002E00_.aspx

Cheers,
Szymon
0
Aaron
Top achievements
Rank 2
answered on 20 Jul 2010, 04:48 PM
Is there any way to test my reports in an ASPX page, using the ASP.NET Development Server without running Visual Studio as an Administrator? 

It seems like that would be pretty basic functionality.

Thanks.
0
Chavdar
Telerik team
answered on 21 Jul 2010, 10:25 AM
Hello Aaron,

The web report viewer checks for its http handlers registration as part of its functionality and this is very unlikely to be changed. The exception is not raised directly by our code as it is explained in the previous posts so we cannot do anything to fix it.

Kind regards,
Chavdar
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Alex Tushinsky
Top achievements
Rank 2
Answers by
Milen | Product Manager @DX
Telerik team
Szymon
Top achievements
Rank 2
Svetoslav
Telerik team
Chavdar
Telerik team
Aaron
Top achievements
Rank 2
Share this question
or