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

Server object error 'ASP 0177 : 80070002'

$
0
0

Hi All,

Can someone please shed some light on how to register a DLL and use it in classic ASP?

I've followed several pages and almost all are the same when it comes to creating the DLL (I created it with C# VS 2008).  

The problem I'm running into is that there seem to be several different methods on the web for "registering" the DLL.  The old way sounded easy (drag and drop), but I'm on Windows 7 and IIS 7.  Some say use regasm.  Others say use gacutil /i. What am I missing?  I ended up using gacutil and I see my assembly in the c:\windows\assembly folder, but when I go to test my code I get the error -Server object error 'ASP 0177 : 80070002' on the line:  Set objLogon = Server.CreateObject("Impersonate.UserLogon")

Does this mean my DLL hasn't been registered or registered improperly?

Any help is greatly appreciated.


Microsoft VBScript runtime error '800a0046'

$
0
0

Hello All,

I write a simple code to check the ADODB.Connection. but it's giving below error.

This page was last refreshed on 9/1/2015 3:00:57 PM,
LOGON_USER:
Creating ADODB.COnnection object.

Microsoft VBScript runtime error '800a0046'

Permission denied: 'CreateObject'

/Test1.asp, line 9

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

CODE:

<HTML>
<BODY>
This page was last refreshed on <%= now() %>, <br>

<%
Response.Write("LOGON_USER: " & _
Request.ServerVariables("LOGON_USER") & "<br>")
Response.write("Creating ADODB.COnnection object." & "<br>")
Set oScriptHelper = CreateObject("ADODB.Connection")
Response.Write ("SUCCESSFUL!" & "<br>")
set oScriptHelper = nothing
%>

</BODY>
</HTML>

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

I given full permission on folder to IUser_ComputerName but same error is coming. I used process monitor to check if I can find access denied error but there is no access denied error. Also when I changed the application pool identity to "LocalSystem" , It's working but when I changed its identity to "NetworkService" or "DefultApplicationPool" , Its not working.

OS: Windows 2008 R2

Please help.

Thanks.

Open file from secured (https) site

$
0
0

Hello,

I have an extranet (https) site that is set to open files located on a file server.  This works fine when I'm connected to the VPN, but when I'm disconnected I get "Cannot find //fileserver/foldername/filename  Make sure the path or Internet address is correct". There are several layers of security for the system and the file:

1) Windows account (https)

2) System level (username/password)

3) File folder 

I guess my main question is, what credentials are being used to pass to open the file?  I'm sure that's the problem and why I can't open it, but I don't know where to being to fix.  

Thanks in advance!

Search data from sql server using textbox in classic asp

$
0
0

I am unable to search data in asp the code is given bellow :

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Search Petition Status</title>
</head>
<body>
<form action="input.asp" method="GET" name="form1">
<table>
<tr>
<td>Full Name:</td>
<td><input name="TxtName" id="TxtName" type="text" /></td>
</tr>
</table>
<input name="button" ID="Button1" value="submit" type="Submit" />
</form>
</body>
</html>

<%
If Request.ServerVariables("REQUEST_METHOD") = "GET" then

Dim Conn, Rs, ConnString, SQL_Search
Dim name1

name1 = request.form("TxtName")
pno1 = request.form("TxtPNO")

Set Conn= Server.CreateObject("ADODB.Connection")
 ConnString = "DSN=mydsn;User Id=sa;Password=sa123;Database=mysearch"
Conn.Open  ConnString
SQL_Search= "select * from register where (TxtName like'%" + TxtName.text" or pno like'%" + TxtPNO.text + "%') "
Conn.Execute SQL_Search
response.Write(Name)

response.Write(email)
response.Write(phonenumber)
response.Write(company)
response.Write(title)
response.Write(pno)
response.End

Conn.Close
Set Conn = Nothing
Set SQL_Search = Nothing

End If
%>

IIS 7.5 Classic ASP application hangs process, requires service restart

$
0
0

Hi,

I have a client who has a moderately popular website.  The entire site is written in classic ASP running on Windows Server 2008 R2 fully patched and IIS 7.5.  Occasionally, his entire site will hang, causing any HTTP(s) request to simply timeout, just to that website.  He has a subsidiary website running on the same machine (different AppPool) that is still accessible during this time.  Recycling, restarting, stopping/starting the AppPool for the hung website does not work, never has.  It requires a restart of the w3svc service, which takes between 30 seconds and a full minute for it to stop during an incident like this.  His website is high profile during certain times and when this happens it is crippling to his business.  We have IPMonitor checking the status of the website and restarting the service if needed, but this is such a terrible solution.

One important thing we've noticed is when search engine crawlers index the site, these crashes happen MUCH more frequently.  They have had to restrict all robot activity in order for their site to function normally.  These crashes still happen, and it could be bots that don't abide by the robots.txt file.

The server is a very capable Dell, with modern twin hexacore processors at 2.67Ghz, 48GB of RAM (most of which is never allocated), and 15k drives in a raid 10 for optimal local storage speeds.  For extra storage and cluster data they have an EqualLogic array hooked up at 4Gbps.  The SQL database for this server is running on a secondary machine to reduce load.

If anyone could shed any light on issues they've had or seen, it would be much appreciated.  Event logs show absolutely nothing, I've tried increasing the debug level on IIS logs, but I still see no helpful information.  Another crashed just happened this morning, so I can still look back on any other areas people happen to suggest.

Thanks 

advance search

$
0
0

I am trying to do a  SQL query script that does a search and return, all the record if no specific word or phrase as been select for a drop down menu or typed e.g. it show all country or all gender..

Below is any example of the SQL I did but it not working properly,

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

<%
Dim ESCORTS__MMColParam
ESCORTS__MMColParam = "1"
If (Request.QueryString("City") <> "") Then
ESCORTS__MMColParam = Request.QueryString("City")
End If
%>
<%
Dim ESCORTS__MMColParam1
ESCORTS__MMColParam1 = "18"
If (Request.QueryString("agefrom") <> "") Then
ESCORTS__MMColParam1 = Request.QueryString("agefrom")
End If
%>
<%
Dim ESCORTS__MMColParam2
ESCORTS__MMColParam2 = "65"
If (Request.QueryString("ageto") <> "") Then
ESCORTS__MMColParam2 = Request.QueryString("ageto")
End If
%>
<%
Dim ESCORTS__MMColParam3
ESCORTS__MMColParam3 = "1"
If (Request.QueryString("Gender") <> "") Then
ESCORTS__MMColParam3 = Request.QueryString("Gender")
End If
%>
<%
Dim ESCORTS__MMColParam4
ESCORTS__MMColParam4 = "1"
If (Request.QueryString("Gender2") <> "") Then
ESCORTS__MMColParam4 = Request.QueryString("Gender2")
End If
%>
<%
Dim ESCORTS__MMColParam5
ESCORTS__MMColParam5 = "1"
If (Request.QueryString("Ethnicity") <> "") Then
ESCORTS__MMColParam5 = Request.QueryString("Ethnicity")
End If
%>
<%
Dim ESCORTS
Dim ESCORTS_cmd
Dim ESCORTS_numRows

Set ESCORTS_cmd = Server.CreateObject ("ADODB.Command")
ESCORTS_cmd.ActiveConnection = MM_AOlivia_STRING
ESCORTS_cmd.CommandText = "SELECT * FROM ADULT_PROFILES WHERE City = ? OR City ='' AND Gender = ? AND Gender = ? AND ( Age >= ? AND Age <= ?) AND Ethnicity = ? ORDER BY ViewCount DESC"
ESCORTS_cmd.Prepared = true
ESCORTS_cmd.Parameters.Append ESCORTS_cmd.CreateParameter("param1", 200, 1, 255, ESCORTS__MMColParam) ' adVarChar
ESCORTS_cmd.Parameters.Append ESCORTS_cmd.CreateParameter("param2", 200, 1, 255, ESCORTS__MMColParam3) ' adVarChar
ESCORTS_cmd.Parameters.Append ESCORTS_cmd.CreateParameter("param3", 200, 1, 255, ESCORTS__MMColParam4) ' adVarChar
ESCORTS_cmd.Parameters.Append ESCORTS_cmd.CreateParameter("param4", 5, 1, -1, ESCORTS__MMColParam1) ' adDouble
ESCORTS_cmd.Parameters.Append ESCORTS_cmd.CreateParameter("param5", 5, 1, -1, ESCORTS__MMColParam2) ' adDouble
ESCORTS_cmd.Parameters.Append ESCORTS_cmd.CreateParameter("param6", 200, 1, 255, ESCORTS__MMColParam5) ' adVarChar

Set ESCORTS = ESCORTS_cmd.Execute
ESCORTS_numRows = 0
%>

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

If any anyone as any sample code that could help me

Where is "Recalculate"???

$
0
0

OK I'm finally switching from Server 2003/IIS 6.0 to Server 2012/IIS 8.5.

So I'm trying to use Classic Mode and ASP which I think I have setup correctly.

In IIS 6.0, I had to "Recalculate Server Extensions 2002 Web" to create the files that ASP needed like _fpclass/fpdbform.inc.

Where in IIS 8.5 do I do that???

Maximum requesting entity body limit

$
0
0

Hello All,

I am migrating from Win 2003 to 2012 server. I am having an issue with one of my asp application on 2012 server. Application works fine on 2003 server. After some research, I found that I need to increase "Maximum requesting entity body limit" to make the application work. It is currently set to 200kb (204800). 

1. Why does it work on 2003 and not on 2012, even though both have the same limit? 

2. If I double the limit, Are their any security implications I need to consider ?


Classic app function not working from remote computer while working in localhost

$
0
0

Hi, we've experiencing a weird issue with our classic web application after migrating to a new server (from 2003 to 2012 R2). It working well for almost all functions except product detail page, when opened from the server itself (using localhost or it IP address) it working fine but when opened from other computers in the network it returning an error:

<div id="content"> <div class="content-container">

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.

</div> </div>

Permission for files (anonymous user) have been added in application folder too. Already try it on WIndows Server 2008 R2 as well and experiencing the same issue.

Please advice how to resolve the issue, any advice is highly appreciated.

Thanks in advance.

Regards,

Acung

How to handle quote marks in a text input field in a form.

$
0
0

I have a form with a text input (search) field.

Here it is allowed to use double quote marks to define a combined search word.

It could look like 'good bad "1 2" nice' where '1 2' is a combined search word.

 

The problem is that after clicking the form, which takes you back to the page and begins the implementing of  the search, then the content of the field is changed to 'good bad'.

The text after the first double quote mark has now disappeared.

It is probably because the first double qoute mark is believed to be a string ending.

 

An input of 'good bad ""1 2"" nice' gives the same result. Only 'good bad' is left.

 

I of course would like the whole input string(s) to still be visible when the search is carried out.

 

I can catch the original search string as it comes back to the page. But I don't know how I could put that back into the abbreviated field.

 

Can that be done?

 

/Larry

Windows 2012 Asp Classic

$
0
0

Hello
Sorry My English
I have WEBSITE developed in ASP CLASSIC on a Windows 2003
The company changed the server to a WINDOWS 2012
On this change , already managed by all in working with exception of the date separator .
I thought it was a simple change of regional settings , but does not.
I want the default dates are dd- mm -yyyy and not mm / dd / yyyy.


Thanks

Total Items in a Group

$
0
0

I've got a group working (from some code I found on Stack Exchange) and it does what I need so far.  However, I'd like to have subtotals for the items for each group.  Here is my chunk of code:

strSQL2 = "SELECT ts_TimeSheetItems.[WorkOrderID], ts_TimeSheetItems.[DayDate], ts_TimeSheetItems.[Type], ts_TimeSheetItems.[Duty], ts_TimeSheetItems.[TimeWorked], ts_TimeSheetItems.[TaskPerformed] FROM ts_TimeSheetItems WHERE TimeHeaderID=5012 ORDER BY DayDate ASC;"

rsBob.Open strSQL2, conn

Dim currentGroupName, previousGroupName, One
currentGroupName = ""
previousGroupName = ""
Do Until rsBob.EOF
    currentGroupName = rsBob("DayDate")
    One = rsBob("TimeWorked")
    'Two = rsBob("TimeWorked")
    If currentGroupName<>previousGroupName Then
        Response.Write("<P>")
        Response.Write("<B>" & currentGroupName & "</B>")
        Response.Write("<BR>")
    End If
    Response.Write(rsBob("TaskPerformed") & " " & One & "<BR>")
   'SOMEHOW I NEED TO GET A SUBTOTAL HERE???
  previousGroupName = currentGroupName
    rsBob.MoveNext
Loop
rsBob.Close

Here is the output:

9/16/15
Accounting 1
Babysitting 2.5
Lawn Mowing 3.0

9/17/15
Lawn Mowing 2.5
Free Time 0.5
Trimming 4

It will look nicer in a table but while I'm still hacking I usually forego formatting.  Anyway, I'm trying to figure out how to get the subtotal for each group (and a grand total would be nice too!)

I can't seem to get a Sum of each group to work (not shown here because none of my attempts have worked).  I am not at all familiar with asp, but used to dabble in javascript, perl, etc.  BTW, not having semi-colons at the ends of lines is send my OCD into overdrive Tongue Out

Any help would be greatly appreciated.  I'd like to do it in asp, but was thinking about populating a javascript variable with hours somehow and using that to handle the math if I have to. I figure that if "One" holds the number of hours and can be displayed in html then there has got to be a way I can get the sum or plug it into another variable.

Unable to run working IIS 7 Classic ASP application on IIS 8

$
0
0

I am migrating a classic ASP application from IIS 7 to IIS 8 but am getting Object_required:_'Application(...) error when calling function in Global.asa.

On checking Global.asa , the problem is mitigated by hard coding the Server.MapPath generated path in the code when loading the XML. But i need a proper solution for this issue. What can cause this issue and how do i fix it?

Note : The IIS server roles in IIS 7 and IIS 8 are similar.

Given below is the failing excerpt from my global.asa file :


<SCRIPT LANGUAGE=VBScript RUNAT=Server>

....

    'Loads Test.xml
    call setXMLInApplicationScope ("Test.xml", "Test")

.....

Sub setXMLInApplicationScope(sFileName, objectName)
    Dim xmlDoc
    
    If Application("ApplicationError") = "Y" Then
        Exit Sub
    End If
    
    Set xmlDoc = createFreeThreadedDOM()
    Call xmlDoc.setProperty("SelectionLanguage", "XPath")    
    Call xmlDoc.load(Server.MapPath(sFileName))

Print Flyers in Classic Asp website.

$
0
0

I want to use print flyers option in my website.. Please provide me Code or any help.. or any api if any service provider is there?

Please share some link or any 3rd party tool if is there any?

Error Form.

$
0
0


We have a form of personal data, not all are required.

If there is an error shown above and always display correctly.

The problem is after all there is written correctly an impediment to continue.

The button is not continuous.

In almost all cases, for this and other mistakes, every browser behaves in a way, even in the difference between http and https.

Happy technology, always updating, rapidly changing.


Reading From a text file and splitting the string

$
0
0

Hi, 

I am having trouble reading from a text file. 

It is suppose to read from the text file in a loop. Going through line by line. For each line, there will be a separator "|". I need it to split the string according the the separator and get the values. 

I am only using a text file as the company server would not allow me to use any kind of database. 

Please do help. 

Thanks,

-J

Extract of code : 

<% sub checkmx()

path = "C:/inetpub/wwwroot/HASE/aio.txt"

nric = Response.write(request.querystring("IC"))

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(path,1)

count = 0
do while not f.AtEndOfStream
f.readline

checkmx = split(f.readline,"|")
mx = checkmx(1)
checknric = checkmx(0)
count = count + 1

if nric = checknric then

found = 1

else
found = 0
end if

loop

if MX = "A" then
%>
<a href="GenMX11A.html">Job Description of Jobs Available</a>
<%elseif MX ="11" then %>
<a href="GenMX11.html">Job Description of Jobs Available</a>
<% end if
response.write("mx")
end sub
%>

