|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HttpWebRequest Fails When Run as Non-Admin Account On Vistafails. On Vista, as Adminit works with no problems. On XP it works with no problem as admin or non-admin. Please Help!!! Error, code to follow: ============================= F:\>webtest Message: Unable to read data from the transport connection: A non-blocking socket operation could not be completed immediately. StackTrace: at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.IO.StreamReader.ReadBuffer() at System.IO.StreamReader.ReadToEnd() at WebTest.WebTest.Main(String[] args) Inner Exception: System.Net.Sockets.SocketException: A non-blocking socket operation could not be completed immediately at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) Done Code ========================= using System; using System.Net; using System.IO; namespace WebTest { class WebTest { static void Main(string[] args) { try{ HttpWebRequest webreq = (HttpWebRequest)WebRequest.Create("http://www.merriam-webster.com/dictionary/automobile"); WebResponse webresp = webreq.GetResponse(); Stream s = webresp.GetResponseStream(); StreamReader sr = new StreamReader(s); string page = sr.ReadToEnd(); webresp.Close(); Console.WriteLine("no error"); } catch(Exception e) { string err = "Message: " + e.Message + Environment.NewLine; err += "StackTrace: " + e.StackTrace; err += "Inner Exception: " + e.InnerException; Console.WriteLine(err); } Console.WriteLine("Done"); } } } Try allowing a blocking connection...
Show quoteHide quote news:CB1476D5-B3F4-422E-8B44-ADE3D767B817@microsoft.com... > When I run the code below on Vista 32 (or 64) with a non admin account it > fails. On Vista, as Adminit works with no problems. On XP it works with > no > problem as admin or non-admin. > > Please Help!!! > > Error, code to follow: > ============================= > F:\>webtest > Message: Unable to read data from the transport connection: A non-blocking > socket operation could not be completed immediately. > StackTrace: at System.Net.ConnectStream.Read(Byte[] buffer, Int32 > offset, > Int32 size) > at System.IO.StreamReader.ReadBuffer() > at System.IO.StreamReader.ReadToEnd() > at WebTest.WebTest.Main(String[] args) > Inner Exception: System.Net.Sockets.SocketException: A non-blocking socket > operation could not be completed immediately > at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 > size, SocketFlags socketFlags) > at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, > Int32 size) > Done > > Code > ========================= > using System; > using System.Net; > using System.IO; > > namespace WebTest > { > class WebTest > { > static void Main(string[] args) > { > try{ > HttpWebRequest webreq = > (HttpWebRequest)WebRequest.Create("http://www.merriam-webster.com/dictionary/automobile"); > WebResponse webresp = webreq.GetResponse(); > Stream s = webresp.GetResponseStream(); > StreamReader sr = new StreamReader(s); > string page = sr.ReadToEnd(); > webresp.Close(); > Console.WriteLine("no error"); > } > catch(Exception e) > { > string err = "Message: " + e.Message + Environment.NewLine; > err += "StackTrace: " + e.StackTrace; > err += "Inner Exception: " + e.InnerException; > > Console.WriteLine(err); > } > Console.WriteLine("Done"); > } > } > } > >
Digitally sign files from within a web application
PGP - recommendations Storing a private key Another StrongNameIdentityPermission/LinkDemand question SIMple SSL question ?? how to grant the application the required permission? Use of Unrestricted flag ??? security warning in self signed certificate Authentication method ?? IIS 5.1 security |
|||||||||||||||||||||||