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

Grid read action - url rewrite

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jurica
Top achievements
Rank 1
Jurica asked on 12 Mar 2014, 04:19 PM
Hi,

does kendoui widgets support url rewrite?

I have a situation where we have our web site published (firewall) as a "subfolder" of root like this:

http://server.domain/xxxx/Home/Dummy2?Length=7

but the site is actually in the root off IIS. 

I configured url rewrite like this:

<rule name="Kendo" enabled="true" stopProcessing="false">
                    <match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="([^:]+://)([^:/]+(:[0-9]+)?/)([^:/].*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="true" />
                    <action type="Rewrite" value="{R:1}{R:2}xxxx/{R:4}" />
                </rule>

For links, script links etc. it is working fine but for kendogrid

@(Html.Kendo()
      .Grid("xGrid")
.....
.Read(read => read.Action("Dummy2", "Home", "Catalog"))
...

I can`t get it working. It is always rendering http://server/Home/Dummy2?Length=7 instead http://server/xxxx/Home/Dummy2?Length=7.

Any suggestions?
Thx

















1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 14 Mar 2014, 11:39 AM
Hello Jurica,

Basically if you are facing such issue when using the Ajax configuration then you should face the same when using the @Url.Action()

@(Url.Action("foo","bar"))

So try searching for a similar issue.

If you do not find a generic solution you can try to use the Url method instead of the Action method.

.DataSource(dataSource => dataSource
    .Ajax()
        .Read(read => read.Url("someulr"))



Kind Regards,
Petur Subev
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
Tags
Grid
Asked by
Jurica
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or