Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

ms sec fix caused SocketException: An attempt was made to access a socket in a way forbidden by its access permissions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Les Caudle - 13 Mar 2008 15:56 GMT
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
Les Caudle - 13 Mar 2008 18:40 GMT
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

>I've got code that's been working for years.
>
[quoted text clipped - 18 lines]
>
>How can I resolve this?
Steven Cheng - 14 Mar 2008 08:37 GMT
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@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.

--------------------
>From: Les Caudle <DotNetWannabe@newsgroup.nospam>
>Subject: Re: ms sec fix caused SocketException: An attempt was made to
access a socket in a way forbidden by its access permissions
>Date: Thu, 13 Mar 2008 12:40:57 -0500

>Actually, it fails on the TcpServerChannel chnl = new
>TcpServerChannel(props,srv);  - and only on Win2003 Server.
[quoted text clipped - 28 lines]
>>
>>How can I resolve this?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.