Problem creating big xlsx file from Classic ASP using Microsoft.ACE.OLEDB.12.0 provider

$
0
0

Hi.

I have a classic ASP page that write on an xlsx file.

This is the code:

set conExcel = Server.CreateObject("ADODB.Connection")
conExcel.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & strXLSFileName & ";Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=0;"""
do while not rs.EOF
	strSQL = "insert into [Data$]("
	strSQL = strSQL & " [Column 01],"
	strSQL = strSQL & " [Column 02],"
	strSQL = strSQL & " [Column 03],"
	strSQL = strSQL & " [Column 04],"
	strSQL = strSQL & " [Column 05],"
	strSQL = strSQL & " [Column 06],"
	strSQL = strSQL & " [Column 07],"
	strSQL = strSQL & " [Column 08],"
	strSQL = strSQL & " [Column 09],"
	strSQL = strSQL & " [Column 10],"
	strSQL = strSQL & " [Column 11],"
	strSQL = strSQL & " [Column 12],"
	strSQL = strSQL & " [Column 13],"
	strSQL = strSQL & " [Column 14],"
	strSQL = strSQL & " [Column 15]"
	strSQL = strSQL & " ) values ("
	strSQL = strSQL & " '" & rs("COLUMN_01") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_02") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_03") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_04") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_05") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_06") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_07") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_08") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_09") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_10") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_11") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_12") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_13") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_14") & "',"
	strSQL = strSQL & " '" & rs("COLUMN_15") & "'"
	strSQL = strSQL & ")"
	conExcel.execute(strSQL)
	rs.moveNext
loop
conExcel.close

I can create only small file, less then 1 Mb.

If there are more rows the final xlsx file is empty.

Can you help me?

Thanks

& "',"

Performance Counter discrepancies (bug in counters?)

$
0
0

Odd one.

My company has a large and cumbersome classic ASP application that has to run under a classic piplelined .net 2.0 appPool.  InProc sessions are used to maintain connectivity between the client and the specific server that they are using (becomes a PITA when taking a server out of the balanced pool for maintenance).

We are currently investigating reducing the session timeouts in order to increase security and as part of this process I am looking at the perf counters to identify session duration.

On a nightly basis, a scheduled IIS stop/start is run (not a restart) to perform various automated maintenance tasks which should reset any existing connections to the server.

Looking at the 'Session Duration' Active Server Pages counter, the maximum session duration is 202,393,446 milliseconds (seehttps://technet.microsoft.com/en-us/library/cc781003(v=ws.10).aspx table D34) which is roughly in the order of 2.5 days.

How is this possible?

Uploading large files

$
0
0

I have an existing Classic ASP site which has just been move to a new host. It work on the old host but not on the new one. If I try and upload a file that is 121mg via the admin side of the site it works but if I try one that is 129mg or larger I get "Operation not allowed" How in web.confg do I override the maximum file size. It is iis 8

<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <security>
             <requestFiltering>
                  <requestLimits maxAllowedContentLength="3000000000" />
              </requestFiltering>
      </security>    
    </system.webServer>
    <system.web>
        <customErrors mode="Off" />
        <compilation debug="true" />       
    </system.web>
</configuration>

Is the web.config

I tried adding



    <asp>
       <limits maxRequestEntityAllowed="2000000" />
    </asp>

but that just crashed the site and so did

    <asp>
    </asp>

I presume things have changed in IIS 8 but I can find anything that says what to do for IIS 8





    mlngBytesReceived = Request.TotalBytes


        mbinData = Request.BinaryRead(mlngBytesReceived)

Is where it is failing


Thanks

Combobox dependent on a table

$
0
0

Hello, I need help to create a combobox dependent
I have a table called "COLLEGE", within her own columns:
 
COL_ID
COL_Name
COL_USER
COL_IMAGE

How should work:
- The first combo will list all data in the column "col_name";
- When you select any name of the first combo, the second combo should be automatically populated with information from the column "COL_IMAGE"

I am seen in some tutorials that you should use two tables, but in my case I want to use only one. Help me?

Viewing all 488 articles
Browse latest View live


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