Quantcast
Channel: Classic ASP
Viewing all 488 articles
Browse latest View live

Replace special characters in string when copied from Microsoft word

$
0
0

I am trying to figure out an issue in my Classic ASP application, whenever a user tries to copy text from Microsoft word into Textarea placeholder & save, it is stored in the Database as a??.

I tried replacing special character like single quote using following statement

1)Replace(Trim(Request.Form("Description")),chr(39), "'")

2)Replace(Trim(Request.Form("Description")),chr(39), "'")

Both the above statements didn't work. It was able to find special character-single quote when i type in & replaced it with ' when i use 2nd statement but for some weird reason it doesn't still work for Copy paste from Microsoft word

Any help is highly appreciated


Windows 10 IIS Express HTTP/1.1 New Application Failed

$
0
0

Trying to get Classic ASP to work in Windows 10.  IIS Manager says IIS, but I'm sure I have IIS Express.   Windows 10 IIS 10.0.10586.0   

Followed Youtube:  @Microsoft @Windows 10 Lesson 7 - Installing and Configuring #IIS Web Hosting.  Enabled:
.Net Framework 3.5 and 4.6 (already enabled)
Extensibility 3.5 and 4.6
ASP 
ISAPI Extensions, ISAPI Filters
ASP.Net 3.5 , 4.6  

Using Default Web Site wwwroot,  
Set IIS Manager setting: 
1) Send errors to browser = True, enable client-side and server-side debugging = true
C:\inetpub\wwwroot\web.config =
<httpErrors errorMode="Detailed" />
<asp appAllowClientDebug="true" appAllowDebugging="false" scriptErrorSentToBrowser="true" />

2) Set AppPool to:  classic .net apppool

Changed:
C:\Program Files\IIS Express\AppServer\applicationhost.config
<sectionGroup name="system.webServer">
<section name="asp" overrideModeDefault="Allow" />

Restarted IIS at top level, restarted Default Web Site (just to be sure).

HTTP extension works,  ASP extension gets:   HTTP/1.1 New Application Failed
on this file:
<html>
<head>
<title>ASP HTML works</title>
</head>

C:\inetpub\wwwroot\web.config is:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<clear />
<add value="default.asp" />
<add value="default.htm" />
<add value="index.htm" />
<add value="default.aspx" />
<add value="index.html" />
<add value="index.asp" />
<add value="index.php" />
</files>
</defaultDocument>
<httpErrors errorMode="Detailed" />
<asp appAllowClientDebug="true" appAllowDebugging="false" scriptErrorSentToBrowser="true" />
</system.webServer>
</configuration>

 

Scope Identity question

$
0
0

Trying to use SELECT SCOPE_IDENTITY() ID and just simply write back the value:

Here is my full code:

<!DOCTYPE html><!--#include virtual="/Connections/connTickets.asp"--> <html><body><head><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"><script src="http://code.jquery.com/jquery-1.11.2.min.js"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script><title>Department of Psychiatry Information Systems</title><meta name = "viewport" content = "width = device-width"></head><button type="button" onClick="history.go(-1);">Back</button><br><br><%
set rs=Server.CreateObject("ADODB.recordset")

snameFirst = Request.Form("nameFirst")
snameFirst = Replace (snameFirst, "'", "''")

snameLast = Request.Form("nameLast")
snameLast = Replace (snameLast, "'", "''")

sDescription = Request.Form("Description")
sDescription = Replace (sDescription, "'", "''")


sql="INSERT INTO Tickets (nameFirst,nameLast,Division, Building, Floor, Room, Phone, Description)"
sql=sql & " VALUES "
sql=sql & "('" & snameFirst & "',"
sql=sql & "'" & snameLast & "',"
sql=sql & "'" & Request.Form("Division") & "',"
sql=sql & "'" & Request.Form("Building") & "',"
sql=sql & "'" & Request.Form("Floor") & "',"
sql=sql & "'" & Request.Form("Room") & "',"
sql=sql & "'" & Request.Form("Phone") & "',"
sql=sql & "'" & sDescription & "');SELECT SCOPE_IDENTITY() ID;"
conn.Execute sql,recaffected
if err<>0 then
response.write("No update permissions!")
else
response.write rs("ID")
response.write("<h3>" & recaffected & " Ticket Added</h3>")
end if
Response.AddHeader "REFRESH", "1;URL=AddTicket.asp"

conn.close%></body></html>

Everything works except when I added the: response.write rs("ID")

My Primary key of this table is called TicketNumber and I simply want to be able to reference the TicketNumber that was just inserted later on down this page. I thought: SCOPE_IDENTITY() is what I wanted, right?

I get a 500 error when the Response.write is in.

What am I doing wrong?

Thanks,

Scott

Help getting CRC32 code to execute under Classic ASP

$
0
0

Hi, I'm not a VB programmer or ASP for that matter, however, I have a little project where I would like to obtain the CRC-32 value of some ANSI text strings. I've searched all over for a solution but not yet found anything really useful. I've found some VBScript code which might do providing that I can get it to work.

I'm getting error 500 at the moment when I try to run it, so I assume that would be something to do with it failing to compile on the web server at run time.

Any help with this would be appreciated.

Thanks in advance, Chris.

<%@LANGUAGE="VBScript"%><%

Set fso = Server.CreateObject("Scripting.FileSystemObject")
set fs = fso.OpenTextFile(Server.MapPath("../test/" & "abc.txt"), 2, true)
fs.WriteLine(Crc32CalcString("aa"))
fs.Close

%><%

Option Explicit On
Public Class crc32
 
Private TLookup = {&H0, &H77073096, &HEE0E612C, &H990951BA, &H76DC419, &H706AF48F,&HE963A535, &H9E6495A3, &HEDB8832, &H79DCB8A4, &HE0D5E91E, &H97D2D988,&H9B64C2B, &H7EB17CBD, &HE7B82D07, &H90BF1D91, &H1DB71064, &H6AB020F2,&HF3B97148, &H84BE41DE, &H1ADAD47D, &H6DDDE4EB, &HF4D4B551, &H83D385C7,&H136C9856, &H646BA8C0, &HFD62F97A, &H8A65C9EC, &H14015C4F, &H63066CD9,&HFA0F3D63, &H8D080DF5, &H3B6E20C8, &H4C69105E, &HD56041E4, &HA2677172,&H3C03E4D1, &H4B04D447, &HD20D85FD, &HA50AB56B, &H35B5A8FA, &H42B2986C,&HDBBBC9D6, &HACBCF940, &H32D86CE3, &H45DF5C75, &HDCD60DCF, &HABD13D59,&H26D930AC, &H51DE003A, &HC8D75180, &HBFD06116, &H21B4F4B5, &H56B3C423,&HCFBA9599, &HB8BDA50F, &H2802B89E, &H5F058808, &HC60CD9B2, &HB10BE924,&H2F6F7C87, &H58684C11, &HC1611DAB, &HB6662D3D, &H76DC4190, &H1DB7106,&H98D220BC, &HEFD5102A, &H71B18589, &H6B6B51F, &H9FBFE4A5, &HE8B8D433,&H7807C9A2, &HF00F934, &H9609A88E, &HE10E9818, &H7F6A0DBB, &H86D3D2D,&H91646C97, &HE6635C01, &H6B6B51F4, &H1C6C6162, &H856530D8, &HF262004E,&H6C0695ED, &H1B01A57B, &H8208F4C1, &HF50FC457, &H65B0D9C6, &H12B7E950,&H8BBEB8EA, &HFCB9887C, &H62DD1DDF, &H15DA2D49, &H8CD37CF3, &HFBD44C65,&H4DB26158, &H3AB551CE, &HA3BC0074, &HD4BB30E2, &H4ADFA541, &H3DD895D7,&HA4D1C46D, &HD3D6F4FB, &H4369E96A, &H346ED9FC, &HAD678846, &HDA60B8D0,&H44042D73, &H33031DE5, &HAA0A4C5F, &HDD0D7CC9, &H5005713C, &H270241AA,&HBE0B1010, &HC90C2086, &H5768B525, &H206F85B3, &HB966D409, &HCE61E49F,&H5EDEF90E, &H29D9C998, &HB0D09822, &HC7D7A8B4, &H59B33D17, &H2EB40D81,&HB7BD5C3B, &HC0BA6CAD, &HEDB88320, &H9ABFB3B6, &H3B6E20C, &H74B1D29A,&HEAD54739, &H9DD277AF, &H4DB2615, &H73DC1683, &HE3630B12, &H94643B84,&HD6D6A3E, &H7A6A5AA8, &HE40ECF0B, &H9309FF9D, &HA00AE27, &H7D079EB1,&HF00F9344, &H8708A3D2, &H1E01F268, &H6906C2FE, &HF762575D, &H806567CB,&H196C3671, &H6E6B06E7, &HFED41B76, &H89D32BE0, &H10DA7A5A, &H67DD4ACC,&HF9B9DF6F, &H8EBEEFF9, &H17B7BE43, &H60B08ED5, &HD6D6A3E8, &HA1D1937E,&H38D8C2C4, &H4FDFF252, &HD1BB67F1, &HA6BC5767, &H3FB506DD, &H48B2364B,&HD80D2BDA, &HAF0A1B4C, &H36034AF6, &H41047A60, &HDF60EFC3, &HA867DF55,&H316E8EEF, &H4669BE79, &HCB61B38C, &HBC66831A, &H256FD2A0, &H5268E236,&HCC0C7795, &HBB0B4703, &H220216B9, &H5505262F, &HC5BA3BBE, &HB2BD0B28,&H2BB45A92, &H5CB36A04, &HC2D7FFA7, &HB5D0CF31, &H2CD99E8B, &H5BDEAE1D,&H9B64C2B0, &HEC63F226, &H756AA39C, &H26D930A, &H9C0906A9, &HEB0E363F,&H72076785, &H5005713, &H95BF4A82, &HE2B87A14, &H7BB12BAE, &HCB61B38,&H92D28E9B, &HE5D5BE0D, &H7CDCEFB7, &HBDBDF21, &H86D3D2D4, &HF1D4E242,&H68DDB3F8, &H1FDA836E, &H81BE16CD, &HF6B9265B, &H6FB077E1, &H18B74777,&H88085AE6, &HFF0F6A70, &H66063BCA, &H11010B5C, &H8F659EFF, &HF862AE69,&H616BFFD3, &H166CCF45, &HA00AE278, &HD70DD2EE, &H4E048354, &H3903B3C2,&HA7672661, &HD06016F7, &H4969474D, &H3E6E77DB, &HAED16A4A, &HD9D65ADC,&H40DF0B66, &H37D83BF0, &HA9BCAE53, &HDEBB9EC5, &H47B2CF7F, &H30B5FFE9,&HBDBDF21C, &HCABAC28A, &H53B39330, &H24B4A3A6, &HBAD03605, &HCDD70693,&H54DE5729, &H23D967BF, &HB3667A2E, &HC4614AB8, &H5D681B02, &H2A6F2B94,&HB40BBE37, &HC30C8EA1, &H5A05DF1B, &H2D02EF8D}
Public Function Crc32CalcString(ByVal source As String) As String
Dim crc As Integer = &HFFFFFFFF
Dim x As Integer = 0
Dim c As Byte = 0
While x <= source.Length - 1
    c = Asc(source(x))
    crc = (((crc And &HFFFFFF00) >> 8) And &HFFFFFF) Xor (TLookup((crc And 255) Xor c))
    x += 1
End While
crc = (Not crc)
'Return hex value or crc value.
Return Hex(crc)
End Function
End Class
 %>

ServerXMLHTTP.6.0 || WinHttpRequest connecting to TLS 1.2 server

$
0
0

Hi

I have a server side application that connects to a third party server and is currently able to communicate with it via SSL 3.0. The third party server will be upgraded to only support TLS 1.1 and TLS 1.2. I have enabled TLS 1.1 and TLS 1.2 on my server for both client and server and am able to connect to my server via TLS 1.2 from a browser. I am also able to browse from my server with Internet Explorer to the test TLS 1.1 page however my server application is unable to connect to the third party test page.

An example of my application that connects to the third party server below. Server Registry changes below code.

I would be most grateful for any assistance.

===============================================================================

<%@ EnablesessionState=False
Language=JScript %>
<%
var URL = "https://test.paygate.co.za/process.trans";
//URL = "https://www.paygate.co.za/payxml/process.trans" /*Current SSL Server*/
var Data = "";
var ReqStatus;
var ReqStatusTxT;
var PageTxT;

try {
var XMLobj = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0");
XMLobj.open ("GET", URL, false);
XMLobj.send(Data);
ReqStatus=XMLobj.status;
ReqStatusTxT=XMLobj.statusText
PageTxT=XMLobj.responseText;
}
catch(e){
ReqStatus=-1;
ReqStatusTxT=e.message;
PageTxT=""; 
}
XMLobj = null;


