If you have a link to a webpage in a MicroSoft Word document and you follow this link to get to the web page ASP.Net session variables do not always work as expected.
In particular they work the first few times and then later on they stop working.
For instance if you have a link to an MVC Page like:
http://localhost/Home/TransferToWebForm
and in the controller you have:
public ActionResult TransferToWebForm()
{
Session["SessionVarFromMVC"] = "Some Value";
return Redirect("~/WebForm.aspx");
}
Then in the target page (WebForm.aspx) you try to retrieve these session variables they are empty.
<%= string.IsNullOrEmpty(Session["SessionVarFromMVC"])
? "***Session Empty***"
: Session["SessionVarFromMVC"] %>
(I discovered in Office 2007 and I'm not sure if the problem exists in other versions)