none
deployment of outlook add in with web service(c#) RRS feed

  • Question

  • Hey all ,

    I create some add-in to outlook in JavaScript and I add him some webservice to get the attachments from an exchange server( write in C# )

    I work with this code:

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=appsforoffice

    my question is how can I deploy my add in with this websrvice ? In my manifest file I know that have links to html files of compose/read files and from there it's take the js files...( like this:

     <Form xsi:type="ItemRead">
          <DesktopSettings>
            <SourceLocation DefaultValue="~remoteAppUrl/MessageRead.html"/>

    )

    but how can I insert or what I need to do with the c# code that I use him to get the attachments?

    I have some call for service in my read mode JS file :

    xhr.open("POST", "https://localhost:44320/api/AttachmentService", true);

    Thanks all !



    • Edited by ADD-IN123456 Tuesday, September 27, 2016 10:52 AM
    Tuesday, September 27, 2016 10:47 AM

Answers

  • Hi,

    Sorry for misunderstanding. I recheck this thread again.

    >> Now,I want to know if i first need to deploy and upload the web service , change the link of localhost to my web server and than deploy the add in ?

    Do you mean that you have achieved getting attachments by Outlook add-in: Get attachments from an Exchange server, and you want to know how to deploy web service, and call web service from Office Add-ins? If so, I agree with you, you need to deploy and upload the web service, change the link of the localhost to new address for web service.

    Are your Office Add-ins web application and AttachmentExmpleService deployed in the same server? If not, I think you might meet CROS issue, for this issue, I suggest you refer to the link below:

    # Addressing same-origin policy limitations in Office Add-ins

    http://dev.office.com/docs/add-ins/develop/addressing-same-origin-policy-limitations

    Best Regards,

    Celeste

    • Marked as answer by ADD-IN123456 Saturday, October 1, 2016 9:18 AM
    Thursday, September 29, 2016 8:06 AM
    Moderator

All replies

  • Hi,

    It seems that you failed to upload your code snippet.

    Do you want to get the attachment from web service or deploy the add-in to web server?

    If you want to get the attachment from web service, you could see the demo from Outlook add-in: Get attachments from an Exchange server.

    Wednesday, September 28, 2016 8:39 AM
    Moderator
  • Hi  , 

    I success to get the attachment with the link that you give me . 

    Now, I want to deploy my add-in .My solution in  VS contain 3 projects like what have in the demo on the link :

    1-AttachmentExmpleService 

    2-Web- contain all my html,js, etc..

    3-Manifest

    The  web service of the attachment called with post method  to localhost when we run project in VS :

    xhr.open("POST", "https://localhost:44320/api/AttachmentService", true);

    Now,I want to know if i first need to deploy and upload the web service , change the link of localhost to my web server and than deploy the add in ? or maybe there is another solution to deploy it 

    Thank you. 


    • Edited by ADD-IN123456 Wednesday, September 28, 2016 10:14 AM
    Wednesday, September 28, 2016 10:01 AM
  • Hi,

    You could directly replace it with any other web servers that can be accessed by the Exchange server that hosts the add-in.

    No need to firstly deploy and upload then change and deploy.


    For more information, please visit Deploy and install Outlook add-ins for testing:

    You can use HTML and JavaScript to create the add-in UI. The resulting source file is stored on a web server that can be accessed by the Exchange server that hosts the add-in. 


    Wednesday, September 28, 2016 12:16 PM
    Moderator
  • Hi, sorry but i don't really success to understand you . 

    You tell me : You could directly replace it with any other web servers that can be accessed by the Exchange server that hosts the add-in.

    But I don't have any other web server that do it, I want to use this web service that in the example for get the attachments. I know how to deploy the add in alone without the attachment but I want to deploy that also the service of the attachment wiil work ....

    I hope that you understand me. Thank your very much for your helping !

    Wednesday, September 28, 2016 1:50 PM
  • Hi,

    Sorry for misunderstanding. I recheck this thread again.

    >> Now,I want to know if i first need to deploy and upload the web service , change the link of localhost to my web server and than deploy the add in ?

    Do you mean that you have achieved getting attachments by Outlook add-in: Get attachments from an Exchange server, and you want to know how to deploy web service, and call web service from Office Add-ins? If so, I agree with you, you need to deploy and upload the web service, change the link of the localhost to new address for web service.

    Are your Office Add-ins web application and AttachmentExmpleService deployed in the same server? If not, I think you might meet CROS issue, for this issue, I suggest you refer to the link below:

    # Addressing same-origin policy limitations in Office Add-ins

    http://dev.office.com/docs/add-ins/develop/addressing-same-origin-policy-limitations

    Best Regards,

    Celeste

    • Marked as answer by ADD-IN123456 Saturday, October 1, 2016 9:18 AM
    Thursday, September 29, 2016 8:06 AM
    Moderator
  • thanks for your help!!!
    Saturday, October 1, 2016 9:18 AM