Click here to Skip to main content
15,913,313 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: None Object Oriented Control Pin
Not Active27-Oct-11 2:43
mentorNot Active27-Oct-11 2:43 
GeneralRe: None Object Oriented Control Pin
Ali Al Omairi(Abu AlHassan)27-Oct-11 4:53
professionalAli Al Omairi(Abu AlHassan)27-Oct-11 4:53 
GeneralRe: None Object Oriented Control Pin
Not Active27-Oct-11 5:28
mentorNot Active27-Oct-11 5:28 
GeneralRe: None Object Oriented Control Pin
Ali Al Omairi(Abu AlHassan)27-Oct-11 7:43
professionalAli Al Omairi(Abu AlHassan)27-Oct-11 7:43 
GeneralRe: None Object Oriented Control Pin
Not Active27-Oct-11 7:46
mentorNot Active27-Oct-11 7:46 
GeneralRe: None Object Oriented Control Pin
Ali Al Omairi(Abu AlHassan)29-Oct-11 14:19
professionalAli Al Omairi(Abu AlHassan)29-Oct-11 14:19 
AnswerRe: None Object Oriented Control Pin
jkirkerx28-Oct-11 19:53
professionaljkirkerx28-Oct-11 19:53 
QuestionHow to read server registry from client (or host)? Pin
WomblingFree25-Oct-11 13:15
WomblingFree25-Oct-11 13:15 
Hi I have a VB/ASP.net app which includes a small user database for login data. This location of this database is stored in registry (HKCU) and read by a web page on the client machine (actually server side code) to authenticate the user.
The reason for this is that the Db is installed and managed via a config app installed on the server so the web client doesn't know the Db's location until it reads the registry value set by the config app.

This all works fine on the VS development machine but I cannot read the registry value from the client web app when deployed. I just receive null values.
Same result if using the web page from the server (localhost).
I've mucked about with long enough to guess its probably a permissions thing but I've no idea where to turn to now.

This is the code that is called on the server side app to retrieve the registry value-

VB
Public Function RegistryGet(ByVal regKey As String) As String
      Try
          Dim regNode As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\XYZ\appX", True)
          If regNode Is Nothing Then Call RegistryCreate()
          RegistryGet = CStr(regNode.GetValue(regKey, ""))
          If RegistryGet.ToString Is Nothing Then
              RegistryGet = ""
          End If
          regNode.Close()
      Catch ex As Exception
          Return ""
      End Try
  End Function 'RegistryGet



This works fine normally but not on the deployed app. Just returns a null yet it can see the registry key and string when stepped through in debug.

BTW, there is definitely a string value to read and all the string/key names match up.

Has anyone any experience with reading server registry from a web form?

regards
Malcom
AnswerRe: How to read server registry from client (or host)? Pin
Bernhard Hiller25-Oct-11 20:15
Bernhard Hiller25-Oct-11 20:15 
GeneralRe: How to read server registry from client (or host)? Pin
WomblingFree26-Oct-11 9:37
WomblingFree26-Oct-11 9:37 
AnswerRe: How to read server registry from client (or host)? Pin
jkirkerx28-Oct-11 19:59
professionaljkirkerx28-Oct-11 19:59 
Questionhow to proceed Pin
Marcel Vreuls (www.agentbase.nl)25-Oct-11 11:18
Marcel Vreuls (www.agentbase.nl)25-Oct-11 11:18 
AnswerRe: how to proceed Pin
Not Active25-Oct-11 12:15
mentorNot Active25-Oct-11 12:15 
GeneralRe: how to proceed Pin
Marcel Vreuls (www.agentbase.nl)25-Oct-11 13:25
Marcel Vreuls (www.agentbase.nl)25-Oct-11 13:25 
GeneralRe: how to proceed Pin
Paul Conrad25-Oct-11 19:40
professionalPaul Conrad25-Oct-11 19:40 
GeneralRe: how to proceed Pin
Marcel Vreuls (www.agentbase.nl)25-Oct-11 20:48
Marcel Vreuls (www.agentbase.nl)25-Oct-11 20:48 
QuestionEmail Not be recognised as a link Pin
<<Tash18>>25-Oct-11 4:16
<<Tash18>>25-Oct-11 4:16 
AnswerRe: Email Not be recognised as a link Pin
Not Active25-Oct-11 5:16
mentorNot Active25-Oct-11 5:16 
AnswerRe: Email Not be recognised as a link Pin
Bernhard Hiller25-Oct-11 20:18
Bernhard Hiller25-Oct-11 20:18 
QuestionMaster pages Pin
parthibandharma24-Oct-11 21:27
professionalparthibandharma24-Oct-11 21:27 
AnswerRe: Master pages Pin
JacquesDP25-Oct-11 10:56
JacquesDP25-Oct-11 10:56 
AnswerRe: Master pages Pin
jkirkerx28-Oct-11 20:06
professionaljkirkerx28-Oct-11 20:06 
QuestionRDLC Report wizard error Pin
Blikkies24-Oct-11 21:15
professionalBlikkies24-Oct-11 21:15 
AnswerRe: RDLC Report wizard error Pin
JacquesDP24-Oct-11 23:22
JacquesDP24-Oct-11 23:22 
Questionwrite the code forget password Pin
ankush teotia24-Oct-11 16:59
ankush teotia24-Oct-11 16:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.