4th attempt: UDP Socket Bug

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Re: 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 impersonation works. Did you switch anonymous access off
    to the virtual directory? Add a test call returning the connecting user
    info, thus return
    System.Security.Principal.WindowsIdentity.GetCurre nt().Name
    and check that it is the expected user.
    If it still does not work, then I'm stumped too.

    "Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
    news:%23kHpEoe1DHA.484@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 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
    ([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 ASP.NET
    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 gives
    > the same result on win2ksp4 IIS5.
    >
    > "An attempt was made to access a socket in a way forbidden by its access
    > permissions"
    >
    >
    >

    Chris Botha Guest

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default Re: 4th attempt: UDP Socket Bug

    This has all been checked and verified. Again, no problems with TCP. This
    does function in windows app as the class will show. Also this same thing
    has functioned on IIS prior to SP4 without problems.

    I guess I will continue to post every few days until I get some kind of
    response from M$ or someone who can point me to supporting documents one way
    or the other.

    Later


    "Chris Botha" <chris_s_botha@AT.h.o.t.m.a.i.l.com> wrote in message
    news:e6Zn9Pg1DHA.1508@TK2MSFTNGP12.phx.gbl...
    > 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 impersonation works. Did you switch anonymous access
    off
    > to the virtual directory? Add a test call returning the connecting user
    > info, thus return
    > System.Security.Principal.WindowsIdentity.GetCurre nt().Name
    > and check that it is the expected user.
    > If it still does not work, then I'm stumped too.
    >
    > "Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
    > news:%23kHpEoe1DHA.484@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 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
    > ([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 ASP.NET
    > 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
    gives
    > > 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

  4. #3

    Default Re: 4th attempt: UDP Socket Bug

    Bryan,

    Try posting this question at [url]www.asp.net[/url]. Many of the ASP.NET development
    team lurk in there and might be able to point you to something. On a
    connected note - have you tried this on a different build spec server
    (perhaps one not service packed), or a different runtime to try to eliminate
    some of the possible causes.

    --
    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:uk6FB8g1DHA.2328@TK2MSFTNGP10.phx.gbl...
    > This has all been checked and verified. Again, no problems with TCP.
    This
    > does function in windows app as the class will show. Also this same thing
    > has functioned on IIS prior to SP4 without problems.
    >
    > I guess I will continue to post every few days until I get some kind of
    > response from M$ or someone who can point me to supporting documents one
    way
    > or the other.
    >
    > Later
    >
    >
    > "Chris Botha" <chris_s_botha@AT.h.o.t.m.a.i.l.com> wrote in message
    > news:e6Zn9Pg1DHA.1508@TK2MSFTNGP12.phx.gbl...
    > > 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 impersonation works. Did you switch anonymous access
    > off
    > > to the virtual directory? Add a test call returning the connecting user
    > > info, thus return
    > > System.Security.Principal.WindowsIdentity.GetCurre nt().Name
    > > and check that it is the expected user.
    > > If it still does not work, then I'm stumped too.
    > >
    > > "Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
    > > news:%23kHpEoe1DHA.484@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
    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
    > > ([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 ASP.NET
    > > 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
    > 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

  5. #4

    Default Re: 4th attempt: UDP Socket Bug

    Thanks for the info and I will try it.

    Yes this was function on this server and one other one prior to SP4.


    "John Timney (Microsoft MVP)" <timneyj@despammed.com> wrote in message
    news:epi$VBk1DHA.1676@TK2MSFTNGP12.phx.gbl...
    > Bryan,
    >
    > Try posting this question at [url]www.asp.net[/url]. Many of the ASP.NET development
    > team lurk in there and might be able to point you to something. On a
    > connected note - have you tried this on a different build spec server
    > (perhaps one not service packed), or a different runtime to try to
    eliminate
    > some of the possible causes.
    >
    > --
    > 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:uk6FB8g1DHA.2328@TK2MSFTNGP10.phx.gbl...
    > > This has all been checked and verified. Again, no problems with TCP.
    > This
    > > does function in windows app as the class will show. Also this same
    thing
    > > has functioned on IIS prior to SP4 without problems.
    > >
    > > I guess I will continue to post every few days until I get some kind of
    > > response from M$ or someone who can point me to supporting documents one
    > way
    > > or the other.
    > >
    > > Later
    > >
    > >
    > > "Chris Botha" <chris_s_botha@AT.h.o.t.m.a.i.l.com> wrote in message
    > > news:e6Zn9Pg1DHA.1508@TK2MSFTNGP12.phx.gbl...
    > > > 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 impersonation works. Did you switch anonymous
    access
    > > off
    > > > to the virtual directory? Add a test call returning the connecting
    user
    > > > info, thus return
    > > > System.Security.Principal.WindowsIdentity.GetCurre nt().Name
    > > > and check that it is the expected user.
    > > > If it still does not work, then I'm stumped too.
    > > >
    > > > "Bryan Martin" <spam@ahwayside.com, [email]uce@ftc.gov[/email]> wrote in message
    > > > news:%23kHpEoe1DHA.484@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
    > 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
    > > > ([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
    ASP.NET
    > > > 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
    > > gives
    > > > > 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139