Specify the path where GridWeb stores temporary files

about file cache

Specify the path where GridWeb stores temporary session files

The following sample code specifies the path where GridWeb stores temporary session files.

about picture cache

when there are shapes/pictures in the worksheet,GridWeb will save all the shape/pictures to a cache path

the default cache path is System.Web.HttpContext.Current.Server.MapPath("/acwcache")

also we can use GridWeb.PictureCachePath to set this path to specific path.

when we open a page GridWeb will resolve the request image url,and get the image stream from the cache by the url id.

for example ,if your page address is http://ip/mygridwebapp/test.aspx

the image request url generated by GridWeb will be http://ip/mygridwebapp/test.aspx/acw_image/imageid.

sometimes the shapes/pictures are not loaded when you use Friendly Url.

you need to check the image url request.

the normal image request shall be like: http://ip/mygridwebapp/test.aspx/acw_image/imageid

but your request go like this :http://ip/mygridwebapp/test/acw_image/imageid

if you use FriendlyUrl you need to filter out the image url request for GridWeb.

thus GridWeb control server can get and resolve the request and find the image stream from the cache path.

for example we assume your page url like this:http://ip/mygridwebapp/test.aspx

then the below code is a workaround to fix such issue.

//write your custom url resolver:MyWebFormsFriendlyUrlResolver
public class MyWebFormsFriendlyUrlResolver : WebFormsFriendlyUrlResolver
{
public MyWebFormsFriendlyUrlResolver() { }

    public override string ConvertToFriendlyUrl(string path)
    {
        if (!string.IsNullOrEmpty(path))
        {//filter your GridWeb related page,here we use 'mygridwebapp' to identify as we assume your page is:http://ip/mygridwebapp/test.aspx
            if (path.ToLower().Contains("mygridwebapp"))
            { // Here the filter code
                return path;
            }
        }
        return base.ConvertToFriendlyUrl(path);
    }
}
//in RoutConfig.cs set the custom url resolver:MyWebFormsFriendlyUrlResolver
public static class RouteConfig
{
    public static void RegisterRoutes(RouteCollection routes)
    {
        var settings = new FriendlyUrlSettings();
        settings.AutoRedirectMode = RedirectMode.Permanent;
        routes.EnableFriendlyUrls(settings, new IFriendlyUrlResolver[] {
                             new MyWebFormsFriendlyUrlResolver() });
    }
}