Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - IIs take long time to run ASP but HTML ru
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

IIs take long time to run ASP but HTML ru

 Post Reply Post Reply Page  12>
Author
meteor View Drop Down
Groupie
Groupie
Avatar

Joined: 31 August 2003
Location: Iran
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote meteor Quote  Post ReplyReply Direct Link To This Post Topic: IIs take long time to run ASP but HTML ru
    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. .



Edited by meteor
Sincerely
--------------------
PowerFull Scripts For NTTacPlus
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 23 April 2004 at 2:49am
Sounds like a problem with the code to me...
Back to Top
meteor View Drop Down
Groupie
Groupie
Avatar

Joined: 31 August 2003
Location: Iran
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote meteor Quote  Post ReplyReply Direct Link To This Post 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
--------------------
PowerFull Scripts For NTTacPlus
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
meteor View Drop Down
Groupie
Groupie
Avatar

Joined: 31 August 2003
Location: Iran
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote meteor Quote  Post ReplyReply Direct Link To This Post 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
--------------------
PowerFull Scripts For NTTacPlus
Back to Top
meteor View Drop Down
Groupie
Groupie
Avatar

Joined: 31 August 2003
Location: Iran
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote meteor Quote  Post ReplyReply Direct Link To This Post 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
--------------------
PowerFull Scripts For NTTacPlus
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2004 at 5:34pm
i like norton internet security... never had too many problems with it before
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.