Fixed font Subject: Re: Problem in creating outlook task remotely using outlook object mod
Author: veenu Date: 02 Dec 2010
References: 1 2 3 4 5
rujuta_l wrote on 07/24/2009 02:58 ET :
> Yes. Receiver has given author permission to the sender for his task folder.
> Exchange server can be either 2003 or 2007.
> The application is hosted on 2003 server (name of the server is svr03) .
> Outlook on the server is configured with some email account e.g.
> txtAdmineMailID.Text is readonly textbox and contains this
> email id i.e. Receiver email id can vary and it is accepted in
> txteMailID textbox (e.g. ). But this is sure that receiver
> () has given author permissions to for his task
> folder.So task can always be created by in receiver's task
> folder (). This works fine if application is run on svr03 locally
> and MS Outlook is open with profile of But if it is run
> remotely from some other machine (m/c name pqr) using url
> http://svr03/taskapp/form1.aspx, it does not work.
> Our requirement is task should get created in task folder of by
> using the application taskApp which resides on svr03 and
> accessed using url http://svr03/taskapp/form1.aspx, from m/c pqr remotely and
> without keeping outlook on svr03 open.
>
> thanks,
> Rujuta
>
> "Sue Mosher [MVP]" wrote:
>
>> So you have one person creating tasks in the Exchangemailbox of another,
>> creating them directly without sending a task request? With what Exchange
>> version?
>>
>> Sue Mosher, Outlook MVP
>> Author of Microsoft Outlook 2007 Programming:
>> Jumpstart for Power Users and Administrators
>> http://www.outlookcode.com/article.aspx?idT
>>
>>
>> "rujuta_l" wrote in
>> message
>> news:
>> > Task should get created in the task folder of user whose email id is
>> > provided
>> > in txteMailID Textbox.
>> > txtAdmineMailID.Text holds email of the sender who wants to create task
>> in
>> > receiver (txteMailID )'s task folder.
>> >
>> > thanks.
>> > "Sue Mosher [MVP]" wrote:
>> >
>> >> You may need to rethink your application architecture, because
>> Outlook is
>> >> not suitable to automate from server-based code, including ASP.NET.
>> Any
>> >> Outlook automation related to a web page should be done with
>> client-side
>> >> script, which would be able to access the tasks folder of the local
>> user.
>> >>
>> >> Exactly where are you trying to create the task -- in the browser
>> user's
>> >> Tasks folder? Somewhere else? Is this an internal application for
an
>> >> organization that uses Exchange as its mail server? If so, what
>> version
>> >> of
>> >> Exchange?
>> >>
>> >> "rujuta_l" wrote
>> in message
>> >> news:
>> >> > Hello,
>> >> > We are trying to create task in tasks folder of outlook using
>> outlook
>> >> > object
>> >> > model in ASp.net2.0 web application. The code is like this
>> >> > Dim oApp As Outlook.Application = New Outlook.Application()
>> >> > Dim oNS As Outlook.NameSpace =
>> oApp.GetNamespace("mapi") '
>> >> > oNS.Logon(txtAdmineMailID.Text, txtAdminPwd.Text, True,
>> True)
>> >> >
>> >> > Dim OTask As Outlook.TaskItem > >> >
>> oApp.CreateItem(Outlook.OlItemType.olTaskItem)
>> >> > OTask.Assign()
>> >> > OTask.Recipients.Add(txteMailID.Text)
>> >> > OTask.Subject = txtSub.Text
>> >> > OTask.Body = txtMsg.Text
>> >> > OTask.DueDate = DateTime.Today
>> >> > OTask.ReminderTime = OTask.DueDate
>> >> > OTask.Send()
>> >> >
>> >> > The code works fine if run locally on windows 2003 server
>> >> > (http://localhost/CreateTask/test.aspx) provided outlook on
the
>> win2003
>> >> > server configured properly and is open. Task gets created in
>> task
>> >> > folder
>> >> > of
>> >> > email account provided in txtemail.text by email account
>> provided in
>> >> > txtAdmineMailID.Text
>> >> > In following two cases, the above code does not work.
>> >> > 1. If the outlook on win2003 is not open, task does not get
>> created
>> >> > even
>> >> > if
>> >> > run locally.
>> >> > 2. If the application is run remotely from some other machine
>> using the
>> >> > url
>> >> > http://abc2003/CreateTask/test.aspx (abc2003 is the name of
>> server
>> >> > where
>> >> > the
>> >> > createTask app resides), keeping outook on server open, we get
>> the
>> >> > following
>> >> > error for 1st line of code
>> >> > Dim oApp As Outlook.Application = New Outlook.Application()
>> >> > Error is
>> >> > Retrieving the COM class factory for component with CLSID
>> >> > {0006F03A-0000-0000-C000-000000000046} failed due to the
>> following
>> >> > error:
>> >> > 80070005.
>> >> > We need to create the task remotely and without keeping
outlook
>> open.
>> >> > Pl.
>> >> > suggest the solution.
>> >> >
>> >> > thanks in advance.
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>
>>
>>
>
Hi,

We had the similar problem that the Outlook Automation had to be done on
WebServer and send Outlook Tasks from Web-interface.
Since Microsoft officially doesn't support Server-Side Office Automation (read
http://support.microsoft.com/kb/257757), following points had to be performed
to
accomplish the requirement:
- Outlook has to be up and running on the server all the time. This has to be
taken care of by the customer or his IT team. Credentials if needed by Outlook
again have to be manually filled in by the customer
- Redemption Framework to bypass the Security checks made by outlook when
accessed using API

The solution worked but is not reliable. So please update if you find any
better
approach to accomplish or straighten up this stuff. Thanks.