VirtualPathProvider - disabling caching hangs server (IIS and Cassini) -


i have virtual path provider on web site. want simple exception hangs server. happens if many requests come in @ same time.

when remove caching overrides altogether vpp , server run fine caches content must dynamic.

the method used disable caching (which works) simple:

/* appstart class */ public static void appinitialize() {     string strpath = hostingenvironment.applicationphysicalpath.tostring();     webei.textvirtualpathprovider providerinstance = new webei.textvirtualpathprovider();     hostingenvironment hostingenvironmentinstance = (hostingenvironment)typeof(hostingenvironment).invokemember("_thehostingenvironment", bindingflags.nonpublic | bindingflags.static | bindingflags.getfield, null, null, null);     if (hostingenvironmentinstance == null)         return;     methodinfo mi = typeof(hostingenvironment).getmethod("registervirtualpathproviderinternal", bindingflags.nonpublic | bindingflags.static);     if (mi == null)         return;     mi.invoke(hostingenvironmentinstance, new object[] { (virtualpathprovider)providerinstance }); }  /* vpp class */ protected bool isvirtualpath(string virtualpath)  {     return false; }  public override cachedependency getcachedependency(string virtualpath, ienumerable virtualpathdependencies, datetime utcstart) {     return null;*/ }  /* directoryexists, fileexists, getfile typical */} 

however, solution results in hanging server (cassini, iis 6, iis 7, iis 8). hanging lasts few minutes results delivered (i messed browser timeouts part of debugging).

i've tried including test virtual path/file disables caching on virtual urls same results.

to sum up, need , effective way disable caching in vpp.

can help?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -