c# - How to save an outlook appointment in users calendar? -


i developing asp.net web application allows users syn event gridview there outlook appointment using following code:

private void generateoutlookappointment(string subject, string location, string startdate, string enddate)         {             string body = "test data body.";               outlook.application outlookapp = new outlook.application();             outlook.appointmentitem oappointment = (outlook.appointmentitem)outlookapp.createitem(outlook.olitemtype.olappointmentitem);              oappointment.subject = subject;             oappointment.body = body ;              oappointment.location = location;             oappointment.start = datetime.parse(startdate).addhours(9);             oappointment.end = datetime.parse(enddate).addhours(9);             oappointment.reminderset = true;              oappointment.reminderminutesbeforestart = 15;             oappointment.importance = outlook.olimportance.olimportancehigh;              oappointment.busystatus = outlook.olbusystatus.olbusy;              oappointment.save();         } 

code works fine when run locally in visual studio localhost, fails on server. not sure logically able store outlook appointment on client outlook since code running @ server.

please point me right direction, in case need use different approach.

thanks in advance.

outlook, other office app, cannot used in service (such iis). see how access client's outlook in asp.net? alternatives.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -