PDA

View Full Version : Logfile IP information in DNN and ASPX


chriscsanyi
11-30-2007, 10:18 PM
Was wondering how the IP was getting set in the log file when using the CGI search? It was working when I first created the page using the default search.cgi page. Then I wrote a custom DNN module using the code that you gave examples for in an .aspx page. I am guessing since it is located inside of a module it can not get access to the correct IP information anymore? Or could it be some type of an option that I turned off and do not know about? Thanks Chris

Ray
12-03-2007, 02:25 AM
Can you tell us what the error message or behaviour is, when it is unable to retrieve the IP address? Does it report an incorrect IP or does it do something else? Can you give us an example from the log file?

There should not be any problem since the method described in our DNN support page (http://www.wrensoft.com/zoom/support/tutorial_dnn.html) embeds the search page within an IFRAME. But we have not tested this usage, and are unaware of what else DNN might be doing.

I am also presuming that it is the above instructions you referred to, and not the ASPX instructions here (http://www.wrensoft.com/zoom/support/aspdotnet.html), which is a different scenario again.

chriscsanyi
12-04-2007, 10:59 PM
From the logfile. It was working then just would not record any more.

2007-11-29, 15:28:13, 65.112.xxx.xx, "collaboartion", Matches = 0, AND, PerPage = 10, PageNum = 0, No cats, Time = 0.013, Rec = 0
2007-11-29, 15:28:16, 65.112.xxx.xx, "collaboration", Matches = 26, AND, PerPage = 10, PageNum = 0, No cats, Time = 0.015, Rec = 0
2007-11-30, 10:28:26, , "test", Matches = 3, AND, PerPage = 10, PageNum = 0, No cats, Time = 0.033, Rec = 0
2007-11-30, 10:28:33, , "tuesday", Matches = 10, AND, PerPage = 10, PageNum = 0, No cats, Time = 0.013, Rec = 0
2007-11-30, 10:28:43, , "ncsl", Matches = 44, AND, PerPage = 10, PageNum = 0, No cats, Time = 0.013, Rec = 0

I did use the ASPX directions and created and ACSX page for DNN because I did not like the Iframe example that you were using. This will give me more power to customize. Everything still working and recording just not the IP but it might be because of the ASPX setup does not record the IP because it is calling the cgi in a different way.

Ray
12-04-2007, 11:52 PM
Oh I see, I had not realized you were using the ASPX wrapper method. I can see the problem now, and yes, the ASPX setup is not passing the necessary environment variable to the CGI to determine the client's IP address.

You can fix this by adding the following line to your ASPX wrapper (before calling Process.Start):


psi.EnvironmentVariables["REMOTE_ADDR"] = Request.ServerVariables["REMOTE_ADDR"];


This will fix the problem and the IP address should be logged correctly again. (Note that this is in C# syntax. VB.NET syntax of this line is provided on the support page).

We will amend the ASPX example on our ASP.NET Support page (http://www.wrensoft.com/zoom/support/aspdotnet.html) with this additional line of code.

chriscsanyi
12-06-2007, 06:35 PM
Thanks for the Fix. It is working great.