- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could be OS issue as well. I was thinking about the possibility that timer can be responsible for your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try to put a breakpoint n relevant method/function.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page