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 ...LinkClick.aspx code - where is the file?LinkClick.aspx code - where is the file?
Previous
 
Next
New Post
5/29/2009 9:23 AM
 

Hello,

I would like to read the source code of linkclick.aspx file, but I cannot see it in any folder of my dnn installation (4.9 version). Where is it??

Thank you

 
New Post
5/29/2009 9:43 AM
 

There is no LinkClick.aspx source file. It's an IIS custom http handler (IHttpHandler) implemented in

\Library\Services\FileSystem\FileServerHandler.vb

Your web.config lists it in the system.webServer/modules section (IIS7) or system.web/httpModules (IIS6).

 
New Post
5/29/2009 10:12 AM
 

Thank you, I was curious to see how it works because I have noticed a difference in the results of a search perfomed with OpenSearchEngine between a file linked with LinkClick.aspx and the same file linked with XSFileDownloaderPage.aspx (the file manager of DocumentLibrary module). In the first situation the filename indexed is the real name of file, in the second situation the filename indexed is "XSFileDownloaderPage.aspx". I would like to undestand the reason.... In your opinion what is the element that gives to LinkClick.aspx the name of file?

 
New Post
5/29/2009 10:37 AM
 

LinkClick does nothing more than count the click, then it redirects the browser to the actual URL. Any search engine would then receive the final URL and use that. As far as the DocumentLibary module is concerned, I would have to speculate that it serves the contents directly, without redirect. Essentially, whatever your browser displays in the end as URL in its address bar is what a search engine would use also.

 
New Post
5/29/2009 11:05 AM
 

It seems to me that LinkClick does not perform a simple redirect, but it returns a stream

Dim objResponse As HttpResponse = HttpContext.Current.Response

                        objResponse.ClearContent()
                        objResponse.ClearHeaders()

                        ' force download dialog
                        If ForceDownload Then
                            objResponse.AppendHeader("content-disposition", "attachment; filename=""" & filename & """")
                        Else
                            'use proper file name when browser forces download because of file type (save as name should match file name)
                            objResponse.AppendHeader("content-disposition", "inline; filename=""" & filename & """")
                        End If
                        objResponse.AppendHeader("Content-Length", objFile.Size.ToString())
                        objResponse.ContentType = GetContentType(objFile.Extension.Replace(".", ""))

                        'Stream the file to the response
                        Dim objStream As IO.Stream = FileSystemUtils.GetFileStream(objFile)
                        Try
                            WriteStream(objResponse, objStream)
                        Catch ex As Exception
                            ' Trap the error, if any.
                            objResponse.Write("Error : " & ex.Message)
                        Finally
                            If IsNothing(objStream) = False Then
                                ' Close the file.
                                objStream.Close()
                            End If
                        End Try

                        objResponse.Flush()
                        objResponse.End()
 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...LinkClick.aspx code - where is the file?LinkClick.aspx code - where is the 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