Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why we can not read this registry entry?
Message
De
05/03/2003 11:16:12
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00761332
Message ID:
00761541
Vues:
29
This message has been marked as a message which has helped to the initial question of the thread.
>>
>>Through ASP on the server? Because the authenticated user does not have permissions?
>>
>>I haven't tried instantiating the WScript.Shell, but you may need to fiddle with the permissions for the web site/virtual directory.
>
>Could you please elaborate more? Did you try to run it from ASP on your computer? Or from VB?
>
>Thanks in advance.

Well, this is the ASP forum and thus my question. ASP can have both server and client side script, and depending on that is where the script runs. The RUNAT= parameter on top of your SCRIPT tag would control that.

When the script is running on the server it runs under the context of the IIS account, whatever that might be. By default IIS creates an IUSR account local to the machine where it's installed (the web server). But you can change that if you need this account to access resources on the network where you will need a network account. The default IUSR account is created with minimal permissions, and to read the HKLM registry key most likely you need admin privileges. This might be the reason why you can't read this value.

If this script is set to run on the client side in all probability you can't even instantiate the WScript.Shell.

In ASP there is a collection of values called the server variables which give you all sorts of information from client and server, like the server name, (if that's what you are trying to read) the client's browser name and version, the logged-in user name (at the client) and other interesting bits. Check this out on the IIS help.

HTH,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform