Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Windows Server 2008 - Error reading configuration information fromthe registry.

 
Thread Tools Search this Thread
Old 11-03-2009, 01:23 PM   #1
Default Windows Server 2008 - Error reading configuration information fromthe registry.


All,

I get the following error when my web page tries to read from the registry:

Configuration Error
Description: An error occurred during the processing of a configuration
file required to service this request. Please review the specific error
details below and modify your configuration file appropriately.

Parser Error Message: Error reading configuration information from the
registry.

Source Error:

Line 54: -->
Line 55: <authentication mode="Windows"/>
Line 56: <identity impersonate="true"
Line 57: userName=
"registry:HKLM\SOFTWARE\app\identity\ASPNET_SETREG ,userName"
Line 58: password =
"registry:HKLM\SOFTWARE\app\identity\ASPNET_SETREG ,password"

I have given the NETWORK SERVICE read access rights to this key but the
error still appears. I can't grant access to the ASPNET user as this
user doesn't exist.

Any ideas?

Iain


Iain
  Reply With Quote
Old 11-04-2009, 10:19 AM   #2
Alexey Smirnov
 
Posts: n/a
Default Re: Windows Server 2008 - Error reading configuration informationfrom the registry.
On Nov 3, 2:23*pm, Iain <i...@test.co.uk> wrote:
> All,
>
> I get the following error when my web page tries to read from the registry:
>
> Configuration Error
> Description: An error occurred during the processing of a configuration
> file required to service this request. Please review the specific error
> details below and modify your configuration file appropriately.
>
> Parser Error Message: Error reading configuration information from the
> registry.
>
> Source Error:
>
> Line 54: * * * * -->
> Line 55: * * * * * * * *<authentication mode="Windows"/>
> Line 56: * * <identity impersonate="true"
> Line 57: * * * userName=
> "registry:HKLM\SOFTWARE\app\identity\ASPNET_SETREG ,userName"
> Line 58: * * * password =
> "registry:HKLM\SOFTWARE\app\identity\ASPNET_SETREG ,password"
>
> I have given the NETWORK SERVICE read access rights to this key but the
> error still appears. I can't grant access to the ASPNET user as this
> user doesn't exist.
>
> Any ideas?
>
> Iain


Hi Iain

I've tried to follow you problem. I've created a test website under
IIS7 (Server Standard, SP2, x64) and run

aspnet_setreg -k:SOFTWARE\app\identity -u:"username" -p:"password"

This resulted to "Please edit your configuration to contain the
following:"

userName="registry:HKLM\SOFTWARE\app\identity\ASPN ET_SETREG,userName"
password="registry:HKLM\SOFTWARE\app\identity\ASPN ET_SETREG,password"

Following information from the output I created a web.config as

<configuration>
<system.web>
<identity impersonate="true"
userName="registry:HKLM\SOFTWARE\app\identity
\ASPNET_SETREG,userName"
password="registry:HKLM\SOFTWARE\app\identity
\ASPNET_SETREG,password">
</identity>
</system.web>
</configuration>

and got the same error message as in your case "Error reading
configuration information from the registry"

Then I went to registry and found that instead of HKLM\SOFTWARE....
the key for ASPNET_SETREG was created at

HKEY_CURRENT_USER\Software\Classes\VirtualStore\MA CHINE\SOFTWARE
\Wow6432Node\app\identity\ASPNET_SETREG

So, I manually created app\identity\ASPNET_SETREG under
HKEY_LOCAL_MACHINE\SOFTWARE and added two binary keys for userName and
password. I copied binary contents from the keys created by
aspnet_setreg and run the test site again. It works! Now asp.net is
able to find registry settings. I am not sure why aspnet_setreg
creates settings under wrong keys. Perhaps we should report about this
problem to Microsoft, as far as I see there is nothing on this on
MSDN.

Hope this helps.


Alexey Smirnov
  Reply With Quote
Old 11-04-2009, 10:44 AM   #3
Iain
 
Posts: n/a
Default Re: Windows Server 2008 - Error reading configuration informationfrom the registry.
Alexey Smirnov wrote:
>
> So, I manually created app\identity\ASPNET_SETREG under
> HKEY_LOCAL_MACHINE\SOFTWARE and added two binary keys for userName and
> password. I copied binary contents from the keys created by
> aspnet_setreg and run the test site again. It works! Now asp.net is
> able to find registry settings. I am not sure why aspnet_setreg
> creates settings under wrong keys. Perhaps we should report about this
> problem to Microsoft, as far as I see there is nothing on this on
> MSDN.
>
> Hope this helps.


Hi Alexey

Thanks for the reply. I've checked my settings and the following
registry key that I am trying to read exists :

HKEY_LOCAL_MACHINE\SOFTWARE\app\Identity\ASPNET_SE TREG

So it seems aspnet_setreg has created the correct registry entry.

The problem I reckon is down to permissions. I had the same eror message
on another machine, but adding the ASPNET user to have read access to
this key solved the problem. On Windows Server 2008 (where the web page
is hosted) doesn't have a ASPNET user. Someone recommended adding
"NETWORK SERVICE" to have read access to the above key but this didn't
solve the problem.

Any further help would be greatly appreciated.

Regards
Iain



Iain
  Reply With Quote
Old 11-04-2009, 11:42 AM   #4
Alexey Smirnov
 
Posts: n/a
Default Re: Windows Server 2008 - Error reading configuration informationfrom the registry.
On Nov 4, 11:44*am, Iain <i...@test.co.uk> wrote:
> Alexey Smirnov wrote:
>
> > So, I manually created app\identity\ASPNET_SETREG under
> > HKEY_LOCAL_MACHINE\SOFTWARE and added two binary keys for userName and
> > password. I copied binary contents from the keys created by
> > aspnet_setreg and run the test site again. It works! Now asp.net is
> > able to find registry settings. I am not sure why aspnet_setreg
> > creates settings under wrong keys. Perhaps we should report about this
> > problem to Microsoft, as far as I see there is nothing on this on
> > MSDN.

>
> > Hope this helps.

>
> Hi Alexey
>
> Thanks for the reply. I've checked my settings and the following
> registry key that I am trying to read exists :
>
> HKEY_LOCAL_MACHINE\SOFTWARE\app\Identity\ASPNET_SE TREG
>
> So it seems aspnet_setreg has created the correct registry entry.
>
> The problem I reckon is down to permissions. I had the same eror message
> on another machine, but adding the ASPNET user to have read access to
> this key solved the problem. On Windows Server 2008 (where the web page
> is hosted) doesn't have a ASPNET user. Someone recommended adding
> "NETWORK *SERVICE" to have read access to the above key but this didn't
> solve the problem.
>
> Any further help would be greatly appreciated.
>
> Regards
> Iain


hm. that's strange... why it is different for me.

Regarding your problem. What settings are you using? Mode=Classic? In
the web.config file <identity impersonate="false/true"/> ?

Make a test page to see what account is running

<%@Page>

Hello, <%=System.Security.Principal.WindowsIdentity.GetCu rrent().Name
%>


Alexey Smirnov
  Reply With Quote
Old 11-04-2009, 11:56 AM   #5
Iain
 
Posts: n/a
Default Re: Windows Server 2008 - Error reading configuration informationfrom the registry.
Alexey Smirnov wrote:
> hm. that's strange... why it is different for me.
>
> Regarding your problem. What settings are you using? Mode=Classic? In
> the web.config file <identity impersonate="false/true"/> ?
>
> Make a test page to see what account is running
>
> <%@Page>
>
> Hello, <%=System.Security.Principal.WindowsIdentity.GetCu rrent().Name
> %>

Test page returns the domain I'm part of and my username, for example

mydomain/iain

For mode, do you mean <authentication mode> , if so this is set to :

<authentication mode="Windows"/>

Other setting is :

<identity impersonate="true"
userName="registry:HKLM\SOFTWARE\app\identity\ASPN ET_SETREG,userName"
password="registry:HKLM\SOFTWARE\app\identity\ASPN ET_SETREG,password"
/>


Iain
  Reply With Quote
Old 11-04-2009, 02:31 PM   #6
Alexey Smirnov
 
Posts: n/a
Default Re: Windows Server 2008 - Error reading configuration informationfrom the registry.
On Nov 4, 12:56*pm, Iain <i...@test.co.uk> wrote:
> Alexey Smirnov wrote:
>
> * > hm. that's strange... why it is different for me.
>
> > Regarding your problem. What settings are you using? Mode=Classic? In
> > the web.config file <identity impersonate="false/true"/> ?

>
> > Make a test page to see what account is running

>
> > <%@Page>

>
> > Hello, <%=System.Security.Principal.WindowsIdentity.GetCu rrent().Name
> > %>

>
> Test page returns the domain I'm part of and my username, for example
>
> mydomain/iain
>


This is the reason why you can't read registry. You granted Network
Service to read the key but you used impersonation and running the
thread under your account. You either should disable impersonation or
add your account to read the key.


Alexey Smirnov
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How could I do?? (updates) Corsair Windows 64bit 5 06-17-2007 04:57 PM
Disabling Task Mgr. in Windows XP Bob H Computer Support 9 02-05-2006 05:02 AM
Internet Firewall FAQ in Italian William L. Sun Computer Security 6 02-11-2005 01:22 PM
Internet Firewall FAQ in German William L. Sun Computer Security 0 02-06-2005 12:46 AM
Re: windows 2000 sp4 is a must PhilGreg Computer Support 0 07-17-2003 04:38 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46