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
Announcement
Collapse
No announcement yet.
Logfile IP information in DNN and ASPX
Collapse
X
-
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 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, which is a different scenario again.
-
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.
Comment
-
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"];
We will amend the ASPX example on our ASP.NET Support page with this additional line of code.Last edited by Ray; Dec-05-2007, 12:01 AM.
Comment
Comment