This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
HotlinkBlocker (Forum Locked Forum Locked)
 Helicon Tech : HotlinkBlocker
Subject Topic: False Negative (Topic Closed Topic Closed)
Author
Message |
donzella
Newbie


Joined: 27 June 2004
Location: United States
Posts: 37
Posted: 27 March 2006 at 9:21pm  

Windows 2003 Server

I installed build 45 (and registered it). I set up a directory to be protected and set a redirect entry (see image). It all works fine except that every now and then I get redirect to the redirect page instead of seeing the content. If I click the link again, it works fine. Why would it do the redirect only once in a while when it's really being accessed from the right site?

Back to Top
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 28 March 2006 at 6:57am  

Can I see a link you are talking about online? If it is possible please show me how the problem is happening.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 
donzella
Newbie


Joined: 27 June 2004
Location: United States
Posts: 37
Posted: 28 March 2006 at 8:11am  

www.renderaid.com
go to the FILMS SPOTLIGHT toward the bottom of the page on the right side. Click on the Addidias legs commercial. It only happens every now and then but works most of the time. The problem is that when I click the link, every now and then it pops up the movie window like it's supposed to but gives me the redirect message that I set it to for hotlinking. If I close the movie window and click the link again, it works. It almost seems to me that it happens when it's been awhile since anyone clicked a link that the hotlinkblocker is monitoring.
Back to Top
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 28 March 2006 at 1:04pm  

It is really strange. Are you sure you've showed your exact current HotlinkBlocker configuration and there is no other records in configuration file? Are you really protecting /wall folder? And maybe there are some other ISAPI filters installed on your server like URLScan?

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 
donzella
Newbie


Joined: 27 June 2004
Location: United States
Posts: 37
Posted: 28 March 2006 at 8:44pm  

I am very sure that what I've shown you is exactly what is there. The only other ISAPI filter running is your LinkFreeze. I am only protecting the /wall folder. What you see is what is there. Here is the INI (note that   is not in the INI file, it just shows up in this post for some reason):


#################################################
# HotlinkBlocker Configuration file


Signature=18a634a7-7072-49d3-992d-01ef3b013917
LinkExpires=1800
NotifyOrder=MEDIUM


[Protect]
LINK         &n bsp;/wall     /pipe


[ReferersBlackList]
[ReferersWhiteList]
[UserAgentsBlackList]
[UserAgentsWhiteList]
Back to Top
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 29 March 2006 at 7:41am  

Sorry, I forgot to ask - please show me your IIS log file records when you accessing this link when error come out and without error.
Also please contact [email protected] and I will send you a debug build of HotlinkBlocker with instructions how to capture debug log. Possibly debug and IIS log will clarify this problem, because for now I don't even have any ideas why this could be happening.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 29 March 2006 at 7:56am  

And one more thing. Please upgrade your HtolinkBlocker and LinkFreeze to the latest versions before logging. I suggest you to install LinkFreeze 2.0 even that it is still beta version. It has more stable memory managment system. To configure LinkFreeze 2.0 use following settings:
Use tildas as all 3 replacement characters. Set "Move file extension" and leave "Hide file extension" blank.
Configure it exactly as I said and don't try to tweak for now - this will ensure it will work just as previous version.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 29 March 2006 at 7:59am  

And another thing. If you don't want to upgrade LinkFreeze try to remove redirection URL in HotlinkBlocker. This will make IIS to sontinue hotlinks with normal processing nad generate 404 error for hotlinks. You can then set up a custom 404 error handler in IIS for the /wall folder.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 
donzella
Newbie


Joined: 27 June 2004
Location: United States
Posts: 37
Posted: 29 March 2006 at 8:23am  

LinkFreeze and HotLinkBlocker are both versions I downloaded in the past few days. I have not upgraded to LinkFreeze 2 Beta as of yet. I have not tried removing the redirection yet, either.

Here are the entries in the log that pertain to the page affected. The first line is it failing, thus the second line is the redirect. The third line is me immediately clicking the link again and it working.

2006-03-29 14:05:26 W3SVC827341381 70.87.63.58 GET /launchMovie.aspx cid=1039 80 - 71.252.227.35 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.0.1)+ Gecko/20060111+Firefox/1.5.0.1 200 0 64

2006-03-29 14:05:26 W3SVC827341381 70.87.63.58 GET /pipe - 80 - 71.252.227.35 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.0.1)+ Gecko/20060111+Firefox/1.5.0.1 301 0 0

2006-03-29 14:05:30 W3SVC827341381 70.87.63.58 GET /launchMovie.aspx cid=1039 80 - 71.252.227.35 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.0.1)+ Gecko/20060111+Firefox/1.5.0.1 200 0 0
Back to Top
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 29 March 2006 at 8:30am  

I have one assumption that LinkFreeze 2.0 should fix this problem. Or disable redirect.
As for log records, try to search 302 status records. I see both requests to /launchMovie.aspx made with 200 status. Or the first request was redirected even with 200 status logged?

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 
donzella
Newbie


Joined: 27 June 2004
Location: United States
Posts: 37
Posted: 29 March 2006 at 8:33am  

yes, it was redirected with a 200 status logged. I will disable LinkFreeze completely on the dev site that I am using to test this and see if that helps.
Back to Top
 
donzella
Newbie


Joined: 27 June 2004
Location: United States
Posts: 37
Posted: 29 March 2006 at 8:38am  

I disabled LinkFreeze completely and got the exact same log results. Failed the first time and worked the second. The only difference I see in the log file is there is a 64 in the last column for the failing try vesus a 0 on the successful try. Does that mean anything to you?

2006-03-29 14:25:50 W3SVC827341381 70.87.63.58 GET /launchMovie.aspx cid=1039 80 - 71.252.227.35 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.0.1)+ Gecko/20060111+Firefox/1.5.0.1 200 0 64

2006-03-29 14:25:50 W3SVC827341381 70.87.63.58 GET /pipe - 80 - 71.252.227.35 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.0.1)+ Gecko/20060111+Firefox/1.5.0.1 301 0 0

2006-03-29 14:25:56 W3SVC827341381 70.87.63.58 GET /launchMovie.aspx cid=1039 80 - 71.252.227.35 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.0.1)+ Gecko/20060111+Firefox/1.5.0.1 200 0 0
Back to Top
 
donzella
Newbie


Joined: 27 June 2004
Location: United States
Posts: 37
Posted: 29 March 2006 at 8:40am  

I am going to remove the redirect and put a custom 404 error on the wall directory and see how that does. I will let you know.
Back to Top
 
donzella
Newbie


Joined: 27 June 2004
Location: United States
Posts: 37
Posted: 29 March 2006 at 9:40am  

I have tentatively fixed it I think. It might've been some asp.net code that was incorrectly checking if the file existed. I think it was causing your filter to redirect somehow. I modified the code, took out the redirect and added a custom 404 error for the /wall directory and so far I have not gotten the false redirect again. I will keep you posted on if it continues to work or not. Thanks for the help along the way.
Back to Top
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 30 March 2006 at 7:36am  

Can you please show me ASP.NET code that caused error and how you fixed it. I want to save it for future support cases.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 
donzella
Newbie


Joined: 27 June 2004
Location: United States
Posts: 37
Posted: 30 March 2006 at 8:17am  

Basically this is what happened...

This is the wrong way:
Code:

If File.Exists(Server.MapPath("/wall/media/") & strFileName) Then
'the file is there so it can be viewed
Else
'the file is not there so show file not found message
End If


That way sometimes gave the wrong path for some reason and it would redirect. I do not know why.

The right way:
Code:

If File.Exists(Server.MapPath("/wall/media/" & strFileName)) Then
'the file is there so it can be viewed
Else
'the file is not there so show file not found message
End If


This way seemed to fix the issue. The only difference is that the entire file and path are in the Server.MapPath instead of just the path. I have not seen it falsely redirect since I made that change.
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum