Prev: Get registry keys over wmi on a remote host?
Next: An attempt was made to access a socket in a way forbidden by its access permissions
From: Ahmad on 6 Apr 2010 12:45 hi I use Vista and Vs 2008 and when i write this code:"Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);" i have this exception { An attempt was made to access a socket in a way forbidden by its access permissions error code: 10013 SocketErrorCode: System.Net.Sockets.SocketError.AccessDenied } I turn off the firewall,antivirus and i,m the administartor but the still!!!!!!!!!!!!! please any one can help me? Les Caudle wrote: ms sec fix caused SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 13-Mar-08 I've got code that's been working for years. This is running on Win2003 Server whiled logged in as the admin. When the MS sec fixes were installed last night, this code now fails with: System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions IDictionary props = new Hashtable(); props["name"] = "tcp"; props["port"] = 1234; props["rejectRemoteRequests"] = "true"; props["bindTo"]= "127.0.0.1"; BinaryServerFormatterSinkProvider srv = new BinaryServerFormatterSinkProvider(); TcpServerChannel chnl = new TcpServerChannel(props,srv); ChannelServices.RegisterChannel(chnl, false); // fails at this point How can I resolve this? -- Thanks in advance, Les Caudle Previous Posts In This Thread: On Thursday, March 13, 2008 10:56 AM Les Caudle wrote: ms sec fix caused SocketException: An attempt was made to access a socket in a way forbidden by its access permissions I've got code that's been working for years. This is running on Win2003 Server whiled logged in as the admin. When the MS sec fixes were installed last night, this code now fails with: System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions IDictionary props = new Hashtable(); props["name"] = "tcp"; props["port"] = 1234; props["rejectRemoteRequests"] = "true"; props["bindTo"]= "127.0.0.1"; BinaryServerFormatterSinkProvider srv = new BinaryServerFormatterSinkProvider(); TcpServerChannel chnl = new TcpServerChannel(props,srv); ChannelServices.RegisterChannel(chnl, false); // fails at this point How can I resolve this? -- Thanks in advance, Les Caudle On Thursday, March 13, 2008 1:40 PM Les Caudle wrote: Actually, it fails on the TcpServerChannel chnl = Actually, it fails on the TcpServerChannel chnl = new TcpServerChannel(props,srv); - and only on Win2003 Server. As the user has admin priv, I don't see how it can fail to have proper permissions. Anyone have a clue - I'm dead in the water until I resolve this? Thanks, Les Caudle On Thu, 13 Mar 2008 09:56:25 -0500, Les Caudle <DotNetWannabe(a)newsgroup.nospam> wrote: On Friday, March 14, 2008 3:37 AM stchen wrote: Hi Les,From your description, the remoting application used to work but stop Hi Les, From your description, the remoting application used to work but stop working after installed some windows security updates on the machine, correct? As you mentioned that it is the TCP server channel that cause the problem. I think it maybe caused by the remoting runtime failed to start listening on the port you specified. Have you enabled windows firewall on the server machine, maybe the sec patch has reset the port setting. If this is the case, you can try add the port as exception. Also, you can check whether there is other firewall software that may block the listening port. BTW, for general test, you can also try running a normal socket program which listen on the certain tcp port to see whether it works. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg(a)microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- access a socket in a way forbidden by its access permissions <DotNetWannabe(a)newsgroup.nospam> socket in a BinaryServerFormatterSinkProvider(); Submitted via EggHeadCafe - Software Developer Portal of Choice WPF Circular Progress Indicator http://www.eggheadcafe.com/tutorials/aspnet/4d89b4cb-ba59-4362-ab0a-cc047643fd42/wpf-circular-progress-ind.aspx |