ADSI code converstion to VB.net 
Author Message
 ADSI code converstion to VB.net

I really hope someone can help me I have this code a adsi guru coded
(Adrian Forbes )

Code:

                        <%
    sFullUser = trim(Request.ServerVariables ("LOGON_USER"))
if len(sFullUser) = 0 then
Response.Write "You need to disable anonymous access for this code to
work."
Response.End
End if
response.write sFullUser
iPos = InStr(sFullUser, "\")
sDomain = Left(sFullUser, iPos - 1)
sUser = Mid(sFullUser, iPos + 1)

Set objUser = GetObject("WinNT://" & sDomain & "/" & sUser)
%>
                        <p>
                                    Your name
                                    <%=objUser.FullName%>
                        </p>

Now my problem is I used this code extensively to implement a intranet
security modual using .asp now I am converting to ASP.NET using VB.Net
as the code behind but I dont have a clue how to convert this code to
VB.Net  could ANYONE help me how to convert this to vb.net.

Thank you any response would be greatly appreciated!

Carlos

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Sun, 29 Aug 2004 00:43:46 GMT  
 ADSI code converstion to VB.net
Reboot your computer, that should solve all of your problems, AND
successfully port your code from one language to any language you choose!!!
(Just kidding, ignore previous paragraph)

Actually, I was wondering if this was even the right group?  Isn't there a
VB.NET group out there that would probably be able to give you more help
with this?

Personally, I am a little skeptic about moving the entire county over to
.NET until at least the 6 month review has been completed.

Mythran


Quote:
> I really hope someone can help me I have this code a adsi guru coded
> (Adrian Forbes )

> Code:

>                         <%
>     sFullUser = trim(Request.ServerVariables ("LOGON_USER"))
> if len(sFullUser) = 0 then
> Response.Write "You need to disable anonymous access for this code to
> work."
> Response.End
> End if
> response.write sFullUser
> iPos = InStr(sFullUser, "\")
> sDomain = Left(sFullUser, iPos - 1)
> sUser = Mid(sFullUser, iPos + 1)

> Set objUser = GetObject("WinNT://" & sDomain & "/" & sUser)
> %>
>                         <p>
>                                     Your name
>                                     <%=objUser.FullName%>
>                         </p>

> Now my problem is I used this code extensively to implement a intranet
> security modual using .asp now I am converting to ASP.NET using VB.Net
> as the code behind but I don't have a clue how to convert this code to
> VB.Net  could ANYONE help me how to convert this to vb.net.

> Thank you any response would be greatly appreciated!

> Carlos

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sun, 29 Aug 2004 01:15:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB.NET / WSH / ADSI - Where are we going?

2. vb.net code transform to asp.net code?

3. Creating NT User accounts using ADSI (WinNT:) within VB.Net

4. VB.Net - ADSI property name with dashes

5. ADSI and VB.NET

6. ADSI & VB.Net

7. Filter ADSI objects in VB.net

8. ADSI and VB .Net

9. Using ADSI in Vb.NET

10. ADSI and VB.NET

11. Run .NET script code and handle .NET events from inside IE with VsaControl

12. : ADSI code on VB

 

 
Powered by phpBB® Forum Software