Print Page | Close Window

IIs take long time to run ASP but HTML ru

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=10105
Printed Date: 31 March 2026 at 4:33pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: IIs take long time to run ASP but HTML ru
Posted By: meteor
Subject: IIs take long time to run ASP but HTML ru
Date Posted: 23 April 2004 at 2:26am

Hello
I wrote Some Script and installed them on the about 7 IIS machin all was ok but two of them dosnt work fine when i request a ASP page default  IIS take Long time and Then no error  but HTML pages runs ok .it dosnt show any asp error but show IE Errors like DNS error(not DSN)IIS runs simple ASP pages .but on the default page that uses My Include.asp it hanged up. in the include i use some connections to data base(Access 97) with const dsn value, when i change dsn to invalid it generate error of DSN not found but when i change it to valid value it dosnt run  and take very long time . i tried to insert response.write between lines to debuging it but no answer .

Sorry For My bad English. .



-------------
Sincerely
--------------------
http://www.TacPlusPlus.com - PowerFull Scripts For NTTacPlus



Replies:
Posted By: Mart
Date Posted: 23 April 2004 at 2:49am
Sounds like a problem with the code to me...


Posted By: meteor
Date Posted: 23 April 2004 at 3:26am

Mine code that i have problem with :as you see it is very simple

<%Option Explicit%>
<!--#include File="AdoVbs.inc"-->
<!--#include File="Connections.asp"-->
<!--#include File="Skin.asp"-->
<%
Dim SQLquery, privilege,OFS,OfsFile,TacPPuserDB,TacPPuser,AdoCon
Dim UsersDB,AccountingDB,UserName,Password,ADOconn,RecordSet
Dim RegisteredTo,Footer,MetaLogout,Temp2
Dim CardFile,StrSql,Temp,logactivity,FooterMenu

' make ready for logging check
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open tacppuserDB,UserName,"letmein"
Set recordset = Server.CreateObject("ADODB.Recordset")
sqlquery="select * from tblconfig where property = 'LogActivity'"
recordset.open sqlquery,adocon
logactivity = recordSet("value")
recordSet.close
set recordSet = nothing
adocon.close
set adocon = nothing

'Function's and Subroutins
sub addTolog(LogStr)
 if logactivity = "1" then
 'File System For Logging
 Dim FileName,strYear,StrMonth,StrDay
 strYear=Year(date)
 strMonth=month(date)
 strDay=day(date)
 if strmonth < 10 then strmonth="0"&strmonth
 if strDay < 10 then strday=0&strDay 
 FileName="logs\"&strYear&strMonth&strDay&a mp;".txt"
 Set oFS = Server.CreateObject("Scripting.FileSystemObject")
 Set oFSFile = oFS.OpenTextFile(Server.MapPath(FileName),8,True)
 ' start Logging
 oFSFile.WriteLine(Now() & " " & LogStr)
 oFSFile.Close
 Set oFSFile = Nothing
 Set oFS = Nothing
 end if
end sub

'Init Auto LogOut
Set AdoCon = Server.CreateObject("ADODB.Connection")
AdoCon.Open tacppuserDB,userName,"letmein"
Set Recordset = Server.CreateObject("ADODB.RecordSet")
SQLquery = "Select * From tblConfig Where Property = 'AutoLogOut'"
RecordSet. Open SQLquery , AdoCon
Session("AutoLogOutPage") = RecordSet.Fields("Value")
RecordSet.Close
SQLquery = "Select * From tblConfig Where Property = 'AutoLogOutTimeOut'"
RecordSet. Open SQLquery , AdoCon
Temp2 = RecordSet.Fields("Value")
temp2 = cint(temp2)
temp2 = temp2 * 60
Metalogout=" "
If Session("AutoLogOutPage") = 1 then
 MetaLogOut="<meta http-equiv=""refresh"" content=""" &Temp2& ";URL=LogOut.asp?Auto=1"">"
End if
Set RecordSet = Nothing
AdoCon.Close
Set AdoCon = Nothing
%>



-------------
Sincerely
--------------------
http://www.TacPlusPlus.com - PowerFull Scripts For NTTacPlus


Posted By: dpyers
Date Posted: 23 April 2004 at 9:00am

Your English is better than my Farsi.

How far along with the response.writes did you get beforeI think we'd need to look at the connections.asp as well. Use a DSN-less connection, not a DSN connection.

Couple of things I noticed...

  1. You Dimmed the variable Temp but didn't use it. Temp is a reserved word for many DB's. Best to avoid it.
  2. You don't call the subroutine addToLog anywhere in the example code. If you call it anywhere else, comment it out just to make sure the FileSystemObject code isn't causing a problem.

 



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Mart
Date Posted: 23 April 2004 at 11:15am
If you have Norton antivirus on your computer, disable script blocking. If it is enabled Norton causes ASP to hang if it refers to the FSO object.


Posted By: meteor
Date Posted: 23 April 2004 at 2:01pm
Originally posted by dpyers dpyers wrote:

Your English is better than my Farsi.

How far along with the response.writes did you get beforeI think we'd need to look at the connections.asp as well. Use a DSN-less connection, not a DSN connection.

Couple of things I noticed...

  1. You Dimmed the variable Temp but didn't use it. Temp is a reserved word for many DB's. Best to avoid it.
  2. You don't call the subroutine addToLog anywhere in the example code. If you call it anywhere else, comment it out just to make sure the FileSystemObject code isn't causing a problem.

Tanx For Assist but This Script File Is My main Include File That Used in All Scripts Files and All Functions is In Use also Variables. BUT TEMP variable is interest for me .and  i use Access 97 .



-------------
Sincerely
--------------------
http://www.TacPlusPlus.com - PowerFull Scripts For NTTacPlus


Posted By: meteor
Date Posted: 24 April 2004 at 1:49am

Originally posted by Mart Mart wrote:

If you have Norton antivirus on your computer, disable script blocking. If it is enabled Norton causes ASP to hang if it refers to the FSO object.

problem Solved Tank you
by uninstalling McAfee problem solved...



-------------
Sincerely
--------------------
http://www.TacPlusPlus.com - PowerFull Scripts For NTTacPlus


Posted By: pmormr
Date Posted: 26 April 2004 at 5:34pm
i like norton internet security... never had too many problems with it before

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: dotty
Date Posted: 13 May 2004 at 3:59pm

If script blocking is disabled - does that not make your computer vulnerable? 

I have had the same problem with IIS and have just read your postings.  My IIS was working fine for months and then Norton began to act weird and got me to uninstall and reinstall - so at some point in the past I must have known to disable scripting.  But I don't remember it being off all the time!

 



-------------
bear with me....


Posted By: Mart
Date Posted: 13 May 2004 at 4:06pm

It wont make you very vulnerable - just be careful about what scripts you run



Posted By: dotty
Date Posted: 13 May 2004 at 4:22pm
Thanks for the advice Mart.

-------------
bear with me....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net