473,385 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

3rd attempt: UDP Socket Bug

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.GetCurre nt.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"

Nov 15 '05 #1
1 2603
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" <sp**@ahwayside.com> wrote in message
news:pa****************************@ahwayside.com. ..
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.GetCurre nt.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"

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
4
by: DreJoh | last post by:
I've read many articles on the subject and the majority of them give the same solution that's in article 821625 on the MSDN website. I'm using the following code and when a the client disconnects...
0
by: Bryan Martin | last post by:
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...
0
by: Macca | last post by:
Hi, I am writing an asychronous socket server to handle 20+ simulataneous connections. I have used the example in MSDN as a base. The code is shown at end of question. Each connection has a...
2
by: Dennis | last post by:
I'm getting the following problem occasionally...the application will work perfectly well for a period of time and then this pops up. I have tried turning off the default proxy in the...
3
by: BuddyWork | last post by:
Hello, Could someone please explain why the Socket.Send is slow to send to the same process it sending from. Eg. Process1 calls Socket.Send which sends to the same IP address and port, the...
5
by: darthghandi | last post by:
I've created a class to listen to all interfaces and do a BeginAccept(). Once it gets a connection, it passes the connected socket off and stores it in a List. Next, it continues to listen for...
4
by: O.B. | last post by:
I have a socket configured as TCP and running as a listener. When I close socket, it doesn't always free up the port immediately. Even when no connections have been made to it. So when I open...
1
by: Les Caudle | last post by:
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: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.