we currently have two webservers, i'm trying to make cache system which makes us able to delete a key from the cache in both servers and on different app pools. What i have done is to create a httphandler which i call with querystringparameter called cacheid.
I therefore need to send a request to the httphandler. I see that i need to wait for the response for the http handler. is there a way to skip this. I just want the request to be sent. then right away, free alle resources and contine the executing of the code.my code now lookes like this.
public void DeleteGlobalCacheID(string cacheID)
foreach (WebServer ws in WebServers)
foreach (WebApplication wa in WebApplications)
DeleteRemoteWebApplicationCache(ws, wa, cacheID);
private void DeleteRemoteWebApplicationCache(WebServer webServer, WebApplication webApplication, string cacheid)
string url = webServer.Url.ToString().Remove(webServer.Url.ToString().Length-1) + webApplication.Path.ToString() + "GlobalCacheHandler.axd";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
string data = "cacheid=" + cacheid ;
req.ContentLength = data.Length;
private void SendRequest(HttpWebRequest req, string data)
StreamWriter stOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);