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

The SkinPath property doesn't work properly

3 Answers 99 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Duy
Top achievements
Rank 1
Duy asked on 18 May 2009, 09:15 AM
Hi,
I'm using WebForm ReportViewer in Telerik Reporting version 2.9.9.202. I have a problem with SkinPath property because it sees relative url incorrectly when website is hosted right on a web application (without under virtual path). In that case, the path was resolved incorrectly so it causes all images on viewer to be broken (disappear).
I use below simple markup ReportViewer on ascx user control (put on a page named ViewReport.aspx)

<telerik:ReportViewer ID="rptView" runat="server" Skin="ReportViewer" SkinsPath="~/Teleriks/Images" ... /> 


In above code, I set a relative url in SkinsPath property in order the image folder's path is always resolved correctly wherever this user control would be put. And the issue comes up when I deploy the web site to IIS. There are two cases:

1. When my website is hosted under a virtual path of a web application (e.x: http://localhost/TelerikApp/ViewReport.aspx, TelerikApp here is a virtual path on web application, not a folder in website), the images show up fine on report viewer (image's url is /TelerikApp/Teleriks/Images/[name].gif).
2. When the website is hosted right on a web application without virtual path (e.x: http://localhost/ViewReport.aspx), images disappear on report viewer because it was resovled incorrectly. I used Firebug to debug and saw the image's url is "//Teleriks/Images/[name].gif".

Does ReportViewer cause that behaviour (resolving the relative url in SkinPath property) or it's default ASP.NET processing ? If it's Telerik, could you help me find a solution (because i'm going to put ReportViewer markup in skin file so the path should be consistent) ?

3 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 19 May 2009, 09:32 AM
Hello Duy,

The behavior you describe is expected and is how the .NET framework handles paths. As you said and as set as info for the SkinsPath property - it expects relative path to the skin folder.
If what you're aiming for is having a single folder you can use for multiple applications, our advise is to use the second approach from this KB article.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Duy
Top achievements
Rank 1
answered on 20 May 2009, 05:26 PM
Thank a lot, Telerik.
I'll try it :)
0
Duy
Top achievements
Rank 1
answered on 21 May 2009, 09:22 AM
In stead of setting SkinPath attribute, juse use UseEmbeddedScripts=false attribute and make a RadControls folder at root website. It's fixed now
Tags
General Discussions
Asked by
Duy
Top achievements
Rank 1
Answers by
Steve
Telerik team
Duy
Top achievements
Rank 1
Share this question
or