%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<title>Test SSL</title>
</head>
<body>
Status code:<%=ReqStatus%>&nbsp;&nbsp;&nbsp;&nbsp;<%=ReqStatusTxT%><br /><br />
Returned XML:
<hr>
<%=Server.HTMLEncode(PageTxT)%>
<hr>
<br /><br />
</body>

===================================================================================

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client]
"DisabledByDefault"=dword:00000001
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
"DisabledByDefault"=dword:00000001
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

 

problem with include file using asp classic

$
0
0

mickb

0 Postsproblem with include file using asp classic

<div class="comment-right-col">

a few seconds ago

<div id="post-preview-content" class="reply-comment">

Im trying to include a file in an asp page that has a "?" search parameter.

<!--#include File='bedroom10.asp?destinationid=31'-->

No success, any help would be appreciated thanks

</div> </div>

Classic ASP page stops working , No server Update has taken place

$
0
0

Windows Server 2012 Foundation

IIS 8

CLassic ASP site has functioned fine on this server until last Thursday. Now site will not load properly.

If I remove parameter enctype="multipart/form-data" 

from the page the site loads fine but uploads do not work.

THis was caused by an windows update that many I have read resolved by rolling back the update.

My server has not had an update. Has anyone had this happen? Any Help is appreciated.

Thanks

Extra Cookie in Response Header

$
0
0

Extra Cookie in Response Header:

I am sending one cookie in the response header but another one appears that is unwanted; this is a Classic Asp site.

'HERE IS SET THE COOKIE
Response.Clear
Response.AddHeader "Set-Cookie", "LoginSuccessful=1; expires=Sun, 18-May-2014 23:16:03 GMT; path=/; domain=AcoolWebsite.org"
Response.end


'HERE IS WHAT WE END UP WITH:
[Cache-Control: private, Content-Length: 0, Content-Type: text/html, Server: Microsoft-IIS/8.5, Set-Cookie: LoginSuccessful=1; expires=Sun, 18-May-2014 23:16:03 GMT; path=/; domain=AcoolWebsite.org; Secure, Set-Cookie: ASPSESSIONIDASRQRTCC=APKDJOGBECONNMFCPGHMACFG; path=/; Secure, Access-Control-Allow-Origin: *, X-Powered-By: ASP.NET, Date: Thu, 12 May 2016 06:02:07 GMT, Connection: Keep-alive, Via: 1.1 ID-0002262072547054 uproxy-2]

This is a Classic Asp site but it seems ASP.NET is setting it's own cookie and adding it to the response.

How can I get rid of this?


Thanks.


Classic ASP Connection string for Oracle 11g - ORA-12557: TNS:protocol adapter not loadable

$
0
0

Problem: Error occurred when the following code is attempting to connect using Oracle connection string; Environment variables for oracle connection has been set but the problem is persistent; how to fix this issue; your help is highly appreciated 


Environment Variables: E:\Oracle\product\11.2.0\client_1\BIN;E:\Oracle64\product\11.2.0\client_1\BIN;....

Code: The following code lines is written in classic asp to display the cafe name; simple code. 

 set strtemp=Server.CreateObject("adodb.connection")
strtemp.open="Connection Timeout=10;Provider=OraOLEDB.Oracle;Data Source=Mocha;User Id=XXXX;Password=XXXXX;"

Call uga_ConnOpen(cnnBFSG,strtemp,"","")			
strSQL="Select coffee_name from LuLu.Mochalaka where LuLu.Mochalaka_VW.cafe_ID=16051"
call uga_RecSetOpen(cnnBFSG,rstSG,strSQL)

			
			Cafe=""
			Do While Not rstSG.EOF
				Cafe=rstSG("coffee_name")
				rstSG.MoveNext
			Loop
			rstSG.close
                     response.write("Coffee is "& Cafe)
                   response.end

Error: 
OraOLEDB error '80004005' 
ORA-12557: TNS:protocol adapter not loadable

 

Request.Form is empty on IIS 8

$
0
0

Hi! I saw a similar post without a resolution so I try again. I am moving some of my companies old websites from Win 2008 webserver SP2 64-bit with IIS 7 to Win 2012 R2 64-bit with IIS 8. Everything seemed to be going smoothly until I tried a form page. GET works but POST throws a 500 error '80004005' on the page that Requests the form variables (regardless of method i.e. Request("x"), Request.Form("x") etc). Somehow the post data disappears on the way.

Some more info:

-There is nothing wrong with my code, this happens to all my old forms as well as super simple test forms.

