473,661 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C#-WEP/APP: ActiveX Control Permissions

8 New Member
Hello Everybody,

I'm new here, and I'm hoping someone can help me out...

I'm creating an ActiveX control for an company intranet. This control needs to access Microsoft Outlook (specifically the user's contacts folders). I have created a script that can do this, and have also managed to get an activeX control running.

However, when I try to use my Outlook script within my ActiveX control I get a System.Security .Permissions.Se curityPermissio ns error. I'm assuming that the local machine is not allowing the activeX control to open the outlook folders...

I am able to modify registry keys or outlook/internet explorer configuration on any of the computers that will run the app, but I'm wondering what setting I have to change to grant the activeX control permission to access the outlook folders...

Here is the basic code I am using the access Microsoft Outlook (I am trying to wrap the functionality I need within a class that inherits from System.Windows. Forms.UserContr ol in order to use a managed ActiveX Control):

Expand|Select|Wrap|Line Numbers
  1. Outlook._Application App = new Outlook.Application();
  2. Outlook._NameSpace NS = App.GetNamespace("MAPI");
  3.  
  4.  
  5. NS.Logon(null, null, false, false);
  6. Outlook.MAPIFolder Contacts = NS.GetDefaultFolderOutlook.OlDefaultFolders.olFolderContacts);
  7. foreach (Outlook._ContactItem Contact in Contacts.Items)
  8. {
  9.        Console.WriteLine(Contact.LastName);
  10. }
  11.  
Any suggestions would be greatly appreciated,

- Loren Van Spronsen
Mar 24 '08 #1
0 1221

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1554
by: Simon Morris | last post by:
I read that you could add a old Activex Control to VB.NET. I try to add 'Microsoft ADO Data Control 6.0 (SP4) (OLEDB)' and 'Microsoft Hierarchical FlexGrid Control 6.0 (SP4) (OLEDB)' to a form but I get "You do not have a license to use this ActiveX Control" Any help? Thanks.
3
2082
by: Neo | last post by:
I have a usercontrol that I am trying to use as an ActiveX Control on a WebPage, however it refereneces an Assembly that whenever the first call is made to anything in the Assembly a Security Exception is throw. I am having a lot of trouble debugging this, because I cannot catch the exception in my code. However if I could run the control under the Internet Zone Security settings I could probably find this easily. Does anyone know how to...
3
2753
by: vanisathish | last post by:
Hi I have a custom ActiveX Control that is working fine with ASP in IIS 5.1 on WinXP. But the same ASP page is failing in Server.CreateObject of that ActiveX Control in IIS 6.0 on Win Server 2003. Do i need to change any configuration on my IIS 6.0 Thanks
2
2041
by: gkelly | last post by:
What is the best soltions for creating a graphical object in c# for use in a C++ app? - I heard some say you can't create an ActiveX control in dotnet and I have heard others say you can using some non-standard sutff that may not be supported later on in dotnet. Is it or is it not possible? - Is it pratical to have the C++ app ( non-managed c++ btw ) send a hwnd to c# and have the c# app overlay itself on the hwnd? If so, does anyone...
2
5860
by: Javier Bertran | last post by:
Hi all, I have an ActiveX control developed in Visual C++ 6.0 that I want to use in a C# project. I want the ActiveX code to run on a separate thread, but can't seem to get it to work. If for example my ActiveX member has an infinite loop, the .NET app gives all processing to the ActiveX and never returns, not even to redraw the window. Here is what I tried (in a nutshell): VC++ 6.0 OCX code: void CMyAXControlCtrl::Loop()
1
2050
by: None | last post by:
Hello In order to host and use an ActiveX control (non-GUI) in a WTL app, I followed the following steps: 1. During project creation, the ActiveX Hosting option is enabled. 2. In the dialog editor, the ActiveX control was inserted. 3. An event was added to the dialog by right clicking on the control and selecting 'Events...'. 4. VS automatically created a .tlh file.
0
4399
by: ann | last post by:
Hi, I am trying to add an ActiveX control on my ASP.NET web form (the language for code behind is C#). I have some client-side vbscript to handle events from the html input buttons. In the client-side script, I am calling the ActiveX control object to perform some job. The problem is: when I run the application and click on the button (which fires the event), I get a runtime error: Microsoft VBScript runtime error: Object required:...
7
5809
by: Artie | last post by:
Hi, Our team have a web project which includes some C# ActiveX DLLs. On some developers' PCs, the code which calls methods in the ActiveX dll is succesful - no exceptions. On other PCs, the ActiveX control doesn't even seem to get loaded. (On the failing machines, if we try and debug down to where the ActiveX DLL method is invoked, both Visual Studio and IE hang.)
0
2085
by: vml | last post by:
Hello, I am trying to mograte from vb 6 to python. I have a very usefull AX control. It can be : -just a bitmap -an active picture where you can plot data and put cursors -a data explorer Those 3 behavior are driven by one property in visual studio when you
0
8754
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8542
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2760
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.