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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Permissions problem displaying an image using BinaryWritePermissions problem displaying an image using BinaryWrite
Previous
 
Next
New Post
4/16/2009 7:22 AM
 

We have a module that displays an image using a simple aspx page that calls the Response.BinaryWrite method. The module is installed on a page in a child portal. All works well when we are logged in with a SuperUser account. However, when the same page is loaded when logged in as the child portal administrator (or any other user set up on the child portal) the image displays in Firefox and not in IE7 but in both browsers on the very next click we get redirected to the login page. Go back and try it as a SuperUser and the page is fine and we can navigate to any other page.

We've changed the BinaryWrite to include the length etc as we thought that the http response header may be getting corrupted - but if it was, the image would not display. Is anything being written to a temp folder that we need ASP.NET write access to?

 
New Post
4/16/2009 3:28 PM
 

Some further investigation into the cookies that were in use at various stages using controlled criteria show

A
Prior to login
B
After login on page with standard Text/Html Modules
C
Click to page containing custom module with db Image Display
D
Click to standard page with Text/Html Modules
A
B
C
D
SuperUser -
.ASPXANONYMOUS
X
X
X
X
authentication
X
X
X
X
language
X
X
X
X
.DOTNETNUKE
X
X
X
portalaliasid
X
X
X
portalroles
X
X
X
_Module496_Visible
X
_Module499_Visible
X
Portal Administrator
.ASPXANONYMOUS
X
X
X
X
authentication
X
X
X
X
language
X
X
X
X
.DOTNETNUKE
X
portalaliasid
X
portalroles
X
_Module496_Visible
X
_Module499_Visible
X
Portal Administrator With Step C changed to a Custom Module with No Db Image Display
.ASPXANONYMOUS
X
X
X
X
authentication
X
X
X
X
language
X
X
X
X
.DOTNETNUKE
X
X
X
portalaliasid
X
X
X
portalroles
X
X
X
_Module496_Visible
X
_Module499_Visible
X

The second case is the one that is going wrong - for some reason when the images are displayed we are losing the .DOTNETNUKE, portalaliasid and portalroles cookies. This does not happen when the same user goes through the same process but the page with the image display has been changed to a custom module that does not display images from the db

The module causing the problem was actually Module497 which does not show up at all in the above list. In scenario 2 above only Module497 was loaded, and in scenario 3 only Module496 was loaded - Module499 had been loaded on the page but had been removed prior to this test.

 

 
New Post
4/17/2009 3:16 AM
 

I found the solution in a previous posting about cookie problems http://www.dotnetnuke.com/Community/Forums/tabid/795/postid/36672/Default.aspx

The portalid and tabid need to be added to the querystring that calls the helperfile as in ='<%# Eval("ImageID", "Property_Image_Display.aspx?pimd={0}&size=Full&portalid=1&tabid=97") %>

everything then works perfectly.

ImageUrl

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Permissions problem displaying an image using BinaryWritePermissions problem displaying an image using BinaryWrite


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