Problem with reading Registry Key in HKEY_LOCAL_MACHINE in Asp.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gracepaul
    New Member
    • Jul 2008
    • 28

    Problem with reading Registry Key in HKEY_LOCAL_MACHINE in Asp.net

    how can i understand that what will be my usedid and password when i am creating a registry manually in my computer and read this registry value after uploading my project..i got an error message while i am trying to run my project in web such as 'access is denied'. after searching through web i got an answer like this...add the following in web config file
    <identity impersonate="tr ue" userName="domai n\prasanth" password="pppp1 234" />

    here i don't know what username and password i have to give

    i didn't give any permissions to my registry value

    please help me as early as possible

    thanks
    grace
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    You need to supply admin credentials. If you are running this project under NT authentication (windows), then it will be your rights when you use the app. I am sure you are aware of the risks of changing registry keys. Then there is the additional risk if you run the app under admin rights.

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      The ASP.NET process runs as a particular user (ASPNET or INET_something I think) and that user doesn't have the rights to look at the registry.
      Using Identity impersonate, allows your asp.net application to pretend to be a "real" user that has more rights. So just pick a user who has access to the registry, or create a special user account that has all the rights you want and then tell it to impersonate that "user"?

      Comment

      Working...