473,394 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

IE Intranet zone > Require server verification ... How to check programaticaly ?

Hello,

I am dealing with security zones in Internet Explorer.

I know how to add websites programaticaly to the intranet zone (using
IInternetSecurityManager::SetZoneMapping).
But do anyone know how to check/uncheck programaticaly the "Require
server verification (https:) from all sites in this zone" ?
I looked all over MSDN, but do not find a function dealing with this
....

Thanks,

Guillaume BRAUX

Dec 1 '06 #1
1 8851
Solution :

public bool SetHttpsIeZone(bool value,int ie_zone)
{
RegistryKey key = Registry.CurrentUser.OpenSubKey(
@"Software\Microsoft\Windows\CurrentVersion\Intern et
Settings\Zones\" + ie_zone.ToString(),true);

Int32 keyValue = (Int32)key.GetValue("Flags");

//Le bit du flag qui gere cette protection est le 6eme
//On va convertir la valeur du flag en binaire, l'exploser
dans un tableau de char et le reconstruire

string binString = Convert.ToString(keyValue, 2);
char[] binChar = binString.ToCharArray();
if (value) { binChar[5] = (char)49; }
if (!value) { binChar[5] = (char)48; }

string newBinString = new string(binChar,0,binChar.Length);
int newKey = Convert.ToInt32(newBinString, 2);

key.SetValue("Flags", newKey,RegistryValueKind.DWord);
key.Flush();
key.Close();

return true;
}

gbraux a écrit :
Hello,

I am dealing with security zones in Internet Explorer.

I know how to add websites programaticaly to the intranet zone (using
IInternetSecurityManager::SetZoneMapping).
But do anyone know how to check/uncheck programaticaly the "Require
server verification (https:) from all sites in this zone" ?
I looked all over MSDN, but do not find a function dealing with this
...

Thanks,

Guillaume BRAUX
Dec 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Jawahar Rajan | last post by:
All, I am working on a project that requires the companies clients to login to our web site. however for employees of the companies they do not want to have a login. But a lot of the asp pages...
3
by: Rob Locher | last post by:
I have a server running NT 4 Server that is on my local domain that hosts an ASP application. I have a problem: when I try to test the ASP application from a computer on the same domain running...
10
by: Chris Sharman | last post by:
I'm doing a rough validation of an email address client-side (using js), but it's not enough - our customer service people are apparently incapable of typing in an email address without error - we...
2
by: kermit | last post by:
I have several ASP.NET pages that run on an intranet with an IIS server. Several of them use XML.DOM to open an XML file. doc.Load(sPath). When the is command to open the file is up...
0
by: Shannon Broskie | last post by:
I'm posting this here as I first found the issue trying to run a 2.0 Framework app on a 2003 server. Background -------------- We utilize a strong name policy sent to all XP machines using...
4
by: Vikas Kumar | last post by:
propertyDescription += "<br>" + lblpropertyDescription.Text; //here i am reading some text from text area i test wrting "p" in my text area it wrks fine but when i write <pin my text...
3
by: King Ron | last post by:
Ola all: I had a call from a client yesterday. She reports that when attempting to connect to a AC2002 mdb backend on a remotely shared pc (mapped locally as \\Server\Users) she suddenly began...
1
by: SoulTek | last post by:
Hi All I'm reposting this in the correct forum I originally thought it to be an IIS issue. Here's the original Thread Ok here goes. I have inherrited a local intranet site at a company I'm...
3
by: james | last post by:
WATYF <WATYF1@gmail.comwrote in news:eb43eb6a-afaa-4e39-ac0b-850afdb6d1e4@r66g2000hsg.googlegroups.com: It gets complicated. First, a reference:...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.