private string LayoutOutput(string path) { var pathDefinition = new PathDefinition() { IsWildcard = true, VirtualPath = UrlPath.ResolveUrl("~/" + LayoutVirtualFileResolver.ResolverPath), ResolverName = typeof(LayoutVirtualFileResolver).FullName }; //// Do not use the VirtualPathProvider chain. It may cause unexpected behavior on concurrent requests. string result; var resolver = new LayoutVirtualFileResolver(); using (var streamReader = new StreamReader(resolver.Open(pathDefinition, path))) { result = streamReader.ReadToEnd(); } return(result); }
private string LayoutOutput(string path) { var pathDefinition = new PathDefinition() { IsWildcard = true, VirtualPath = UrlPath.ResolveUrl("~/" + LayoutVirtualFileResolver.ResolverPath), ResolverName = typeof(LayoutVirtualFileResolver).FullName }; //// Do not use the VirtualPathProvider chain. It may cause unexpected behavior on concurrent requests. string result; var resolver = new LayoutVirtualFileResolver(); using (var streamReader = new StreamReader(resolver.Open(pathDefinition, path))) { result = streamReader.ReadToEnd(); } return result; }