same iasync result not working for multiple async callbacks

Snippet

httpRequestToConnect.BeginGetResponse(new AsyncCallback(ResponseFromServer), httpRequestToConnect);

https://msdn.microsoft.com/en-us/library/ms228963(v=vs.110).aspx

ResponseFromServer is getting fired only for the 1st client and not other clients. All clients are using the same snippet above to register callback

wait for the specified time (in secs) to load a new app domain after the files changes

  1. Adding following configuration to the site root web.config file. This configuration will wait for the specified time (in secs) to load a new app domain after the files changes.

<httpRuntime targetFramework=”4.5″ waitChangeNotification=”315360000″ maxWaitChangeNotification=”315360000″ />

Pass Credentials from web svc call in .net

HttpClientHandler handler = new HttpClientHandler();
handler.UseDefaultCredentials = true;
HttpClient client = new HttpClient(handler);



HttpWebRequest request   = (HttpWebRequest)WebRequest.Create(Uri);
request.Credentials      = System.Net.CredentialCache.DefaultNetworkCredentials;
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
HttpResponseMessage response = await client.GetAsync( Uri );
response.EnsureSuccessStatusCode();
string responseString = await response.Content.ReadAsStringAsync();
ref :https://social.msdn.microsoft.com/forums/windowsapps/en-us/35e2a7ae-bba0-406a-a10e-f1677dd5a471/setting-defaultcredentials-with-httpclient 

NOTE THAT THESE WORK FOR KERBEROS AUTH ONLY, NOT SITEMINDER

For SITEMINDER Credentials, in case you want to pass the user sm session from web layer to web svc layer, do this: 

1. in web layer, extract the cookies from incoming request and add to the outgoing request :

Snippet
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
            request.CookieContainer = new CookieContainer();
 
            HttpCookieCollection collection = HttpContext.Current.Request.Cookies;
            for (int i = 0; i < collection.Count; i++)
            {
                request.CookieContainer.Add(new Cookie(collection.Get(i).Name, collection.Get(i).Value, "/", "myDomain.com"));
            }
 
            request.Method = "GET";
            String test = String.Empty;
            using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
            {
                Stream dataStream = response.GetResponseStream();
                StreamReader reader = new StreamReader(dataStream);
                test = reader.ReadToEnd();
                reader.Close();
                dataStream.Close();
            }
 
            return test;