Authorization required Error 401 when trying to open google docs using oauth in asp.net
<p>I am developing a web application in asp.net in which  I'm playing a bit with OAuth1.0 in combination with some Google documentlist API.Authorization is done for the first time. (user grants access, I get the token etc etc).After user click on "get my document button " user can view all the document list into my application.But when i click on link of any document to view that document on googledoc an Authorization required Error 401 occurs.I am unable to solve this problem.</p>

<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
    var google = new WebConsumer(
                     GoogleConsumer.ServiceDescription, 
                     GoogleTokenManager);

    XDocument docs = GoogleConsumer.GetDocs(google, this.AccessToken);

    var contacts = from entry in docs.Root.Elements(
        XName.Get("entry", "http://www.w3.org/2005/Atom"))
        select new 
        { 
            Name = entry.Element(XName.Get("title", "http://www.w3.org/2005/Atom")).Value, 
            DocLink = entry.Element(XName.Get("feedLink", "http://schemas.google.com/g/2005")).Attribute("href").Value 
        };

    StringBuilder tableBuilder = new StringBuilder();
    tableBuilder.Append("&lt;table&gt;&lt;tr&gt;&lt;td&gt;Document Name&lt;/td&gt;&lt;td&gt;Link&lt;/td&gt;&lt;/tr&gt;");
    foreach (var contact in contacts)
    {
        tableBuilder.AppendFormat(
        "&lt;tr&gt;&lt;td&gt;{0}&lt;/td&gt;&lt;td&gt;&lt;a href=\"{1}\"&gt;{2}&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;",
        HttpUtility.HtmlEncode(contact.Name),
        HttpUtility.HtmlEncode(contact.DocLink),
        HttpUtility.HtmlEncode(contact.DocLink));
    }

    tableBuilder.Append("&lt;/table&gt;");
    this.resultsPlaceholder.Controls.Add(
        new Literal { Text = tableBuilder.ToString() });
}
</code></pre>