-The same things happen when I submit a PHP-form. Post comes back empty.

-Handler mappings allow the GET, HEAD, POST verbs so that is not the problem. I have checked that basically everything in IIS is configured like on my old server and I am using the same web.config files so nothing should have changed there. 

-I have read and tried suggestions to change the application pools to Classic mode and No managed code and tried to enable 32-bit. It does not help.

I have seen several people with the same or similar problem online but I have not found any working solution. It seems like something in IIS checks and empties the post array before it reaches ASP/PHP but I have no clue how to disable that. Isn't there anyone who has a solution for this please?! 

MS ACCESS DRIVER (.mdb) update database not working

$
0
0

Hi. 

We have old website that uses MS Access for its dbms. and it's working fine. But when we have transferred it on new 64bit server, it fails on submit functions. The db connection seems running ok but  insert/update functions.  I installed MS Access 2007 on server.

Here is the code:

dim fuser, fpass, duser, dpass, admin 

fuser = Trim(Request.Form("userID")) fpass = Trim(Request.Form("userPassword")) set conn=server.createobject("adodb.connection") main_mdb = server.MapPath("/masterlist/database/main.mdb") conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & main_mdb & ";" Set rs=Server.CreateObject("ADODB.recordset") rs.open "Select VchUserName,VchPassword,BlnAdministrator from tblUser", conn do until rs.EOF duser = Rs.Fields.Item("VchUserName").Value dpass = Rs.Fields.Item("VchPassword").Value admin = Rs.Fields.Item("BlnAdministrator").Value if fuser = duser And fpass = dpass Then session("username")=duser session("administrator")=admin loggeddate=now() sql="insert into tblUserLog (VchUserName,DteLogged,VchAction)values ('" & duser & "','" & loggeddate & "','In')" conn.Execute(sql) '<----Error here
end if rs.movenext loop rs.close set rs=nothing conn.close

Please help...

Thanks

[solved] Unable to send an email from an .asp page

$
0
0

Hello,

I have a vbscript function, that sends an email out to a specific email address, using the user's email address as the email "sender"

This code worked when we were using Exchange 2003, but now that we upgraded to Exchange 2013, the code no longer works.

This code is located in a functions.asp page, which can be called by other .asp pages.  The server that this code is located on is NOT the same server as the Exchange server.  If needed, let's call the server holding this code "InternalASPServer", and the exchange server is "ExchServer1".

Here is the relevant code of the function:

sub LateRegistration(classID, classDate, name, courseName, courseLocation, userEmail)

	dim mail, message	

                                                            
        message = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN""><html><body><table>" _& "<tr><td>Class:</td><td>" & courseName & "</td>" _& "<tr><td>City:</td><td>" & courseLocation & "</td>" _& "<tr><td>Date:</td><td>" & classDate & "</td>" _& "<tr><td>Student added:</td><td>" & name & "</td>" & "<br><br>Web Interface</body></html>" 
		Set mail = server.CreateObject("CDO.MESSAGE")
		if userEmail = "" then
			userEmail = "myemail@ourdomain.com"
		end if

		
		mail.From = userEmail
			
				mail.CC = userEmail
		
		mail.To = "testemail@ourdomain.com"
		mail.Subject = "Registration - Add Student"		
		mail.HTMLBody = message
		mail.Send 
		Response.Write "<br><b>Registration email sent.</b>"                  
	end if		
end sub

This code, while we were using Exchange 2003, did actually work.  To be honest, I don't know how it ever worked in the first place - it doesn't even reference our Exchange Server by name!  I don't know how it ever managed to actually achieve sending the email.

If we assume our Exchange 2013 server is named "ExchServer1", does anybody have suggestions on what needs to be done to this code, to actually send the email to our exchange server so that it is sent out?

Thank you very much for your time!

Classic ASP page file upload with ADORecordSet.Update with enctype='Multipart/Formdata' works well with IIS 6.0 but On IIS 7.5 browser waits indefinitely

$
0
0

Hi,

Classic ASP page file upload with ADORecordSet.Update with form enctype='Multipart/Formdata' works well with IIS 6.0 but On IIS 7.5 browser waits indefinitely waiting for response also application hangs. All other sessions after file upload in one session (user) will stop working.

VBScript.dll version 5.8.7601.19104 is installed on windows server 2008 R2 Enterprise edition with Service pack 1.

The file gets stored into database, but no response. To make application work we need to recycle the application pool, restart windows process activation services every time.

Application is running on a separate application pool with

Enable 32 bit applications        True.

.Net framework version  No managed Closed.

Managed Pipleline mode    Classic.

Identity                                Application Pool identity

Authetication              winodws integrated authetication

Tried with Ping Enabled to False, increased MaxRequestEntityAllowed  9437184, shutdown time limit increased to 90 to 600. There is luck.

Administrative events logs below messgages

A worker process '1888' serving application pool 'Classic ASP' failed to stop a listener channel for protocol 'http' in the allotted time.  The data field contains the error number 5138.

A process serving application pool 'Classic ASP' exceeded time limits during shut down. The process id was '3976'. 

Looks for it is problem with IIS 7.5. Tried various configurations on Application Pool and ASP settings without any luck.

Thanks in advance for your help

Migrating WebApps from Windows 2008 Server to Windows 2012 Server.

$
0
0

Hi,

We are planning to migrate our existing Classic ASP Web Apps from Windows 2008 (IIS7.5) Server to Windows 2012 Server(IIS 8.0/8.5). Server was not yet ready, before it was ready I need to do the Impact document. My question is,

1. Will Classic ASP works in IIS 8.0/8.5 (I know the answer is yes, but), Is there any impacts will be there on existing application or will it work fine as it is how it works in IIS 7.5 with out any issue.

Thank you.

Class_terminate prevents calling the function from another class RSS

$
0
0

Hello, can anyone say why my local pc's IIS7 does not (anymore) allow me to call procedures of another class from within the Class_terminate procedure of a calling class? So I am using classic asp.

It gives me all the the Permission denied error (error nro 70).

This never happened earlier on, it just started suddenly.

Regards,

Matti


Improve Entropy of Session Id in Classic ASP

$
0
0

Hi,

This is regarding the session id in classic ASP.

I want to know the following:

1. How session ids are generated in ASP? [Cryptographically or something]

2. How we can calculate the entropy of the session ids.

3. What can be done to generate more stronger session ids so that the entropy of the session ids is enhanced.

Thanks

Abhishek

using server.Createobject("MSXML2.XMLHTTP") post and having problems

$
0
0

Hi All I am using this code

FUNCTION fnEnc(txtToEncrypt)
  postUrl = "http://fastdev1.usask.ca:81/encdec.asmx/fnEnc"
  Set xmlhttp = server.Createobject("MSXML2.XMLHTTP")
  xmlhttp.Open "POST",postUrl,false
  xmlhttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
  xmlhttp.send txtToEncrypt
  fnEnc = xmlhttp.responseText
END FUNCTION

and when calledlike this

DataToSendDec = "strValue=" & Request.Querystring(key)
enc=fnEnc(DataToSendDec)
Response.Write "Encrypted__:" & key & ": " & enc & "<BR>"

I get 
Encrypted__:D: szQFw5zM8b767Qh6gSCb0A==

notice how there is a space between D: and sz...

so I figure there is some ASC in there i cant see so using Server.HTMLEncode 
Response.Write "Encrypted__:" & key & ": " & Server.HTMLEncode(enc) & "<BR>"

I now get:

Encrypted__:D: <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://tempuri.org/">szQFw5zM8b767Qh6gSCb0A==</string>

how do i pull just the string out of that xmlhttp.responseText

problems converting asp to aspx from iis6 to iis8 with sql commands

$
0
0

I have a web site on a server 2003 iis6 machine. I am converting to a server 2012 iis 8.

this is my code:

<%@ Page Language="C#" Debug="true" %><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=windows-1252"><TITLE>Peolple List</TITLE></HEAD><body background="shamback2.gif"><h1 align="center"><font color="black"><b>People List</b></font></h1><h4 align="center"><%
    Dim conn = Server.CreateObject("ADODB.Connection");
    conn.connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/IntranetMDB/DrList.mdb");
    conn.open 
%><!-- *********** Get last Updated Date From Table  ************** --><%
    Dim rs = Server.CreateObject("ADODB.Recordset");
    Dim sql;
    sql = "SELECT * FROM [Update]";
    rs.Open
%><FONT FACE="Arial" COLOR="red">Last Updated</br><%=Server.HTMLEncode(rs.Fields("Date").Value)%></FONT><%
  rs.close
%></h4><!-- ************** End Last Updated Query *********************** --><!-- *********** Begin Builing Fee Results  ****************** --><%

    sql = "SELECT * FROM [List]";

%><TABLE ALIGN="center" WIDTH="70%" BORDER="1" BGCOLOR="#ffffff" CELLSPACING="0"><FONT FACE="Arial" COLOR="#000000"><THEAD><TR><TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>Persons's Name</FONT></TH><TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>Title</FONT></TH><TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>Number</FONT></TH><TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>Code</FONT></TH><TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>Specialty</FONT></TH><TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>Ppin</FONT></TH><TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>PPI</FONT></TH><TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>Exit Date</FONT></TH></TR></THEAD><TBODY><%
On Error; Resume Next;
rs.MoveFirst;
do while ((not) rs.eof); ** This is my problem line **

I am getting errors for that line:

c:\inetpub\wwwroot\Physicians\ListAll.aspx(64,25): error CS1003: Syntax error, 'while' expected
c:\inetpub\wwwroot\Physicians\ListAll.aspx(64,25): error CS1003: Syntax error, '(' expected

I am thinking that the "do" needs to be above the rs.MoveFirst line.

I am pulling lines of information from an access database to display in a window in the IE site.

I am also getting the following errors:

:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_d-5zx4gz.0.cs(169,17): error CS1002: ; expected
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_d-5zx4gz.0.cs(169,17): error CS1525: Invalid expression term '.'
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_d-5zx4gz.0.cs(169,18): error CS1002: ; expected
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_d-5zx4gz.0.cs(181,17): error CS1002: ; expected
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_d-5zx4gz.0.cs(181,17): error CS1525: Invalid expression term '.'
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_d-5zx4gz.0.cs(181,18): error CS1002: ; expected
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_d-5zx4gz.0.cs(199,17): error CS1002: ; expected
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_d-5zx4gz.0.cs(199,17): error CS1525: Invalid expression term '.'
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_d-5zx4gz.0.cs(199,18): error CS1002: ; expected

This was originally an asp page, but have to convert to aspx.

asp C0000005 error

$
0
0

windows 2008 64bit

IIS7.5

asp

This application  has been used for 4 years, Recent half year  the following errors often occur, with the progress of the process is dead

Error: error in file /detailed.asp. An error occurred in the external object (C0000005). Script cannot continue..

Error: file /detailed.asp scripting engine exception. ScriptEngine caused an exception "C0000005" (in "IActiveScript:: Close"), from "CActiveScriptEngine:: FinalRelease ()")..

Error: script engine exception. ScriptEngine caused an exception "C0000005" (in "IActiveScript:: SetScriptState"), from "CActiveScriptEngine:: ResetToUninitialized ()")..

please help me!

Classic ASP Connection string for Oracle 11g

$
0
0

we are running Windows Server 2008R2 64-bit (IIS 7.5) and our website is running okay with oracle client 8.

However we are in the process of upgrading our oracle database to 12g therefore we have to configure our website.

we have installed the Oracle 11.2.0.3 64bit client and the TNSNames.ora is configured and we can connect to our database using SQLPlus.

When we try to run our Classic ASP web page that connects to Oracle we receive the following error

80004005|Oracle_client_and_networking_components_were_not_found

Sample of the code is below

=============================

<%@LANGUAGE="VBSCRIPT" %>
<!DOCTYPE html>
<html>
<body>
<%
Session.CodePage=65001

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=MSDAORA;Data Source=xxxxxxxxx;User Id=xxxxxxx;Password=xxxxxx;"

sql="select emp_empno from employees where branch=123 " 

Set rs = conn.Execute(sql)

Do While Not rs.EOF
Response.Write "<tr>"
response.write("<td>" & rs(0) & "</td>")
Response.Write "</tr>"
rs.MoveNext
Loop

rs.close
conn.close

%>

============================

if we change the following code   

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=M;Data Source=xxxxxxxxx;User Id=xxxxxxx;Password=xxxxxx;"

to

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=OraOLEDB.Oracle;Data Source=xxxxxxxxx;User Id=xxxxxxx;Password=xxxxxx;"

then we receive this error

800a0e7a|Provider_cannot_be_found

In the Application Pool of IIS the following attributes apply: 

  •  Set "Enable 32 bit Applications" to true, in the "Advanced Settings"

Do we also need to install Oracle 11.2.0.3 32bit client as well? Also, do we have to configure anything else to make it work?

any help will be greatly appreciated 

with regards,

Deborah

Viewing all 488 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>