开发者

Granting access to outlook application

I have developed a .NET application which is accessing outlo开发者_运维技巧ok. For my computer it is working fine but when I am publsihing it and run it into other PC outlook is showing a pop up that "an external application want to access outlook, grant access for 1/2/5/10 min".

But my application wants access for more than 10 minutes. What will be the solution for this?

My guess:

  1. How can I make this application as trusted in outlook?
  2. My computer outlook never asked me about access why other computer want access time? Is this because I developed the application on my system?

EDIT

The same thing I found here http://www.add-in-express.com/outlook-security/

but When I am copying the code:

    AddinExpress.Outlook.SecurityManager SecurityManager = new AddinExpress.Outlook.SecurityManager();
SecurityManager.DisableOOMWarnings = true;
try {
// ... any action with protected objects ...  
} finally {
    // In any case please remember to turn on   
    // Outlook Security after your code,   
    // since now it is very easy to switch it off! :-)   
    SecurityManager.DisableOOMWarnings = false;
}

This stament is showing as error:

AddinExpress.Outlook.SecurityManager

Which Namespace I have to use, I am using .NET 2.0.

Following are the namespaces I have already included in my .cs file

  using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Office.Interop;
using System.Reflection;
using Microsoft.Office;
using System.Runtime.InteropServices;
using OutLook = Microsoft.Office.Interop.Outlook;
using System.Reflection;
using System.Text;
using System.Configuration;
using System.Security;


The warning "Feature" is called the object model guard.

Outlook 2007 will not popup warnings if it's running on a system with an up-to-date antivirus, so the other computer may not have an AV, or is running an AV that the security center API cannot interrogate for state.

If you're accessing outlook from a VSTO Addin you can bypass the guard by calling across the trusted ThisApplication object (example in link), if you're using vanilla interop you're going to need to do something else (E.g. Redemption).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