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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryYou are not authorized to download this file?You are not authorized to download this file?
Previous
 
Next
New Post
1/10/2006 5:27 PM
 

Ok, there is something definitely wrong now.  I did a complete remove and then re-install (see my previous post) and everything was working.  Now today, I get the error message, even when logged in as administrator.  I even did an IISRESET.

If I login with an account that is not listed in the download permissions, the download link is not visible.  Logged in with an account that does have permissions and the download link show up but I get that error message on a plain blank page.

Is the source code available, the If statement that executes when you click "Download" no worky :)

http://www.flashpointracing.com/Garage/Showroom/tabid/124/Default.aspx

 
New Post
1/10/2006 5:45 PM
 

The source is available on the download page but I'm not sure how well you can debug it under DNN 4.0. Does it work if you don't have any other modules on the page? I'm wondering if UsersOnline or the Yahoo adds might be interferring in some way (just taking a guess here).

BTW nice site. I've often thought about joining when you guys were part of OLR (which I think you still are). Check out http://www.gmss.org

 
New Post
1/12/2006 9:29 AM
 

Thanks, and we split off from OLR, their web site was all custom built ASP and C++, it was way to difficult to get stuff done.  Another DNN site, nice, that's 3 simracing sites I know of so far that us it.

I found the problem and I'm pretty sure this would be considered a 'bug'

I left a lot of the settings on the Repository as the default.  In this case, having the 'unapproved' and 'approved' folders being the same was a bad thing.  I think the following logic in the repository has a flaw in it.

-User uploads file, it's stored in the unapproved folder
-Admin approves the upload.
   + File is copied from the unapproved to approved folder (in my case, this really just copies the file over itself)
   + File is deleted from the unapproved folder (take a guess what happens :)

The error message obviously doesn't properly describe the problem.

 
New Post
1/12/2006 10:37 AM
 
Ahhh I see where you're going with this. I'll check that out and see if I can recreate it. On my tests I'd left everything as default but what you're saying makes a lot of sense.
 
New Post
1/12/2006 10:58 AM
 

I don't think there's an error in the logic. When you approve a file, it first determines where the unapproved file is, then where the approved file would go once approved. It only goes through the copy/delete logic if the current location is not the same as the new location. If the new location would be the same, then the file will just remain where it is and marked as approved.

Here's the actual code... with the relevant code in red

Try
  strSourceFilename = objRepositoryBL.g_UnApprovedFolder & "\" & objRepository.FileName.ToString()
  If objRepository.CreatedByUser = ""
Then
    strTargetFilename = objRepositoryBL.g_AnonymousFolder & "\" & objRepository.FileName.ToString()
  Else
    If objRepositoryBL.g_UserFolders
Then
      If Not Directory.Exists(objrepositorybl.g_ApprovedFolder & "\" & objRepository.CreatedByUser())
Then
        Directory.CreateDirectory(objrepositorybl.g_ApprovedFolder & "\" & objRepository.CreatedByUser())
      End
If
      strTargetFilename = objRepositoryBL.g_ApprovedFolder & "\" & objRepository.CreatedByUser() & "\" & objRepository.FileName.ToString()
    Else
      strTargetFilename = objRepositoryBL.g_ApprovedFolder & "\" & objRepository.FileName.ToString()
    End
If
  End
If
  If strSourceFilename <> strTargetFilename
Then
    File.Copy(strSourceFilename, strTargetFilename, True
)
    File.SetAttributes(strSourceFilename, FileAttributes.Normal)
    File.Delete(strSourceFilename)
    bMovedFile =
True
  End
If
Catch ex As
Exception
End Try

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryYou are not authorized to download this file?You are not authorized to download this file?


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