Error after upgrading XML parser

G

Guest

Hi,
I recently upgraded my XML parser and the ComInterop code that I had for
my webservice is throwing the following error. For ASP applications, we
created a wrapper class on this web service and expose that class for ASP COM
Interop.

Any suggestion?

Error dump
----------------------------------
Exception: System.Configuration.ConfigurationException
Message: Exception in configuration section handler
(c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config line 136)
Source: System
at
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler
factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
at
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler
factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
at System.Configuration.ConfigurationRecord.Evaluate(String configKey)
at System.Configuration.ConfigurationRecord.ResolveConfig(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig(String configKey)
at System.Configuration.ConfigurationRecord.ResolveConfig(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig(String configKey)
at
System.Configuration.DefaultConfigurationSystem.System.Configuration.IConfigurationSystem.GetConfig(String configKey)
at System.Configuration.ConfigurationSettings.GetConfig(String sectionName)
at System.Net.GlobalProxySelection.get_SelectInternal()
at System.Net.HttpWebRequest..ctor(Uri uri)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri
uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri
uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at Analog.AuthWSWrapper.AuthWSWrapper.isAuthenticated(String rawCookieData)

Nested Exception

Exception: System.Security.SecurityException
Message: Requested registry access is not allowed.
Source: mscorlib
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
at System.Net.ProxyRegBlob.ReadRegSettings()
at System.Net.ProxyRegBlob.ReadRegSettings()
at System.Net.ProxyRegBlob.GetIEProxy()
at System.Net.Configuration.DefaultProxyHandler.Create(Object parent,
Object configContext, XmlNode section)
at
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler
factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
------------------------------------------------------

Line 136 in machine config is
------------------
<defaultProxy>

<!--
The following entry enables reading of the per user (LAN)
Internet settings.
Adding additional proxy settings, without first setting to
"false",
will individually override. Note that "Automatic
configuration" and
"automatic configuration scripts" cannot be read.

<proxy> settings:
usesystemdefault="[true|false]" - Read settings from
Internet Options (see above)
proxyaddress="[string]" - A Uri string of the proxy
server to use.
bypassonlocal="[true|false]" - Enables bypassing of the
proxy for local resources.
-->

<proxy
usesystemdefault="true"
/>

<!-- use this section to disable proxy use for matching servers
example:
............. -->

<!-- use this section to override proxy settings with your own
IWebProxy implementation
example:
.................. -->

</defaultProxy>


-----------------
 
T

tomc

Pritam said:
Hi,
I recently upgraded my XML parser and the ComInterop code that I had for
my webservice is throwing the following error. For ASP applications, we
created a wrapper class on this web service and expose that class for ASP COM
Interop.

Any suggestion?

Error dump
----------------------------------
Exception: System.Configuration.ConfigurationException
Message: Exception in configuration section handler
(c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config line 136)
Source: System
at
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler

factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler

factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
at System.Configuration.ConfigurationRecord.Evaluate(String configKey)
at System.Configuration.ConfigurationRecord.ResolveConfig(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig(String configKey)
at System.Configuration.ConfigurationRecord.ResolveConfig(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig(String configKey)
System.Configuration.DefaultConfigurationSystem.System.Configuration.IConfigurationSystem.GetConfig(String
configKey)
at System.Configuration.ConfigurationSettings.GetConfig(String sectionName)
at System.Net.GlobalProxySelection.get_SelectInternal()
at System.Net.HttpWebRequest..ctor(Uri uri)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at
System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri
System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at Analog.AuthWSWrapper.AuthWSWrapper.isAuthenticated(String rawCookieData)

Nested Exception

Exception: System.Security.SecurityException
Message: Requested registry access is not allowed.
Source: mscorlib
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
at System.Net.ProxyRegBlob.ReadRegSettings()
at System.Net.ProxyRegBlob.ReadRegSettings()
at System.Net.ProxyRegBlob.GetIEProxy()
at System.Net.Configuration.DefaultProxyHandler.Create(Object parent,
Object configContext, XmlNode section)
at
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler

factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
------------------------------------------------------

Line 136 in machine config is
------------------
<defaultProxy>

<!--
The following entry enables reading of the per user (LAN)
Internet settings.
Adding additional proxy settings, without first setting to
"false",
will individually override. Note that "Automatic
configuration" and
"automatic configuration scripts" cannot be read.

<proxy> settings:
usesystemdefault="[true|false]" - Read settings from
Internet Options (see above)
proxyaddress="[string]" - A Uri string of the proxy
server to use.
bypassonlocal="[true|false]" - Enables bypassing of the
proxy for local resources.
-->

<proxy
usesystemdefault="true"
/>

<!-- use this section to disable proxy use for matching servers
example:
............. -->

<!-- use this section to override proxy settings with your own
IWebProxy implementation
example:
.................. -->

</defaultProxy>


-----------------
 
T

tomc

useSystemDefault = true in machine.config tells .NET to look at the
Internet options for the current user (the same ones you would see in
the Internet Options Dialog box in IE). This proxy info is contained
in the HKCU hive in the registry. We have found 2 solutions:

1) Grant everyone "Read permissions" to HKCU -- other hives already
have this permission set by default
2) Change useSystemDefault to false in machine.config

There may be other solutions with even less security impact, but we dis
not consider these to be too bad.


Pritam said:
Hi,
I recently upgraded my XML parser and the ComInterop code that I had for
my webservice is throwing the following error. For ASP applications, we
created a wrapper class on this web service and expose that class for ASP COM
Interop.

Any suggestion?

Error dump
----------------------------------
Exception: System.Configuration.ConfigurationException
Message: Exception in configuration section handler
(c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config line 136)
Source: System
at
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler

factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler

factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
at System.Configuration.ConfigurationRecord.Evaluate(String configKey)
at System.Configuration.ConfigurationRecord.ResolveConfig(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig(String configKey)
at System.Configuration.ConfigurationRecord.ResolveConfig(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig(String configKey)
System.Configuration.DefaultConfigurationSystem.System.Configuration.IConfigurationSystem.GetConfig(String
configKey)
at System.Configuration.ConfigurationSettings.GetConfig(String sectionName)
at System.Net.GlobalProxySelection.get_SelectInternal()
at System.Net.HttpWebRequest..ctor(Uri uri)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at
System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri
System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at Analog.AuthWSWrapper.AuthWSWrapper.isAuthenticated(String rawCookieData)

Nested Exception

Exception: System.Security.SecurityException
Message: Requested registry access is not allowed.
Source: mscorlib
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
at System.Net.ProxyRegBlob.ReadRegSettings()
at System.Net.ProxyRegBlob.ReadRegSettings()
at System.Net.ProxyRegBlob.GetIEProxy()
at System.Net.Configuration.DefaultProxyHandler.Create(Object parent,
Object configContext, XmlNode section)
at
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler

factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
------------------------------------------------------

Line 136 in machine config is
------------------
<defaultProxy>

<!--
The following entry enables reading of the per user (LAN)
Internet settings.
Adding additional proxy settings, without first setting to
"false",
will individually override. Note that "Automatic
configuration" and
"automatic configuration scripts" cannot be read.

<proxy> settings:
usesystemdefault="[true|false]" - Read settings from
Internet Options (see above)
proxyaddress="[string]" - A Uri string of the proxy
server to use.
bypassonlocal="[true|false]" - Enables bypassing of the
proxy for local resources.
-->

<proxy
usesystemdefault="true"
/>

<!-- use this section to disable proxy use for matching servers
example:
............. -->

<!-- use this section to override proxy settings with your own
IWebProxy implementation
example:
.................. -->

</defaultProxy>


-----------------
 
T

tomc

The most surgical solution is to grant read to everyone on just one
single registry key:

HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Connections

--TC


useSystemDefault = true in machine.config tells .NET to look at the
Internet options for the current user (the same ones you would see in
the Internet Options Dialog box in IE). This proxy info is contained
in the HKCU hive in the registry. We have found 2 solutions:

1) Grant everyone "Read permissions" to HKCU -- other hives already
have this permission set by default
2) Change useSystemDefault to false in machine.config

There may be other solutions with even less security impact, but we dis
not consider these to be too bad.


Pritam said:
Hi,
I recently upgraded my XML parser and the ComInterop code that I had for
my webservice is throwing the following error. For ASP
applications,
we
created a wrapper class on this web service and expose that class
for
ASP COM
Interop.

Any suggestion?

Error dump
----------------------------------
Exception: System.Configuration.ConfigurationException
Message: Exception in configuration section handler
(c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config line 136)
Source: System
at
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler
factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler
factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
at System.Configuration.ConfigurationRecord.Evaluate(String configKey)
at System.Configuration.ConfigurationRecord.ResolveConfig(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig(String configKey)
at System.Configuration.ConfigurationRecord.ResolveConfig(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig(String configKey)
System.Configuration.DefaultConfigurationSystem.System.Configuration.IConfigurationSystem.GetConfig(String
configKey)
at System.Configuration.ConfigurationSettings.GetConfig(String sectionName)
at System.Net.GlobalProxySelection.get_SelectInternal()
at System.Net.HttpWebRequest..ctor(Uri uri)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri
System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at Analog.AuthWSWrapper.AuthWSWrapper.isAuthenticated(String rawCookieData)

Nested Exception

Exception: System.Security.SecurityException
Message: Requested registry access is not allowed.
Source: mscorlib
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
at System.Net.ProxyRegBlob.ReadRegSettings()
at System.Net.ProxyRegBlob.ReadRegSettings()
at System.Net.ProxyRegBlob.GetIEProxy()
at System.Net.Configuration.DefaultProxyHandler.Create(Object parent,
Object configContext, XmlNode section)
at
System.Configuration.ConfigurationRecord.EvaluateRecursive(IConfigurationSectionHandler
factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
------------------------------------------------------

Line 136 in machine config is
------------------
<defaultProxy>

<!--
The following entry enables reading of the per user (LAN)
Internet settings.
Adding additional proxy settings, without first setting to
"false",
will individually override. Note that "Automatic
configuration" and
"automatic configuration scripts" cannot be read.

<proxy> settings:
usesystemdefault="[true|false]" - Read settings from
Internet Options (see above)
proxyaddress="[string]" - A Uri string of the proxy
server to use.
bypassonlocal="[true|false]" - Enables
bypassing
of the
proxy for local resources.
-->

<proxy
usesystemdefault="true"
/>

<!-- use this section to disable proxy use for matching servers
example:
............. -->

<!-- use this section to override proxy settings with your own
IWebProxy implementation
example:
.................. -->

</defaultProxy>


-----------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top