Re: not able to create socket ,coz of insufficient user rights

From: Abhijeet (abhijeetgupta_at_tataelxsi.co.in)
Date: 08/08/03


Date: Fri, 8 Aug 2003 01:23:19 -0700


Thanks Cris,
Thanks for your quick and valuable information ,
My Answers
1. I already have an old DLL which does many things
including Ping , the ping function is openning Raw
socket.
2. That code is old C++ code (unmanaged).

I have three questions:

1. Is is possible to ping systems in same network domain
(LAN) without using RAw Sockets?
2. I am open to rewrite my ping specific code in C# but
tell me how to host it ? How will I make it Out process ?

3. What benifit I will get if I port my C++ code to C#
code in terms of performance and bugs.

Socket is in System.Net.Sockets Namespace not in
System.Web assembly.

Thanks in advance
-abhijeet

 
>-----Original Message-----
>By default, non-administrative users do not get to open
raw sockets. It's a
>very dangerous operation. Since IIS is using Basic
Authentication, it is
>launching any child processes using the domain
credentials of the user who
>authenticated, which is why it didn't work. If you need
them to work, you'll
>need to host them in a process which has the appropriate
credentials.
>
>Two questions: why do you need raw sockets, and why do
you need unmanaged
>code when you have the system.web.sockets namespace?
>
>--
>Chris Jackson
>Software Engineer
>Microsoft MVP - Windows XP
>Windows XP Associate Expert
>--
>"Abhijeet" <abhijeetgupta@tataelxsi.co.in> wrote in
message
>news:0de801c35cce$b39dfdc0$a101280a@phx.gbl...
>>
>> I am developing a web server in ASP.NET.
>> There are 2 web services in it. I have a C++ (unmanaged)
>> Library whose functions are being called from my C# code
>> with DLLIMPORT attribute.
>>
>> Problem:
>>
>> My C++ library has two functions. Both of them are
opening
>> sockets using Winsock.
>>
>> One function is opening socket
>> like
>> (1)
>> sockRaw = WSASocket(AF_INET,SOCK_RAW,IPPROTO_ICMP,NULL,0
>> ,WSA_FLAG_OVERLAPPED);
>>
>> and the other function is
>> (2)
>> m_Socket = socket(AF_INET, SOCK_STREAM, 0);
>>
>>
>>
>>
>> I login to my this site from different machine in same
>> network domain(LAN). I login with my windows user ID and
>> password of that system. I am able to login with
>> administrative rights as well as with user rights. All
the
>> users are of the system where the webserver is running.
>>
>> My problem is :
>>
>> When I login with normal user ID password API (1) is
>> failing, I am not able to debug this code. But it is
>> failing. Whereas in case of administrator every thing is
>> working fine.
>> Or in other word I would say that WSASocket is failing
in
>> to create socket because of insufficient user rights.
>>
>> This is very strange for me , I don't know how it is
>> happening so kindly help me or suggest me what I should
do.
>>
>> IIS settings:
>> I set my Directory security to Basic Authentication.
>>
>> System:
>> I am using
>> WINDOWS 2000 service pack 3
>> IIS 5.0
>> Dot net 2002 with Framework 1.1.
>>
>> Thanks in advance
>>
>> abhijeet
>>
>
>
>.
>



Relevant Pages

  • Multithreading Socket Problem
    ... I am trying to implement a ping client that is multithreading. ... approach I have used is to create a ping class which I instantiate ... On reception of data on the socket the callback method referenced by ... is called and I cast the IAsyncResult asyn object to the CSocketPacket ...
    (microsoft.public.dotnet.languages.csharp)
  • ICMP Ping ohne Admin
    ... Nun mache ich eine Socket Verbindung vom Type ICMP auf. ... Klappt auch wünderschon aber wenn man mit eingeschränkten Benutzerrechten arbeitet wird der Socket anfrage geblockt und die Fehlermeldung "" ausgegeben. ... Rein aus Interesse, wenn ich die Ping Klasse aus .NET 2.0 nehme, gibt es dann auch dieses Problem? ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: Sockets of domain controller cant be accessed by domain users
    ... > utility 'ping' and my utility 'ping'? ... > I run them under the same domain user account and they behave differently. ... > I assume they both make use raw socket and work essentially the same way. ... I try to run ping utility to ping the box. ...
    (microsoft.public.win2000.security)
  • Re: Ping ohne Admin-Account
    ... // Initialize a Socket of Type ICMP ... Bevor ich den Browser mit einer speziellen URL anwerfe moechte ich die Netzverbindung zum entsprechenden Server einfach per Ping ... Was auch ohne Probleme mit Adminrechten funkt. ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: How hard is socket programming?
    ... There are several interpretations to the phrase "raw sockets". ... if you don't use CAsyncSocket but use the base socket API including the select ... you are doing "raw socket programming". ... If you implmenet the low-level protocol (remember the one I gave with the length followed ...
    (microsoft.public.vc.mfc)