TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kiran Suthar
NA
7
0
Operation has timed out Exception
Nov 30 2005 9:03 AM
Dear friends, I am developing one Windows application under C# (.NET 2003) which uses HttpWebRequest and HttpWebResponse. I have written the following code in application. // Code Start HttpWebRequest HWReq1 = null; HttpWebResponse HWResp1 = null; try { HWReq1 = (HttpWebRequest) WebRequest.Create("http://www.google.co.in/search?q=India"); HWReq1.Timeout=25000; HWReq1.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215)"; HWReq1.AllowAutoRedirect= true; HWReq1.Method="POST"; HWReq1.ContentType = "text/html"; HWResp1 = (HttpWebResponse)HWReq1.GetResponse(); } catch(Exception ex) { MessageBox.Show(ex.Message); } // Code End When I run the above code i get an exception "Operation has timed out" I have tried with different Timeout property including -1 (infinite) but it doesnt work. but when i run the same code in .NET 2005 windows application , it runs successfully without any Error. Can any one help me and tell me that why this is happening ?
Reply
Answers (
0
)
AssemblyName.GetAssemblyName - BadImageFormatException not Working
Set database location of a crystal report dynamically