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

Calling a xls file request in classic asp hosted in IIS 7.5 result in empty xls file download, instead of invoke the VB script logic written in that file

$
0
0

When click a button it will invoke a url which is like https://localhost/sampl.xls?id=23, Now the logic is written in the sample.xls in the classic asp project , when ever i invoke the url it is return a empty xls file instead of data, even when try to debug the file it is not hit , i think the handler is not mapped correctly, but i already added the handler mapping for .xls file in script map from location system32/inetserv/asp.dll , can any one have idea why the request is giving empty xls with the same name , but it works correctly in iis6


503 service unavailable

$
0
0

I am getting service unavailable 503 after certain time period let say for after 12 hours. What could be the reson.

Even I am having 16 gb ram but it show max 4 gb used memory.

Looping with SQL and grouping/summing products ...

$
0
0

Hi,

I have an old application written in classic ASP.

At present it runs some SQL (Call it SQL1) and pulls out all the orders, I.E Order Number, Order Date etc ....

Inside this loop is another SQL (Call it SQL2) which loops through all the orderlines where the table IDs match.
At the moment the only info being collected from this SQL2 is a qty stored in the table which is summed up, and a total is provided for each Order Number in SQL1

Each Order might have the following info as its OrderLines

Product Aqty = 52

Product B
qty = 73

Product C
qty = 18

What I want to do is sum all this info together from all the open orders.
i.e. I want to print out
Product A - Total = 192 (total from all open orders)
Product B - Total = 280 (total from all open orders)
Product C - Total = 96 (total from all open orders)

I can use SQL2 in the loop because the Product Name and the Qty required are in this SQL2, but I'm just unsure where to structure my loops in order to group these fields grouped together whilst looping through all the orders ...

Appreciate your help :-)
David

Excel.Application, Workbooks.Add problem

$
0
0

Hi

Recently moved a couple of websites from a Server 2008r2 box to a new 2012r2 box. both websites use Server.CreateObject("Excel.Application") to access or create excel documents

One web site opens existing docs, writes new values to them & then displays the resulting values created by the changes, this web site is working perfectly.

The other web site displays data from a database, and allows the user to download a excel doc of this data. This is the one with the problem, the web site itself works fine. But when the page that creates the excel doc for download runs, I get this message

Microsoft Office Excel error '800a03ec'.Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space.
• To make more memory available, close workbooks or programs you no longer need. 
• To free disk space, delete files you no longer need from the disk you are saving to.

this line executes ok.       Set YearxlApp = Server.CreateObject("Excel.Application")

the next line in the code is where it fails.   Set YearxlBook  = YearxlApp.Workbooks.Add

the error message  is rubbish, its a new build server with over 100gb memory free and more disk space than you could ever fill. I am inclined to think its some sort of permission thing. but what I don't understand is how the other web site works fine

the only difference being, one usesWorkbooks.Add the otherWorkbooks.Open

any ideas or places to look would be greatly appricated

Thanks

Sending cdosys email to multi recipients from the database

$
0
0

Hi there

Currently, when I need to send out a mailshot to our members, I feed each email address into a form's input box on the website which then automatically sends the email out through the cdosys code picking up the email address which has just been entered into the database,

However, this is such a long job to do a 1000 emails, and I would like to code it directly to the database to pick up all email addresses at once and send within five minutes.

I know I could enter all the addresses separated by a semicolon within the cdosys code, but this method is also too long winded when we have changes to the addresses - which happens for every mailshot so it defeats the object!

This is what I have tried today and done many many variations!:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><%@LANGUAGE="VBSCRIPT"%>
<head>

<title> zzzz</title>

</head>
<body bgcolor="#EEEEEE" TEXT="#000000">

<table border="0">


<%

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "nnfrance"
qry = "SELECT emaila FROM [news_alerts]"
Set RS = Conn.Execute(qry)


vemaila = RS("emaila")
vemaila = Replace(vemaila, VbCrLf, "<BR>")
If RS.EOF Then
Response.Write("No items found")
Else
Do While Not RS.EOF
Response.Write(RS.Fields("emaila").value & "<br />")

RS.MoveNext()
Loop
End If%>

<%Dim emaila
emaila = vemaila
Set myMail = CreateObject("CDO.Message")
myMail.Subject = "Next Meeting"
myMail.From = "Organisation <info@xxx.xxxxxxxxx.com>"
myMail.To=emaila
myMail.CreateMHTMLBody "http://www.xxxxx.com/alerts/alerts_meetings.asp"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="localhost"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
%>


<br><br><br>

<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#EEEEEE">
<tr><td align=right><font size=2><a href="../eng_lib/unsubscribe.asp">
Unsubscribe</a></font></td></tr>
</table>
</td><br>

<%Server.Execute("footer.asp")%></body></html>

However, all this does is list on the webpage (invisible to users) all the emails in the database field "emaila" but does not actually send the emails from the database.

I have spent a great deal of time in the last month playing around with docsys to try and send emails to multi-recipients in the database but without success.  I would be so grateful for anyone's suggestions!

browser forcing user to enter text for an optional input field in classic asp form!

$
0
0

Hi! I have a dialog box with some optional and mandatory fields built in classic asp. One of the fields is optional but the browser is prompting me that some sort of text is mandatory! Can you help find the bug pls? cheers, J.

<tr><td width="146" valign="top"><p class="label">Message:</p></td><td width="298"><%			
                    		Response.Write "<textarea rows=5 name='Message' style='width: 100%;' REQUIRED='FALSE' value=''></textarea>"
						%></td></tr><tr><td width="146"></td><td width="298"></td></tr>

link/url in email body causing email not to go through with no errors using cdo

$
0
0

Hi All,  I seem to have a problem with a classic asp page hosted @ godaddy but not sure if the problem is with the code! The page generates an email when user wants to recommend a product to a friend! If the email msg body contains a url the email does not go through but no errors are reported. The url that i am passing is to a domain on godaddy!

Here is the sample code with some hardcoding to demonstrate the problem:

<%

Dim objNewMail
Set objNewMail = Server.CreateObject("CDO.Message")

objNewMail.From = "from@test.com" '<- valid email goes here!
objNewMail.To = "to@test.com" '<- valid email goes here! objNewMail.Subject = "test subject" objNewMail.TextBody = "Click the following link to see the property http://www.test.com"
' GoDaddy SMTP Settings objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "relay-hosting.secureserver.net" objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objNewMail.Configuration.Fields.Update objNewMail.Send Set objNewMail = Nothing Response.Write ("Message sent successfully!") %>

any ideas? cheers Jay

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

New Update: I have made some progress to diagnose the problem at it seems that only when I include this particular url does it fail and if I use any other the email goes through! Strange as the url is also on godaddy! Could it have finished up on some blacklist?! 

IIS8 - FTP login - Prompt user to change password not working.

$
0
0

Whenever a new user browses to our FTP, I want them to be prompt to change their password upon first logon....  I have the bullet set in windows auth...but for some reason it is not prompting them to change it, it just flips and keeps asking for username and password.  I have windows 2012 r2


I can't debug classic asp on iis7 on windows 2008 R2 x64

$
0
0

Hello my name is Sebastian and I have a big problem trying to debug classic ASP on IIS 7 on windows 2008 R2 x64, I read some post about this topic before and it works fine in other 32 bits SO, but when I try to debug my site on windows 2008 R2 x64 even if I enable debug on server side and attach the process to my visual studio 2010 or visual studio 2013, the process not debug at all, and i don't know what happend . The application pool is set on classic pipeline mode, enabled32bits application is set also on true and the same goes to debug server side debug on ASP tab

The funny thing is when I set the flag enabled32bits on false debug seems to work but my site use com dll and those doesn't work at all if the previous flag is not set on enabled :(

I hope you can help me with this issue because I don't know how to solve it for my own, thanks

 !! :)

Windows Update breaks multipart/form-data

$
0
0

Running Windows Server 2012 here, Classic ASP application.

We have an image upload page which has been working for the last... ten years.

<form method="post" enctype="multipart/form-data" action="...">

Anyway, Windows Update ran today at about 10:30am NZ time. Afterwards users complained they couldn't upload images anymore. No error generated in logs. 

Restarted pool, IIS, server - in that order. Nothing fixed it. Uninstalled today's Windows Update, restarted server, everything working again. 

The updates offered are:

  • KB3104002
  • KB3119147
  • KB3099863
  • KB3108347
  • KB3108381
  • KB3109094
  • KB3109103
  • KB3102429
  • KB3112148

Is there any way to find out which update broke this application?

Cheers

HTTP Error 404.3 - Not Found

$
0
0

Hi, There ...

Pleas Help me ..

I installed IIS8 and asp 4, PHP 5.6, but still veiwed a 403 Error page ..

<div class="content-container">

HTTP Error 404.3 - Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

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

Most likely causes:

  • It is possible that a handler mapping is missing. By default, the static file handler processes all content.
  • The feature you are trying to use may not be installed.
  • The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.)
  • If ASP.NET is not installed.
</div> <div class="content-container">

Things you can try:

  • In system.webServer/handlers:
    • Ensure that the expected handler for the current page is mapped.
    • Pay extra attention to preconditions (for example, runtimeVersion, pipelineMode, bitness) and compare them to the settings for your application pool.
    • Pay extra attention to typographical errors in the expected handler line.
  • Please verify that the feature you are trying to use is installed.
  • Verify that the MIME map is enabled or add the MIME map for the Web site using the command-line tool appcmd.exe.
    1. To set a MIME type, use the following syntax: %SystemRoot%\windows\system32\inetsrv\appcmd set config /section:staticContent /+[fileExtension='string',mimeType='string']
    2. The variable fileExtension string is the file name extension and the variable mimeType string is the file type description.
    3. For example, to add a MIME map for a file which has the extension ".xyz": appcmd set config /section:staticContent /+[fileExtension='.xyz',mimeType='text/plain']
    Warning: Ensure that this MIME mapping is needed for your Web server before adding it to the list. Configuration files such as .CONFIG or dynamic scripting pages such as .ASP or .ASPX, should not be downloaded directly and should always be processed through a handler. Other files such as database files or those used to store configuration, like .XML or .MDF, are sometimes used to store configuration information. Determine if clients can download these file types before enabling them.
  • Install ASP.NET.
  • Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, clickhere.
</div> <div class="content-container">

Detailed Error Information:

<div id="details-left">
Module   StaticFileModule
Notification   ExecuteRequestHandler
Handler   StaticFile
Error Code   0x80070032
</div> <div id="details-right">
Requested URL   http://localhost:80/phpmyadmin/index.php
Physical Path   C:\inetpub\wwwroot\phpmyadmin\index.php
Logon Method   Anonymous
Logon User   Anonymous

</div>
</div>

sudden timeouts happening on multiple sites

$
0
0

Hi there.

I have a few Classic ASP sites on a VPS server running Windows Web server 2008 R2 and Plesk. IIS version 7.5.76.

The sites have been running pretty smoothly for a few years. Suddenly today i am getting reports from a few of them that there are timeout issues:

One site has an Access DB in the backend, the other is SQL. The issue seems to be related on a (pure) ASP file upload component that is suddenly not responding. I have managed to response.write until just before that component starts working - after that it just hangs. Again - no changes have been made recently.

I have restarted the sites, the app pool, restarted the server as well as Web services via Plesk - but no changes, i still get the timeouts. extending the server timeout does nothing - it just takes longer to die...

Any ideas what the issue might be, or how i can troubleshoot this?

many thanks!

A trappable error (C0000005) in various asp pages on occasions happening

$
0
0

Hello,

I got this error in various asp pages on occasions(even in the page nothing to do except for "Response.Write") from a long time ago.

[Event log]
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Active Server Pages" /> 
<EventID Qualifiers="49152">5</EventID> 
<Level>2</Level> 
<Task>0</Task> 
<Keywords>0x80000000000000</Keywords> 
<TimeCreated SystemTime="2015-12-09T03:26:41.000000000Z" /> 
<EventRecordID>161862</EventRecordID> 
<Channel>Application</Channel> 
<Computer>[SERVER_NAME]</Computer> 
<Security /> 
</System>
- <EventData>
<Data>File /index.asp Unexpected error. A trappable error (C0000005) occurred in an external object. The script cannot continue running.</Data> 
</EventData>
</Event>

[ASP Error]
Active Server Pages , ASP 0115 (0x80004005)
A trappable error (C0000005) occurred in an external object. The script cannot continue running.

