Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Anil_N_1
Beginner
85 Views

Triggering Of a method 2 times In Intel i7 Processors

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
Black Belt
85 Views

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

 

Anil_N_1
Beginner
85 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.

Bernard
Black Belt
85 Views

Try to put a breakpoint n relevant method/function.

Reply