Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 328961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:32:37+00:00 2026-05-12T09:32:37+00:00

If you have a link to a webpage in a MicroSoft Word document and

  • 0

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)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:32:38+00:00Added an answer on May 12, 2026 at 9:32 am

    The problem is that when you first follow the link from Microsoft Word the server sets a cookie (ASP.NET_SessionId) and word remembers this. Subsequent clicks on the link cause the same cookie to be sent to the server with the new request.

    Everything works fine with this process until that session times out on the server. On the next click Word sends the cookie with the request and the server no longer has a valid session for it. In this case the the session variables set by the first page simply fall off the end of the earth (so to speak) and are not available to the next page.

    The thing that is puzzling to me is why is Word storing the session cookie?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using C#, ASP.Net In my webpage i have the link for the another web
I have an ASP.NET 2.0 (C#) webpage with a link that pulls a blob
I have read this link How can we stop web page view after sign-out
I have a Word .DOCument that's being generated by a (classic ASP) server. It's
I have a webpage and if I click a link in the page, it
I have a link on webpage. When I click this link a pop is
On my webpage, I have the following link: <asp:LinkButton ID=lnkChangePic runat=server onclick=lnkChangePic_Click Text=Upload new
I want to fetch a web page from a ASP.NET site that is only
I want to fetch a web page from a ASP.NET site that is only
Is it possible to link to a specific page in an MS Word document

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.