473,498 Members | 310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create obj: "New Outlook.Application" in ASP.NET? (simple)

HvG
I'm sure this is a trivial question, but I cannot create an Outlook Object
from a WebForm app, but can from a console app. or a Windows app. My COM
knowledge is very poor sorry.

Code-----------------------------------------------------------------------------------
Dim oApp As Outlook.Application = New Outlook.Application
....
-----------------------------------------------------------------------------------
Exception Details: System.Exception: Cannot create ActiveX component.

A reference to "Microsoft Outlook 10.0 Object Library" has been added, the
PC runs on XP Pro, .NET FW1.1, Outlook 2002.
Thanks for any help,

Hugo
Nov 19 '05 #1
2 2646
Hugo:
First off, why not create send email via System.Web.Mail ??

Secondly, since you are using ASP.Net, the user making the request is
probably anonymous and doesn't have access to create the COM object.. You
could quickly verify this by setting <identity impersonate="true" /> in
your web.config which (depending on how IIS is set up) should make the
process run under the account of the user visiting (you) but that'll only
work in an intranet environment...unless you escalate ASP.Net's persmission
for anonymous users (bad idea)

So why not #1?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"HvG" <hv*****@hotmail.com> wrote in message
news:eh*************@tk2msftngp13.phx.gbl...
I'm sure this is a trivial question, but I cannot create an Outlook Object
from a WebForm app, but can from a console app. or a Windows app. My COM
knowledge is very poor sorry.

Code------------------------------------------------------------------------
----------- Dim oApp As Outlook.Application = New Outlook.Application
...
-------------------------------------------------------------------------- --------- Exception Details: System.Exception: Cannot create ActiveX component.

A reference to "Microsoft Outlook 10.0 Object Library" has been added, the
PC runs on XP Pro, .NET FW1.1, Outlook 2002.
Thanks for any help,

Hugo

Nov 19 '05 #2
HvG
Thanks for the reply.
First off, why not create send email via System.Web.Mail ?? My desire is to be able to delete and create Contacts and read Mail Items in
public Exchange folders using the Outlook profile on the webserver
(intranet). This appeared to be quickier and easier to use than webDAV.

I did try to give the IUSER_... temporary administrator rights (without a PC
restart), but that didn't work
I will try the inpersonate idea.

Regards
Hugo

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OT**************@TK2MSFTNGP10.phx.gbl... Hugo:
First off, why not create send email via System.Web.Mail ??

Secondly, since you are using ASP.Net, the user making the request is
probably anonymous and doesn't have access to create the COM object.. You
could quickly verify this by setting <identity impersonate="true" /> in
your web.config which (depending on how IIS is set up) should make the
process run under the account of the user visiting (you) but that'll only
work in an intranet environment...unless you escalate ASP.Net's
persmission
for anonymous users (bad idea)

So why not #1?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"HvG" <hv*****@hotmail.com> wrote in message
news:eh*************@tk2msftngp13.phx.gbl...
I'm sure this is a trivial question, but I cannot create an Outlook
Object
from a WebForm app, but can from a console app. or a Windows app. My COM
knowledge is very poor sorry.

Code------------------------------------------------------------------------
-----------
Dim oApp As Outlook.Application = New Outlook.Application
...
--------------------------------------------------------------------------

---------
Exception Details: System.Exception: Cannot create ActiveX component.

A reference to "Microsoft Outlook 10.0 Object Library" has been added,
the
PC runs on XP Pro, .NET FW1.1, Outlook 2002.
Thanks for any help,

Hugo


Nov 19 '05 #3

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

Similar topics

4
6170
by: Daylor | last post by:
in win32 process , when u create new process,u have new main thread. i know,appDomain r logical procces,that exists in 1 win32 process. the q: is there way to create second appDomain (the...
24
2820
by: Rv5 | last post by:
Rookie c++ question, but Ive spent the last 5 years doing Java, where everytime I created an object I used new. In c++ I can create my objects without and its confusing me just a little. I have...
9
2288
by: Marc Miller | last post by:
Hi all, I have 2 dev. machines, the 1st is Win 2000 with .NET 7.0 and the 2nd is XP Pro with .NET 2003. My Web Server is Win 2000 Server with IIS 5.0. I can create a new project on my test...
24
2792
by: M O J O | last post by:
Hi, Instead of doing this.... Public Class Form1 Public Shared Sub CreateAndShow() Dim f As New Form1 f.Show() End Sub
2
1301
by: Gabriele *darkbard* Farina | last post by:
Hi, I'm using Python 2.5 to develop a simple MVC framework based on mod_python. To load my controllers, I create new modules using the "new" module like this: # .... my_module =...
0
1895
by: kennedystephen | last post by:
This seems like a simple task. But it's kicking my butt. I have 1 existing excel file. I want to copy the first 50 rows from that excel file, and put them in a new excel file. Then I want to get...
0
1849
by: kennedystephen | last post by:
For the life of me, I cannot get this ... I have 1 excel document. I want to open that document and copy the first 50 rows to a new document. Then get the next 50 rows and copy those to a brand...
0
6998
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
7200
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...
1
6884
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...
1
4904
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...
0
4586
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...
0
3090
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...
0
1416
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 ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
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...

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.