Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...adding to global.asax adding to global.asax
Previous
 
Next
New Post
10/28/2009 7:12 AM
 

Hi there

I have a portal solution (DNN 4.9.5) that uses the DNN Masters Multi User Portal sharing module (http://www.dnnmasters.com/dnnmasters-multi-portal-user-sharing-extreme-3).

I am using floatbox (http://randomous.com/floatbox/home) to display data from one portal (our 'publishing' portal) on another portal - all portals are in the same dnn instance. So basically what happens is articles are published on portal A. I then create rss feeds and pull these feeds through to portal B. A user then clicks on the RSS feed headline on portal B, and a floatbox appears, that pulls the full article from Portal A through in an iframe. If the user is logged in on portal B, and they access the article on portal A, they should automatically be logged into Portal A ... I need them logged in in order to place comments on the articles. The solution I have in place works perfectly in Firefox and Chrome, but not IE ...

Now the problem I have is IE specific, and seems to have to do with the way the IE handles session state and cookies (more info on this here : http://petesbloggerama.blogspot.com/2007/08/aspnet-loss-of-session-cookies-with.html).

The abovementioned article outlines a solution to this issue, by simply adding a small snippet of code to the global.asax file ... and here we get to the crux of my problem - how do I do this ? I tried just pasting it into the existing DNN installations global.asax file and the site bombed out.

Can someone please explain to me how I could do this ?

Here is the code snippet I must add (it basically adds a Platform for Privacy Preferences (P3P) compact policy header :

protected void Application_BeginRequest(object sender, EventArgs e)
{
HttpContext.Current.Response.AddHeader("p3p", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");

}

This is an urgent issue, so if anyone can assist with how to achieve this, I would be most appreciative :)

Thanks in advance :)

 
New Post
10/28/2009 11:30 AM
 

you need to add that snippet in the /App_Code/Global.asax.vb file. 

Although DNN is in VB.NET so the code snippet should look like this...

Protected  Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
HttpContext.Current.Response.AddHeader("p3p", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"") 
End Sub

 

 
New Post
10/29/2009 9:59 AM
 

Hi

Thanks for the assist, but I am getting the following error after adding it in. Can you perhaps comment on what is missing ?

Server Error in '/' Application.

Compilation Error

 

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC32017: Comma, ')', or a valid expression continuation expected.

Source Error:

 
Line 114:        Protected  Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
Line 115:        
Line 116:        HttpContext.Current.Response.AddHeader("p3p", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
Line 117:        
Line 118:        End Sub

Source File: C:\vHosts\CortexDNN\App_Code\Global.asax.vb    Line: 116

 
New Post
10/30/2009 4:49 AM
 

Hi

I have discovered the issue - the quotes were escaped incorrectly (they were still in c# format)

Here is the fixed code snippet :

        Protected  Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
       
        HttpContext.Current.Response.AddHeader("p3p", "CP=""IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"" ")
       
        End Sub

Add this to global.asax.vb, and you can pass session data into iframes in IE :)

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...adding to global.asax adding to global.asax


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out