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
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
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:
|
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
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
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
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
It seems like that would be pretty basic functionality.
Thanks.
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