Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Reading the map host header setting
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 14th August 11:31
martin gildenpfennig
External User
 
Posts: 1
Default Reading the map host header setting



At some point Stefan hinted, that it would be possible to read this setting
and that the code for it, was available in the SCA. Now I've taken this code
and transformed it into .NET using COM interop. Code looks like this:

public bool HostHeaderMappingEnabled
{
get
{
NRSCAPIClass scapi = new NRSCAPIClass();
scapi.Initialize();

// This line throws an exception when not administrator
NRGlobalSettings globalSettings = scapi.get_GlobalSettings(0);
return globalSettings.General.HostNameToChannelMappingEna bled;
}
}


This works fine.... as long as I am logged in as a local administrator. When
I'm not logged in as this, an exception is thrown telling me I need to be. I
was just wondering if anybody else has found a way to do this without
impersonating an administrator, which I'd say is a little over the top for
reading a setting?


TIA
Martin Gildenpfennig
  Reply With Quote


  sponsored links


2 24th August 22:24
martin gildenpfennig
External User
 
Posts: 1
Default Reading the map host header setting



At some point Stefan hinted, that it would be possible to read this setting
and that the code for it, was available in the SCA. Now I've taken this code
and transformed it into .NET using COM interop. Code looks like this:

public bool HostHeaderMappingEnabled
{
get
{
NRSCAPIClass scapi = new NRSCAPIClass();
scapi.Initialize();

// This line throws an exception when not administrator
NRGlobalSettings globalSettings = scapi.get_GlobalSettings(0);
return globalSettings.General.HostNameToChannelMappingEna bled;
}
}


This works fine.... as long as I am logged in as a local administrator. When
I'm not logged in as this, an exception is thrown telling me I need to be. I
was just wondering if anybody else has found a way to do this without
impersonating an administrator, which I'd say is a little over the top for
reading a setting?


TIA
Martin Gildenpfennig
  Reply With Quote


  sponsored links


3 25th August 07:37
martin gildenpfennig
External User
 
Posts: 1
Default Reading the map host header setting


This is what I do at the moment, but I would have liked it, if this
redundant configuration could have been avoided.

It seems the value I'm looking for is stored in the registry, but I have not
been able to decode the values stored. I guess the key holding the answer is
"HKEY_LOCAL_MACHINE\SOFTWARE\NCompass\Resoluti on Content
Server\Configuration\0\Local\LocalServerSettings" but this looks like some
bit flags. If anybody has any insight into this (supported or unsupported) I
would appreciate it.

Regards
Martin Gildenpfennig
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666