question

LevanLashauri-7181 avatar image
0 Votes"
LevanLashauri-7181 asked

Online Web Word Office AddIn, Cannot store Cookies/Session (Chrome, Edge)

I have developed Office.js AddIn for word. Which also supposed to work in online web word. I'm using cookie in my addin which I save using js this way:

document.cookie = "firstrun=" + 1 + "; path=/Addin/";

and then accessing from .Net code behind like this:

HttpCookie cookie = Request.Cookies["firstrun"];

It works perfectly for windows word and also online web word in Mozzila Firefox browser, but doesn't store any values when using online web word in Chrome and MS Edge.

Couldn't really find out what is the difference. Why wouldn't chrome and edge work with addin cookies in this way? Have anyone experienced such a thing?

P.S. I've also noticed that it doesn't store any session values. after this Session["User"] = user; Session["User"] is null in other pages. This also works perfectly in firefox.

Thanks. Any help will be appreciated

office-addins-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers