Ask a Question related to ASP.NET Security, Design and Development.
-
John Timney \(Microsoft MVP\) #1
Re: 2nd attempt: UDP Socket Bug
This could have been fixed but I'm pretty sure I recall this sometime ago as
an unresolved bug. Can you get this to work from a standard console app?
--
Regards
John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------
"Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
news:eZvN5Ew0DHA.1916@TK2MSFTNGP10.phx.gbl...it> Using udp sockets inside a class called by ASP.NET
>
> By impersonating you can use a TCP socket from a external class and callcode> 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([url]http://support.microsoft.com/default.aspx?scid=kb;EN-US;195445[/url])> I have seenpage.>
> Equipment & Software:
> 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.NETsomething> I have searched the web and msdn without success. If anyone knows> I dont then please speak up.
>
> Bryan
>
>
>
> See the attached 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"
>
>
>
>
John Timney \(Microsoft MVP\) Guest
-
simple (first attempt) mxi
ok guys decided to look into extension writing have hacked away at the config dir and files within to produce what im after. a simple button... -
4th attempt: UDP Socket Bug
First make sure that the code works and that it is not some other problem, thus run the code in a normal windows app. Then make sure your... -
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... -
Socket.accept problem via Socket.for_fd($stdin.fileno)
Hi, I am experiencing a rather infuriating problem with Socket.accept on Windows XP. The problem exists when I try to create a Socket from... -
Distinguishing between socket buffer full & socket disconnected
I am using the IO::Select method can_write() to flow control the writing of a large amount of data to a socket, where the writer may well run ahead... -
Bryan Martin #2
Re: 2nd attempt: UDP Socket Bug
Yes this will run as a console app. Also as said simply changing the socket
type to TCP will also work. You state this could have been fixed... Can
you point me anywhere where that shows how to make this function. I posted
the same question a few months back and received no response.
"John Timney (Microsoft MVP)" <timneyj@despammed.com> wrote in message
news:%23ZJYppw0DHA.3416@tk2msftngp13.phx.gbl...as> This could have been fixed but I'm pretty sure I recall this sometime agobinding> an unresolved bug. Can you get this to work from a standard console app?
>
> --
> Regards
>
> John Timney (Microsoft ASP.NET MVP)
> ----------------------------------------------
> <shameless_author_plug>
> Professional .NET for Java Developers with C#
> ISBN:1-861007-91-4
> Professional Windows Forms
> ISBN: 1861005547
> Professional JSP 2nd Edition
> ISBN: 1861004958
> Professional JSP
> ISBN: 1861003625
> Beginning JSP Web Development
> ISBN: 1861002092
> </shameless_author_plug>
> ----------------------------------------------
>
> "Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
> news:eZvN5Ew0DHA.1916@TK2MSFTNGP10.phx.gbl...> it> > Using udp sockets inside a class called by ASP.NET
> >
> > By impersonating you can use a TCP socket from a external class and call> > from a ASP.NET page. However, changing the socket type to UDP anda> > it to a port throws an error "An attempt was made to access a socket in/>> > 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="*****"gives> code> > inside the web.config file.
> > System.Security.Principal.WindowsIdentity.GetCurre nt.Impersonate inside> ([url]http://support.microsoft.com/default.aspx?scid=kb;EN-US;195445[/url])> > I have seen> page.> >
> > Equipment & Software:
> > 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> something> > I have searched the web and msdn without success. If anyone knows> > I dont then please speak up.
> >
> > Bryan
> >
> >
> >
> > See the attached file for example class. Calling this from ASP.NET>> > the same result on win2ksp4 IIS5.
> >
> > "An attempt was made to access a socket in a way forbidden by its access
> > permissions"
> >
> >
> >
> >
>
Bryan Martin Guest
-
John Timney \(Microsoft MVP\) #3
Re: 2nd attempt: UDP Socket Bug
Hi Bryan,
I recall a conversation about it but have no information if it has actually
been fixed - or if indeed this is actually a problem.
Its a bit strange that UDP works from console but not from asp.net - kinda
suggests its a permissions problem or it has been designed that way - you
probably know more about UDP than I do.
You might need to rethink how you could architect your solution a little
differently in light of this. Sorry I cant be any more help.....I'm kinda
guessing here as the conversation was quite some time ago.
--
Regards
John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------
"Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
news:uTN51ex0DHA.556@TK2MSFTNGP11.phx.gbl...socket> Yes this will run as a console app. Also as said simply changing theposted> type to TCP will also work. You state this could have been fixed... Can
> you point me anywhere where that shows how to make this function. Iago> the same question a few months back and received no response.
>
>
> "John Timney (Microsoft MVP)" <timneyj@despammed.com> wrote in message
> news:%23ZJYppw0DHA.3416@tk2msftngp13.phx.gbl...> > This could have been fixed but I'm pretty sure I recall this sometimeapp?> as> > an unresolved bug. Can you get this to work from a standard consolecall> >
> > --
> > Regards
> >
> > John Timney (Microsoft ASP.NET MVP)
> > ----------------------------------------------
> > <shameless_author_plug>
> > Professional .NET for Java Developers with C#
> > ISBN:1-861007-91-4
> > Professional Windows Forms
> > ISBN: 1861005547
> > Professional JSP 2nd Edition
> > ISBN: 1861004958
> > Professional JSP
> > ISBN: 1861003625
> > Beginning JSP Web Development
> > ISBN: 1861002092
> > </shameless_author_plug>
> > ----------------------------------------------
> >
> > "Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
> > news:eZvN5Ew0DHA.1916@TK2MSFTNGP10.phx.gbl...> > > Using udp sockets inside a class called by ASP.NET
> > >
> > > By impersonating you can use a TCP socket from a external class andin> binding> > it> > > from a ASP.NET page. However, changing the socket type to UDP and> > > it to a port throws an error "An attempt was made to access a socketinside> 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.Impersonateaccess> gives> > code> > ([url]http://support.microsoft.com/default.aspx?scid=kb;EN-US;195445[/url])> > > I have seen> > page.> > >
> > > Equipment & Software:
> > > 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> > something> > > I have searched the web and msdn without success. If anyone knows> > > I dont then please speak up.
> > >
> > > Bryan
> > >
> > >
> > >
> > > See the attached file for example class. Calling this from ASP.NET> > > the same result on win2ksp4 IIS5.
> > >
> > > "An attempt was made to access a socket in a way forbidden by its>> >> > > permissions"
> > >
> > >
> > >
> > >
> >
>
John Timney \(Microsoft MVP\) Guest
-
Bryan Martin #4
Re: 2nd attempt: UDP Socket Bug
Well, this stopped with SP4. Prior to that everything worked to my
knowledge. I think its really cheesy that M$ cant chime in here cause I
know there cruising the groups.
I am 100% sure it is a permission problem. I don't think it is by design
because why would they give me access to TCP but not UDP. Also no matter
how you try security it still yeilds the same results. I fully understand
that UDP is a send and forget but its kinda lame if it turns out to be by
design that M$ doesn't think anymore of its developers than to completely
block access.
Guess I should look at porting it over to J2EE. Probably easier anyway.
Bryan
"John Timney (Microsoft MVP)" <timneyj@despammed.com> wrote in message
news:eUQ3QS90DHA.2308@TK2MSFTNGP11.phx.gbl...actually> Hi Bryan,
>
> I recall a conversation about it but have no information if it hasCan> been fixed - or if indeed this is actually a problem.
>
> Its a bit strange that UDP works from console but not from asp.net - kinda
> suggests its a permissions problem or it has been designed that way - you
> probably know more about UDP than I do.
>
> You might need to rethink how you could architect your solution a little
> differently in light of this. Sorry I cant be any more help.....I'm kinda
> guessing here as the conversation was quite some time ago.
>
> --
> Regards
>
> John Timney (Microsoft ASP.NET MVP)
> ----------------------------------------------
> <shameless_author_plug>
> Professional .NET for Java Developers with C#
> ISBN:1-861007-91-4
> Professional Windows Forms
> ISBN: 1861005547
> Professional JSP 2nd Edition
> ISBN: 1861004958
> Professional JSP
> ISBN: 1861003625
> Beginning JSP Web Development
> ISBN: 1861002092
> </shameless_author_plug>
> ----------------------------------------------
>
> "Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
> news:uTN51ex0DHA.556@TK2MSFTNGP11.phx.gbl...> socket> > Yes this will run as a console app. Also as said simply changing the> > type to TCP will also work. You state this could have been fixed...password="*****"> posted> > you point me anywhere where that shows how to make this function. I> ago> > the same question a few months back and received no response.
> >
> >
> > "John Timney (Microsoft MVP)" <timneyj@despammed.com> wrote in message
> > news:%23ZJYppw0DHA.3416@tk2msftngp13.phx.gbl...> > > This could have been fixed but I'm pretty sure I recall this sometime> app?> > as> > > an unresolved bug. Can you get this to work from a standard console> call> > >
> > > --
> > > Regards
> > >
> > > John Timney (Microsoft ASP.NET MVP)
> > > ----------------------------------------------
> > > <shameless_author_plug>
> > > Professional .NET for Java Developers with C#
> > > ISBN:1-861007-91-4
> > > Professional Windows Forms
> > > ISBN: 1861005547
> > > Professional JSP 2nd Edition
> > > ISBN: 1861004958
> > > Professional JSP
> > > ISBN: 1861003625
> > > Beginning JSP Web Development
> > > ISBN: 1861002092
> > > </shameless_author_plug>
> > > ----------------------------------------------
> > >
> > > "Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
> > > news:eZvN5Ew0DHA.1916@TK2MSFTNGP10.phx.gbl...
> > > > Using udp sockets inside a class called by ASP.NET
> > > >
> > > > By impersonating you can use a TCP socket from a external class and> in> > binding> > > it
> > > > from a ASP.NET page. However, changing the socket type to UDP and> > > > it to a port throws an error "An attempt was made to access a socket> > 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"ASP.NET> inside> > />> > > > inside the web.config file.
> > > > System.Security.Principal.WindowsIdentity.GetCurre nt.Impersonate> > > code
> > > > I have seen
> > > ([url]http://support.microsoft.com/default.aspx?scid=kb;EN-US;195445[/url])
> > > >
> > > > Equipment & Software:
> > > > 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> access> > gives> > > page.
> > > > I have searched the web and msdn without success. If anyone knows
> > > something
> > > > I dont then please speak up.
> > > >
> > > > Bryan
> > > >
> > > >
> > > >
> > > > See the attached file for example class. Calling this from ASP.NET> > > > the same result on win2ksp4 IIS5.
> > > >
> > > > "An attempt was made to access a socket in a way forbidden by its>> >> > > > permissions"
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
>
Bryan Martin Guest



Reply With Quote