[Server Information]
Windows Server 2008 R2 x64 Standard / Classic ASP

For example, the error happens in this simple page as well.

<%@ Language = "VBScript" CODEPAGE="65001" %>
<% Option Explicit %>
<%
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-store"
Response.Expires = -1

Response.Write("ok")
Response.End

%>

On the web site, some external DLL components are being used but it has been also happening in pages that don't use them.

I've tried googling to know what's wrong on it but there were no any exact answers.
And besides, there's no problem with the external DLL components working.
This error is very rarely happening, but, our users are seeing an error page sometimes!

Is there  anyone who has encountered this error? Please help me out!!

-Hyun

asp azure sql connection master.dbo.syscharsets problem

$
0
0

In asp classic I want to connectino azure sql database bu it gives this error;

Microsoft OLE DB Provider for ODBC Drivers hata '80004005'

[Microsoft][ODBC SQL Server Driver][SQL Server]Reference to database and/or server name in 'master.dbo.syscharsets' is not supported in this version of SQL Server.

code:

ydk2_server="server1.database.windows.net"
ydk2_uid="myusername"
ydk2_pwd="mypass"
ydk2_database="mydatabase"
sqlconnection_ydk2="driver={SQL Server};server="& ydk2_server &";uid="& ydk2_uid &";pwd="& ydk2_pwd &"; database="& ydk2_database &" "

sending/receiving mail with email addresses including characters like æ, ø or å

$
0
0

i tried that with cdo.message and some other ASP email components, but no luck so far.

is this possible at all?

(be aware that such special characters are allowed in email addresses) 


Error 'Server.CreateObject_Access_Error 80 '

$
0
0

Hello expert over there..

I have this log; (on my web hosting company)

2015-12-10 04:02:33 W3SVC2505 WINDOWS9 103.8.25.64 GET /admin/Download/Upload_Fail.asp kategori_id=2|3|ASP_0178_:_80070005|Server.CreateObject_Access_Error 80 - 103.8.25.64 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.5.21022;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729)

I've already gave ALL Permission to my uploading folder.

Can someone help me please?

TQ

ASP include file into variable

$
0
0

I have a template.asp file the contains code like this:

<html>
    ....<body><div id="wrapper"><div id="container">
    ----sideMenu---<div id="body"><%=pageContent%></div></div></body></html>

I have a file index.asp with the code:

<%
    Dim pageContent = ""
%><!--#include virtual="template.aspx"-->

I want to insert in pageContent a lot of html code and asp code withoutconnecting strings like this:

pageContent ="<div class..."&_" bla bla bla "& aspVariable &_"more divs and html and asp variables"...

so i tried to do it like this:

<html>
    ....<body><div id="wrapper"><div id="container">
    ----sideMenu---<div id="body"><%
If pageName = "page1" Then
%><!--#include virtual="page1.asp"--><%
Else If pageName = "page2" Then
%><!--#include virtual="page2.asp"--><%
Else
%><!--#include virtual="page3.asp"--><%
End If
        %></div></div></body></html>

but in asp there is no option to include pages with if statement its not working good...

its load all the files on page loading.

actually i want a dyanmic pages i dont want write the template html codes each pages

i want, that only the pageContent will change.

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.

Getting image data from local folder in windows

$
0
0

I have two hosted website on a server, Main site and secondry website which is used to load images.
Right now i am using url of secondry site in main site to get images, and showing them in grid.


I don't want to move further with this procedure of two websites anymore and want to load images from local drive so that i can have only One hosted website in iis...
any another solution will be good also?

Thanks in advance 
Nik

Migrating from IIS6 to IIS8.5 asp/cgi request encoding problem

$
0
0

Hi,

I have an application which was working on II6 classic asp which is referring to a CGI application written in Delphi 2010 with utf-8 support without any problem. I migrate to windows 2012 r2 II8. Most of things works normal after I completed the settings except the encoding of variables. I checked CGI and asp there are exactly working correct, however something is happening between delivery from ASP (request with xml http request) to CGI application.

This application works without any bug more then year in windows 2003 server with IIS6. I couldnt figure out what is wrong.

Any ideas? 

Viewing all 488 articles
Browse latest View live


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