Outlook from ASP.NET

W

W Akthar

Hi,

I am trying to set an appointment from my ASP.NET
intranet web-site.
The following code works fine when used from a console
application but when used in an asp.net web-site I get
Access Denied error.

Outlook.Application oApp = new Outlook.Application();
Outlook.NameSpace oNS = oApp.GetNamespace("mapi");
oNS.Logon("WAkthar",
Missing.Value, false, true);

Outlook.AppointmentItem oAppt = (Outlook.AppointmentItem)
oApp.CreateItem(Outlook.OlItemType.olAppointmentItem);

oAppt.Subject = "Subject";
oAppt.Body = "Content";
oAppt.Location = "Location";

oAppt.Start = Convert.ToDateTime("13/12/2004 9:00:00 AM");
oAppt.End = Convert.ToDateTime("13/12/2004 1:00:00 PM");

oAppt.ReminderSet = true;
oAppt.ReminderMinutesBeforeStart = 5;
oAppt.BusyStatus = Outlook.OlBusyStatus.olBusy;
oAppt.IsOnlineMeeting = false;

oAppt.Save();
oNS.Logoff();

oApp = null;
oNS = null;
oAppt = null;


Does anyone have any ideas???
 
G

Guest

Off the top of my head, the console app runs as you, the asp .net process
doesn't. More importantly don't use outlook in asp.net it can really kill
your server.
 
G

Guest

keep in mind that asp.net run on the server machine and not the client
computer. Any processing you do, will occur on the host machine. This could
be related to the issue you are having. To make use of the clients'
computer, you would have to user like a activeX control or java applet.
 
W

W Akthar

Can I not do this via .NET ??

-----Original Message-----
keep in mind that asp.net run on the server machine and not the client
computer. Any processing you do, will occur on the host machine. This could
be related to the issue you are having. To make use of the clients'
computer, you would have to user like a activeX control or java applet.


.
 
W

W Akthar

Can you give me sme more information on this as I have
tried Tampa .NET on google and nothing relevant comes up!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top