not allowed to access the registry of windows vista

G

Guest

Hello

we creating a web application in ASP .net 2.0. we are trying to read font
file path from registry as below

Microsoft.Win32.RegistryKey registryKeyParen
registryKeyChild = registryKeyParent.OpenSubKey(subKey);

it's running in windows xp. but when we try to run this application in
windows vista
it's throwing an error. reason is that as a restricted user, the application
is not allowed to access the registry.

is there any way that the application can allowed to the restricted user to
access the registry of window vista in .net 2.0.

Thanks
Anjana
 
G

Guest

Hello

we creating a web application in ASP .net 2.0. we are trying to read font
file path from registry as below

Microsoft.Win32.RegistryKey registryKeyParen
registryKeyChild = registryKeyParent.OpenSubKey(subKey);

it's running in windows xp. but when we try to run this application in
windows vista
it's throwing an error. reason is that as a restricted user, the application
is not allowed to access the registry.

is there any way that the application can allowed to the restricted user to
access the registry of window vista in .net 2.0.

Thanks
Anjana

Did you checked the Trust Level?
http://msdn2.microsoft.com/en-us/library/ms998326.aspx

Maybe Vista has it different by default
 
M

Mark Rae

we creating a web application in ASP .net 2.0. we are trying to read font
file path from registry as below

Microsoft.Win32.RegistryKey registryKeyParen
registryKeyChild = registryKeyParent.OpenSubKey(subKey);

it's running in windows xp. but when we try to run this application in
windows vista
it's throwing an error. reason is that as a restricted user, the
application
is not allowed to access the registry.

Yes, that would be correct.
is there any way that the application can allowed to the restricted user
to
access the registry of window vista in .net 2.0.

I was at a Vista Security for Developers seminar hosted by Microsoft a
couple of months ago, and they mentioned that they have deliberately made it
very difficult for apps to access the HKEY_LOCAL_MACHINE hive - if you're
trying to do that, then you will need to elevate the privileges of the
current user...
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top