Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP CODE IS STOPPING THE IIS SERVICE DEAD

Reply
Thread Tools

ASP CODE IS STOPPING THE IIS SERVICE DEAD

 
 
stewert gallington
Guest
Posts: n/a
 
      09-04-2003
Im running some pretty straight forward code.

Mainly database access (SQL7) doing inserts and sometimes when the script
runs it halts the IIS service dead in its tracks. Before the page can even
finish loading.

the error seems to be caused when i introduced this section of code into the
page.

sub SaveIDC( rec2Save )

'# Local variable declarations
Dim myLocalArr
Dim szIDCID
Dim szIndividualID
Dim rsQJIndInfo

'# Perform the value extractions from the CSV record.
myLocalArr = breakString( rec2save, "SR" )

'# get the individual id from the QJIndInfo table based on the QJ User ID.
set rsQJIndInfo = server.CreateObject("ADODB.Recordset")
rsQJIndInfo.Open "select * from QJIndInfo where QJUserID = '" &
myLocalArr(12) & "'", conn, 1, 3

if rsQJIndInfo.RecordCount > 0 then
szIndividualID = rsQJIndInfo("Individual_ID")
else
szIndividualID = myLocalArr(12)
end if

szIDCID = replace(myLocalArr(64), " ", "" ) & "_" & myLocalArr(12) & "-" &
myLocalArr(13) & "_" & formatdatetime(now(),2)& formatdatetime(now(),3)

'# Insert the ID card
Response.Write " <li>Inserting ID Card " & myLocalArr(12) & "...<br>"
Conn.execute "insert into IDC (IDC_ID, CardNumber, Type, DateIssued,
IssuingNLC, ExpiryDate, CreationEditDate, IsQwizz ) values ('" & szIDCID &
"','" & replace(myLocalArr(64), " ", "" ) & "','PIDC','" & REPLACE(
myLocalArr(65), "-", "/" ) & "','0000','','" & formatdatetime(now(),2) &
"',-1 )"

'# Create the Ind_tic_idc record with null ticket ref
Conn.execute "insert into Ind_Tic_IDC ( Individual_ID, Ticket_ID, IDC_ID )
values ('" & szIndividualID & "','NULL','" & szIDCID & "')"

'# Create the Ind_tic_idc record with ticket ref
Conn.execute "insert into Ind_Tic_IDC ( Individual_ID, Ticket_ID, IDC_ID )
values ('" & szIndividualID & "','" & szGlobalTic_ID & "','" & szIDCID &
"')"

'Update Audit Trail
conn.execute "insert into AuditTrail
(User_ID,NLC_ID,Operation,CreationEditDate) values ('QJ_USER','Q" &
myLocalArr(13) & "','Create IDCARD " & szIDCID & "','" & formatdatetime(
now(), 2 ) & " " & formatdatetime( now(), 3 ) & "')"

end sub

As you can see, pretty straight forward.
It seems to stop the service about 50% of the time its run.
Can anyone shed any light.

Thanks
Stewert


 
Reply With Quote
 
 
 
 
Egbert Nierop \(MVP for IIS\)
Guest
Posts: n/a
 
      09-06-2003
"stewert gallington" <> wrote in message
news:...
> Im running some pretty straight forward code.
>
> Mainly database access (SQL7) doing inserts and sometimes when the script
> runs it halts the IIS service dead in its tracks. Before the page can even
> finish loading.
>
> the error seems to be caused when i introduced this section of code into

the
> page.


Your code is very vulnarable...
Avoid creating strings and executing them on SQL without filtering on the
string.
I prefer to use the ADODB.Command to execute inserts and to have a
ADODB.Parameter to filter arguments.

This might not solve your 'hang' problem but it could be caused by it. Also
check for recursive loops or for loops that do not end.
--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deploying a web service configured under IIS 7 to one under IIS 6 Whiskey Romeo Lima ASP General 1 07-16-2009 01:05 AM
Dead TCP/IP Stack = DEAD VISTA !! Skybuck Flying Windows 64bit 15 09-23-2007 07:54 PM
Programatically stopping/starting a webservice/website with IIS 5.1 and higher nano2k ASP .Net Web Services 0 08-09-2007 09:09 AM
Indexing Service IIS 5.0 to IIS 6.0 Jay ASP General 13 03-07-2005 03:24 PM
Dead... the damn thing's dead... David Dean Computer Support 9 01-30-2004 02:54 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57