Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: v15.1.x ValidatorCallout static images - incorrect path with ScriptManager.EnableCdn= false [27875]

$
0
0
I have found that unless the ScriptManager has EnableCdn set to true, the images used in the display of the ValidatorCallout (warning and close icons) have an incorrect path set, so both images return a 404.

While the Nuget package installs the images here in my application:
~/Content/AjaxControlToolkit/Images/ValidatorCallout.Close.gif
~/Content/AjaxControlToolkit/Images/ValidatorCallout.Alert-Large.gif

If I set the ScriptManager.EnableCdn to false, the paths actually generated are:
~/[AspxPageContentServedFromFolder]/Content/AjaxControlToolkit/Images/ValidatorCallout.Close.gif
~/[AspxPageContentServedFromFolder]/Content/AjaxControlToolkit/Images/ValidatorCallout.Alert-Large.gif

The [AspxPageContentServedFromFolder] is the folder where the ASPX page resides on disk, but in my case the URL is different, because the URL has been mapped to this ASPX page with the RouteTable.Routes.MapPageRoute() method on app startup.

Shouldn't the image URL always be absolute from the app root if being served locally?
Comments: Couldn't upload the test site as it was over your limit. I've put it here: https://www.dropbox.com/s/3anhaypztusgrxl/ACTCalloutImages.rar?dl=0 Run the solution. On the root page of the site the textbox has a RequiredFieldValidator and a ValidatorCallout. Click the OK button and you should see the ValidatorCallout with the missing images. The root URL has been routed to ~/RoutedFolder/TestRouting.aspx by a RouteTable.Routes.MapPageRoute in the Global.asax.cs. If you go directly to that page: /RoutedFolder/TestRouting.aspx, it works fine. Now comment out the RouteTable.Routes.MapPageRoute in the Global.asax.cs and rebuild and run. Both URLs now have the validatorcallout images working correctly: / or /Default.aspx /RoutedFolder/TestRouting.aspx The reason this is a problem for me is that we run a single application that is multi-tenanted with many different host domains and the root of each domain/site is being mapped to a sub-folder using this method of routing.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>