This is a migrated thread and some comments may be shown as answers.
Isssue with WebAssetDefaultSettings.ScriptFilesPath + URLRewrite
4 Answers 71 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brandon Blazer
Top achievements
Rank 1
Brandon Blazer asked on 22 Apr 2010, 07:53 AM
Is there a known issue that where the default scripts path does not work with URLRewrite?  I have added the following to my Application_Start in global.asax.cs

WebAssetDefaultSettings

 

 

.ScriptFilesPath="~/Thinkspace/Scripts/";

 


But when the page is rendered under URLRewrite, I recieve an error:

Specified file does not exist: "~/thinkspace/Scripts/jquery-1.4.2.js".

Even though the file is clearly in the folder.

Any known issue or ideas?

4 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 22 Apr 2010, 08:34 AM
Hello Brandon,

Unfortunately it is difficult to say where could be the problem. Could you please send us a simple test project which reproduces the depicted issue.

All the best,
Georgi Krustev
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.
0
Kelly Stuard
Top achievements
Rank 1
answered on 13 May 2010, 10:55 PM
Are you using Context.RewritePath(url) in the Global.asax's BeginRequest?
0
Brandon Blazer
Top achievements
Rank 1
answered on 13 May 2010, 11:25 PM
I was using the URLRewrite Module from IIS.Net
0
Kelly Stuard
Top achievements
Rank 1
answered on 14 May 2010, 06:45 PM
Unfortunately, that does not "rebase" the path correctly. The browser sees the original url http://localhost/dir1/index.aspx and it tells ASP.NET that it's supposed to render http://localhost/dir2/subdir1/index.aspx. This makes all the relative directories (and even the ~/ ones) incorrect.

The easiest fix is to use Context.RewirtePath(url). This happens in the ASP.NET pipeline and does what's called "rebasing". This is where it renders the rewritten path, yet at the same time emits url's relative to the originally requested page.
Tags
General Discussions
Asked by
Brandon Blazer
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Kelly Stuard
Top achievements
Rank 1
Brandon Blazer
Top achievements
Rank 1
Share this question
or