Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / December 2006



Tip: Looking for answers? Try searching our database.

asp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
iskofajardo@yahoo.com - 12 Dec 2006 07:53 GMT
hello there... i'm just thinking about the windows api with asp.. is it
posible to attach or put the windows api code inside the asp? because i
want to retrieve a client computer name. so i decided to use the
windows api, is it possible? can somebody give me sample?

another question, how can i retrieve a client computer name using
serverVariable? coz i'm using that string in registration form.. i want
automatically call or get the computer name...

thanks in advance...
Patrice - 12 Dec 2006 12:04 GMT
You can't call an API directly from an ASP page. You could create a wrapper
DLL to call this API.

But keep also in mind that the ASP code runs server side.

Here it looks like you want to get the client computer name. The best you
can easily do would be to use the REMOTE_HOST server variables to get its
name or IP (likely IP).

Try :
http://www.w3schools.com/asp/coll_servervariables.asp

Else you could perhaps use a scripting object suhc as :
http://www.winguides.com/scripting/reference.php?id=127 but i('s likely
you'll have to alter the security settings as this is likely not supposed to
be available to all websites you are visiting.

If this is because you want the application to be available from partiuclar
computers this is AFAIK quite difficult. The best you could easily do would
be to make sure that only a single account can use the application from a
single computer at a time (i.e. not possible to open multiple sessions under
the same account). Also what if the user changes its computer...

Signature

Patrice

> hello there... i'm just thinking about the windows api with asp.. is it
> posible to attach or put the windows api code inside the asp? because i
[quoted text clipped - 6 lines]
>
> thanks in advance...
iskofajardo@yahoo.com - 12 Dec 2006 13:16 GMT
thank you so much for the information Patrice...

coz before i thought that the code of windows api can also call
directly to the asp..

> You can't call an API directly from an ASP page. You could create a wrapper
> DLL to call this API.
[quoted text clipped - 32 lines]
> >
> > thanks in advance...
iskofajardo@yahoo.com - 12 Dec 2006 13:23 GMT
how can i create a wrapper DLL, coz i really don't try it even before.

> You can't call an API directly from an ASP page. You could create a wrapper
> DLL to call this API.
[quoted text clipped - 32 lines]
> >
> > thanks in advance...
Patrice - 13 Dec 2006 08:57 GMT
IMO this approach won't work anyway. Keep in mind that as I said the ASP
page runs SERVER SIDE i.e. you'll get the name of the server if this code
runs from the ASP page. This code should run CLIENT SIDE but the user will
have to accept your ActiveX control etc...

I saw in another thread that the goal is that you want to create
automatically a user name upon registration. If this is in your company you
could just use integrated authentication so that the web site automatically
knows who is the user (uisng Request.ServerVariables("AUTH_USER")).

If not it won't work anyway as you could have multiple users having the same
computer name for example (beside the difficulty that likely not worth). See
around and you'll see that you have no web site using this info to create a
user name.

Generaly it is done by using some information entered by the user (email,
some calculation based upon the user lastname and firstname etc...). In some
cases it is just a "random" username (for example some random letters
followed by some random numbers).

Signature

Patrice

how can i create a wrapper DLL, coz i really don't try it even before.

Patrice wrote:
> You can't call an API directly from an ASP page. You could create a
> wrapper
[quoted text clipped - 39 lines]
> >
> > thanks in advance...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.