PC Review


Reply
Thread Tools Rate Thread

3rd attempt: UDP Socket Bug

 
 
Bryan Martin
Guest
Posts: n/a
 
      7th Jan 2004
Using udp sockets inside a class called by ASP.NET

By impersonating you can use a TCP socket from a external class and call it
from a ASP.NET page. However, changing the socket type to UDP and binding
it to a port throws an error "An attempt was made to access a socket in a
way forbidden by its access permissions".

I tried all the methods I knew of to get this to work such as...
ASPNET added the account to the local administrators
ASPNET act as part of the os inside local policy
<identity impersonate="true" userName="administrator" password="*****" />
inside the web.config file.
System.Security.Principal.WindowsIdentity.GetCurrent.Impersonate inside code
I have seen (http://support.microsoft.com/default...b;EN-US;195445)

Environment:
W2K Advanced Server SP4 IIS 5
VS.NET 1.0

This leaves me at a loss on how to get my class to run from a ASP.NET page.
I have searched the web and msdn without success. If anyone knows something
I dont then please speak up.

Bryan

See http://myplaceinspace.com/testclass.txt file for example
class. Calling this from ASP.NET gives the same result on win2ksp4 IIS5.

"An attempt was made to access a socket in a way forbidden by its access
permissions"

 
Reply With Quote
 
 
 
 
Feroze [MSFT]
Guest
Posts: n/a
 
      7th Jan 2004
Looks like you are binding to the local DNS port, and you are already having
an existing process listening on that port. That is why you get that
exception.

do you have a DNS server running on that machine ?

--
Remove "user" from the email address to reply to the author.

This posting is provided "AS IS" with no warranties, and confers no rights

Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm




"Bryan Martin" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> Using udp sockets inside a class called by ASP.NET
>
> By impersonating you can use a TCP socket from a external class and call

it
> from a ASP.NET page. However, changing the socket type to UDP and binding
> it to a port throws an error "An attempt was made to access a socket in a
> way forbidden by its access permissions".
>
> I tried all the methods I knew of to get this to work such as...
> ASPNET added the account to the local administrators
> ASPNET act as part of the os inside local policy
> <identity impersonate="true" userName="administrator" password="*****" />
> inside the web.config file.
> System.Security.Principal.WindowsIdentity.GetCurrent.Impersonate inside

code
> I have seen

(http://support.microsoft.com/default...b;EN-US;195445)
>
> Environment:
> W2K Advanced Server SP4 IIS 5
> VS.NET 1.0
>
> This leaves me at a loss on how to get my class to run from a ASP.NET

page.
> I have searched the web and msdn without success. If anyone knows

something
> I dont then please speak up.
>
> Bryan
>
> See http://myplaceinspace.com/testclass.txt file for example
> class. Calling this from ASP.NET gives the same result on win2ksp4 IIS5.
>
> "An attempt was made to access a socket in a way forbidden by its access
> permissions"
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: 4th attempt: UDP Socket Bug Chris Botha Microsoft Dot NET 3 9th Jan 2004 12:47 AM
Re: 4th attempt: UDP Socket Bug Chris Botha Microsoft Dot NET Framework 3 9th Jan 2004 12:47 AM
3rd attempt: UDP Socket Bug Bryan Martin Microsoft C# .NET 1 7th Jan 2004 09:06 PM
3rd attempt: UDP Socket Bug Bryan Martin Microsoft VB .NET 0 7th Jan 2004 02:32 AM
Re: 2nd attempt: UDP Socket Bug John Timney \(Microsoft MVP\) Microsoft VB .NET 3 5th Jan 2004 10:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:58 PM.