472,782 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 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 8811
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: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.