Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Triggering Of a method 2 times In Intel i7 Processors

Anil_N_1
Beginner
423 Views

Hello All,

I have a very peculiar behavior while using .NET Framework 4.0. I have developed a module to send SMS,A Windows Service that triggers every 1 minute to send any SMS present in the Database using a HTTP API URL. I am Using a method from WebRequest class Webrequest.Create() using that I send my SMS.The issue arises when I deploy this in "Intel Core i7-4770", Based on the web-logs of the Server there seems to have 2 request in the interval of 1 minute. The Same Service When Deployed in "Intel Core 2 Duo E7500" Works Normally triggering 1 Web Request per minute.

string HtmlResult = MakeWebRequestGET(URL); // Method i am using

/*Its Definition*/
public  string MakeWebRequestGET(string url) //url is http api
{
            string result = String.Empty;

            try
            {
                WebRequest WReq = WebRequest.Create(url);
                WebResponse wResp = WReq.GetResponse();
                StreamReader streader = new StreamReader(wResp.GetResponseStream());
                result = streader.ReadToEnd();
                streader.Close();
                wResp.Close();
            }

            catch (Exception ex)
            {
                WriteLog(System.DateTime.Now.TimeOfDay.ToString().Substring(0, 5) +" ##ERROR:SENDING SMS in MakeWebRequestGET()");
                WriteLog(ex.StackTrace);
                WriteLog(ex.Message);
            }

            finally
            {

            }

            return result; //result gives you message id
}

I am unable to Debug what is the issue. Let me know if any information is missing or any additional information is required.

Any help is appreciated.

--

Regards,

Anil Nair

0 Kudos
3 Replies
Bernard
Valued Contributor I
423 Views

Could be OS issue as well. I was thinking about the possibility that timer can be responsible for your issue.

 

0 Kudos
Anil_N_1
Beginner
423 Views

Hi,

The timer works well in my machine "Windows 7". I have tested it in 3 to 4 machines. That includes "Windows 7" 32-bit, "Windows XP" 32-bit,

"Windows Server 2003",64-bit; In all these machines program works fine.I was thinking there is some issues in WebRequest Class implementation in .NET 4 Framework, Could you tell me how can i debug a class in .NET framework??

Thanks For You Reply. :).

--

Regards,

Anil Nair.

0 Kudos
Bernard
Valued Contributor I
423 Views

Try to put a breakpoint n relevant method/function.

0 Kudos
Reply