Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Help please how to run dlls or activex controls on the intranet zone without pop-us without changing IE's intranet zone settings?

Help please how to run dlls or activex controls on the intranet zone without pop-us without changing IE's intranet zone settings?

Scheduled Pinned Locked Moved ASP.NET
comhelpjavascriptsysadminwindows-admin
2 Posts 2 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lowracer
    wrote on last edited by
    #1

    Good day We have the requirement to invoke a Microsoft Outlook Meeting request from an Intranet web page without having the following (well known) message:

    An ActiveX control on this page might be unsafe to interact with other parts of this page. Do you want to allow this interaction?

    We want to use the standard installed (client side) Microsoft outlook libraries for that. We do not want to relax the Local intranet Zone in IE by means of the standard resolution method of enabling the “Initialize and script ActiveX controls not marked as safe for scripting” Setting.

    This is a simplified version of the code, the message is invoked by the highlighted portion
    <body>
    <form id="frmScheduleAMeeting" runat="server">
    <div>
    <input id="btnScheduleTheMeeting" type="button" value="Schedule the meeting" onclick="ScheduleTheMeeting()" style="width: 200px" />
    </div>
    </form>

    <script type="text/javascript">
        function ScheduleTheMeeting() {
            //Reference to Outlook.Application 
            var theApp;
            //Outlook.mailItem
            var theMeeting;
            var theApp = new ActiveXObject("Outlook.Application");    //  -- this is where we get the error
            var objNS = theApp.GetNameSpace('MAPI');
            var theMeeting = theApp.CreateItem(1); // value 0 = MailItem, 1 = meeting
    
            theMeeting.Subject = "Will this time suit you?";
            theMeeting.Location = "Your Office";
            theMeeting.Recipients.Add("someone@microsoft.com");
            theMeeting.Start = "01/01/2017 10:00:00"
            theMeeting.End = "01/01/2017 11:00:00"
    
            theMeeting.ReminderMinutesBeforeStart = 15;   // Number of minutes before the event for the reminder
            theMeeting.BusyStatus = 1;                    // Makes it appear bold in the calendar
    
            theMeeting.AllDayEvent = false;
            theMeeting.BusyStatus = 1;
    
            theMeeting.Save();
            theMeeting.Display();
            theMeeting.Recipients.ResolveAll();
            theMeeting.Save();
        }
    </script>
    

    </body>

    We have tried to mark it safe in the registry as safe for scripting (7DD95801-9882-11CF-9FA9-00AA006C42C4) and safe for initializing from persisten

    Richard DeemingR 1 Reply Last reply
    0
    • L lowracer

      Good day We have the requirement to invoke a Microsoft Outlook Meeting request from an Intranet web page without having the following (well known) message:

      An ActiveX control on this page might be unsafe to interact with other parts of this page. Do you want to allow this interaction?

      We want to use the standard installed (client side) Microsoft outlook libraries for that. We do not want to relax the Local intranet Zone in IE by means of the standard resolution method of enabling the “Initialize and script ActiveX controls not marked as safe for scripting” Setting.

      This is a simplified version of the code, the message is invoked by the highlighted portion
      <body>
      <form id="frmScheduleAMeeting" runat="server">
      <div>
      <input id="btnScheduleTheMeeting" type="button" value="Schedule the meeting" onclick="ScheduleTheMeeting()" style="width: 200px" />
      </div>
      </form>

      <script type="text/javascript">
          function ScheduleTheMeeting() {
              //Reference to Outlook.Application 
              var theApp;
              //Outlook.mailItem
              var theMeeting;
              var theApp = new ActiveXObject("Outlook.Application");    //  -- this is where we get the error
              var objNS = theApp.GetNameSpace('MAPI');
              var theMeeting = theApp.CreateItem(1); // value 0 = MailItem, 1 = meeting
      
              theMeeting.Subject = "Will this time suit you?";
              theMeeting.Location = "Your Office";
              theMeeting.Recipients.Add("someone@microsoft.com");
              theMeeting.Start = "01/01/2017 10:00:00"
              theMeeting.End = "01/01/2017 11:00:00"
      
              theMeeting.ReminderMinutesBeforeStart = 15;   // Number of minutes before the event for the reminder
              theMeeting.BusyStatus = 1;                    // Makes it appear bold in the calendar
      
              theMeeting.AllDayEvent = false;
              theMeeting.BusyStatus = 1;
      
              theMeeting.Save();
              theMeeting.Display();
              theMeeting.Recipients.ResolveAll();
              theMeeting.Save();
          }
      </script>
      

      </body>

      We have tried to mark it safe in the registry as safe for scripting (7DD95801-9882-11CF-9FA9-00AA006C42C4) and safe for initializing from persisten

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      An ActiveX control which is not marked as "safe for scripting" cannot be access from script unless you change the security settings. If you did manage to change it so that it was marked as "safe for scripting", then any site on the internet could use it to wreak havoc on your users' email. Try creating your own ActiveX control to perform the specific tasks you need, and locking it down to your intranet site: Per-Site ActiveX Controls (Internet Explorer)[^] Alternatively, see if you can do what you need with an iCalendar file, which would have the added advantage of working in other browsers and calendars too. GitHub - rianjs/ical.net: ical.NET - an open source iCal library for .NET[^]


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups