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???
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???