ASP

81K

Solutions

31K

Contributors

Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.

Share tech news, updates, or what's on your mind.

Sign up to Post

asp.net Placing an image on an image control Does it have to be a URL

The following is working fine
Image1.ImageUrl = "~/data/" & ImageFileName  & ".gif"

The following is NOT working
Image1.ImageUrl = "C:\MySite\data\" & ImageFileName  & ".gif"

Is there a way to make asp image control takes a normal path e.g. (d:\temp\mypicture.gif)
0
Keep up with what's happening at Experts Exchange!
LVL 11
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

how do I get moments.js to output to asp classic variable  e.g <%=mytimeORsomthing %>
0
dim rs
dim user1
dim pass1
dim role
dim strsql

set rs=server.CreateObject("ADODB.Recordset")

if session("user")="" then
      Response.Redirect "loginpage.asp"
end if




'Response.Write session("user")
strsql="select granted_role from user_role_privs"
rs.Open strsql,Session("conn")
role=rs.Fields(0)
rs.Close()
set rs=nothing
'-----------for war alert...-----------

if session("user")="ADMINISTRATOR" or role="CSG_ROLE"  then
            
            
            set rs=server.CreateObject("ADODB.Recordset")
            strsql="select WARRANTY_DT,asset_no from tabasset where WARRANTY_DT<=(sysdate+90) and WARRANTY_DT>=(sysdate-30)"
            rs.Open strsql,session("conn"),3 ( Shows Error in this line)
            'Response.Write rs.Fields(0)
            if not rs.EOF then%>
0
Hi there.

I work on this web database with SQL Server back-end and classic asp/VB/Java script front-end. It's all on a dedicated Windows server I control almost a 100%. So far I used a login procedure where - at login - the page call a table in the database with user credentials and return a "Go" or "No" to proceed to other pages for logged in users only. A cookie is created at "Go" and will expire after an hour of inactivity. When expired, the user is returned to the login page.

Now... I have to implement a procedure:
Every 3 month a users password must be changed and live up to certain criteria like upper/lower case, number, special character etc.

Option 1: I can try to program something in VB?? (I need help or some good suggestions)

Option 2: I can skip the present concept and create all users on the server. To access the server a SMS pass code is required on top of the login credentials. But how can I implement the Windows Server authentication to the asp/VB coding?

I would be very happy for some support here. It's a little new territory for me.

And I'm sure it could work better with VB.NET, but that gotta wait some months. First I must make it work in classic asp/VB.

I look forward to some wise words. :-)

Best regards

Ulrich
0
I have code that takes a nvarchar(max) value to run a SP.
If I run the SP directly on SSMS it works fine, the SP does the job. But using ASP Classic code to pass the parameter which is a very long XML string to the SP is giving errors saying the data is getting truncated. Here is the code we currently have:

set sp_usp_xmlparse = Server.CreateObject("ADODB.Command")
    sp_usp_xmlparse.ActiveConnection = MM_bluedot_STRING
    sp_usp_xmlparse.CommandText = "dbo.usp_XMLParse"
    sp_usp_xmlparse.CommandType = 4
    sp_usp_xmlparse.CommandTimeout = 0
    sp_usp_xmlparse.Prepared = true
    sp_usp_xmlparse.Parameters.Append sp_usp_xmlparse.CreateParameter("@RETURN_VALUE", 3, 4)
    sp_usp_xmlparse.Parameters.Append sp_usp_xmlparse.CreateParameter("@blob", 200, 1, -1, qnrBlobXML)
    sp_usp_xmlparse.Parameters.Append sp_usp_xmlparse.CreateParameter("@UserID", 3, 1, -1, UpdateStatus__MMColParam)
    sp_usp_xmlparse.Parameters.Append sp_usp_xmlparse.CreateParameter("@FirmID", 3, 1, -1, UpdateStatus__MMColParam2)
    sp_usp_xmlparse.Execute()

Open in new window


Any ideas what could be wrong?
0
Hi Experts,

I have a asp project. I never worked on it before. I can open it in VS2013. But trying to find how to debug the global.asa file. Please suggest.

Thanks in advance.
0
Dear Experts

I have in mind an "intricate" calculation involving: Asp Classic + javascript and Access database and html tables. My background in javascript is "-0.000"

It is my code and I want give to the user many ways for calculation the variables of any 2 urls selected.


<%
set conn=server.CreateObject("adodb.connection")
conn.open "Provider=Microsoft.jet.oledb.4.0;data source="& server.MapPath("db\bd1.mdb")
set rs_main=server.CreateObject("adodb.recordset")
%>

<%
rs_main.open "select * from add0",conn,1,2
%>

<h2>Statistics</h2>

<table style="width:100%">
 <tr>
    <th style="width:40%">Url</th>
	<th style="width:10%">X1</th>
	<th style="width:10%">X2</th>
	<th style="width:10%">X3</th>
	<th style="width:10%">X4</th>
	
  </tr>
</table>  
<%
do while not rs_main.eof
%>


  
<table style="width:100%">
  <tr>
  <!--
  CLICKLING ON THE CHECKBOX THE USER WILL SELECT TWO URLS AND THEIR DATA FOR CALCULATION BELOW
  -->
     <input name="choices" type="checkbox" value="something1" /><td style="width:40%"><%response.write(rs_main("url"))%></td>
    <td style="width:10%"><%response.write(rs_main("X1"))%> </td>
    <td style="width:10%"><%response.write(rs_main("X2"))%></td>
	<td style="width:10%"><%response.write(rs_main("X3"))%></td>  
	<td style="width:10%"><%response.write(rs_main("X4"))%></td>
	</tr>
</table>

<%
rs_main.movenext
loop
%>

<br><br>

<!--
CALCULATION PLACE HERE
-->
<table style="width:100%" height=10 >
<input type=text style="width:50%" 

Open in new window

0
I have a web site that uses an Excel 2007 spreadsheet to store information for displaying new pages when buttons are clicked.  It has been function for more than a year with the following connection information

mystring="Driver={Microsoft Excel Driver (*.xls)};"
mystring=mystring & "DriverId=790;Dbq="& Server.MapPath("2012_SimplifiedItemsForSale.xls")

This now fails with the following error message:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Excel Driver] Reserved error (-5016); there is no message for this error

Searching the web, I found that many people have seen this error, and the recommendation is to use a different OLEDB driver.

I downloaded and installed AccessDatabaseEngine from Microsoft site and changed the code to the following:

mystring="Provider=[Microsoft.ACE.OLEDB.16.0]"
mystring=mystring & Server.MapPath("2012_SimplifiedItemsForSale.xls")

The new error code is:

ADODB.Connection error '800a0e7a'
Provider cannot be found. It may not be properly installed

Q1.  Can anyone tell me if I have properly written the code to use the new OLEDB?
Q2.  Is there another step that must be taken to be able to use the driver software?

Office 2007 is installed in c:\Program Files (x86)

Help. Please.
0
i wanna knowing to run asp pages without IIS or PWS
0
Hi, is it possible to sort xml data in a classic asp page using AJAX and querystrings??

xml code

<?xml version="1.0" standalone="yes"?>
<DocumentElement>
<Data>
<EnsembleID>23331</EnsembleID>
<BookCode>NWP-MV</BookCode>
<Issue>Aeon Financial 2019</Issue>
<LongBLPTicker>QZ3838484 Corp</LongBLPTicker>
<ShortBLPTicker>8570 JT Equity</ShortBLPTicker>
<LongPos></LongPos>
<StubPos>600000000</StubPos>
<SIV>0.927</SIV>
<Parity>91.95</Parity>
<Premium>0.173</Premium>
<IV>99.23</IV>
<LongPx>107.81</LongPx>
<PxChg>0.05</PxChg>
<TheoChg>0.03753</TheoChg>
<StubPrice>8.59</StubPrice>
<ShPxChgPer>0.001277</ShPxChgPer>
<SLH>0.009</SLH>
<CurDelta>0.32</CurDelta>
<ImpDelta>0.444</ImpDelta>
<TheoDelta>0.417</TheoDelta>
<FutHdg1>-14.13</FutHdg1>
<ImpVolCB>0.242</ImpVolCB>
<ImpVolStub>0.242</ImpVolStub>
<V90D>0.198</V90D>
<DPnL>0.4</DPnL>
<WPnL>3</WPnL>
<MPnL>1.2</MPnL>
<YPnL>-4.9</YPnL>
<NetPnL>16.8</NetPnL>
<DayTE>-0.1647</DayTE>
</Data>

Open in new window




Page code...


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Summary</title>
<style>
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
	font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-align: left;
    padding: 8px;
}
tr:nth-child(odd){
	font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size:10px;
	background-color: #eef6ff
	}
tr:nth-child(even){
	font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size:10px;
	

Open in new window

0
Free Tool: ZipGrep
LVL 11
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Hi, experts, I found a code in the google that seems able to upload the file to the server. However, when I run it, I've got an error saying that; "Operation not Allowed /clsUpload.asp, line 208" Is the code below really can upload files to the server? if yes, which part of the code should I change? Thank you!

<HTML>
<HEAD>
<!--#include file="clsUpload.asp"-->
</HEAD>
<BODY>
<FORM ACTION = "clsUploadTEST.asp" ENCTYPE="multipart/form-data" METHOD="POST">
Demo Input: <INPUT NAME = "Demo"></INPUT><P>
File Name: <INPUT TYPE=FILE NAME="txtFile"><P>
<INPUT TYPE = "SUBMIT" NAME="cmdSubmit" VALUE="SUBMIT">
</FORM><P>
<%

set o = new clsUpload
if o.Exists("cmdSubmit") then

'get client file name without path
sFileSplit = split(o.FileNameOf("txtFile"), "\")
sFile = sFileSplit(Ubound(sFileSplit))

o.FileInputName = "txtFile"
o.FileFullPath = Server.MapPath("/MyWebDocument") & "\" & sFile
o.save

 if o.Error = "" then
	response.write "Success. File saved to  " & o.FileFullPath & ". Demo Input = " & o.ValueOf("Demo")
 else
	response.write "Failed due to the following error: " & o.Error
 end if

end if
set o = nothing
%>
</BODY>
</HTML>

Open in new window

0
I'm having difficulties with setting up a new site to site vpn to two other sites. I currently have a site to site working with from the 128.0 to the 2.0 networks.  I have a new site which I'm trying to configure a site to site vpn to the other two sites through the vpn wizard and they aren't connecting.  I went through the ASDM site to site vpn wizard and it worked for the first one but it doesn't for the new site to the others.  I have included the configs below.

192.168.1.0 NETWORK
:
ASA Version 9.1(6)
!
hostname ciscoasa
enable password OlOxQ1nyrZ49h6MK encrypted
names
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 192.168.1.1 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address 104.201.x.x 255.255.255.252
!
ftp mode passive
object network obj_any
 subnet 0.0.0.0 0.0.0.0
object network EMAIL
 host 192.168.1.253
 description Woodchuck
object network Webserver
 host 192.168.1.254
 description ETIMAIN
object network cl
 subnet 192.168.2.0 255.255.255.0
object network NETWORK_OBJ_192.168.1.0_24
 subnet 192.168.1.0 255.255.255.0
object network SC
 subnet 172.172.128.0 255.255.255.0
object-group protocol TCPUDP
 protocol-object udp
 protocol-object tcp
access-list…
0
Hi experts, I wish to stop or kill the running exe on  my computer using vbscript. I have a program running on my pc named, SkyWin.exe. This exe is found in c:\xFolder\SkyWin.exe and  I'm using Windows 10. Any help please!
0
Hi all, I have set out some data, however I am not sure if it is possible to list it in a specific way

For each product (prod_ID) there is events that happen, no matter what date the event is (like lines 20-24 & 32 & 33)
product is the Formula 1 event

For each departure (dep_ID) there would be different things happening (like lines 25 & 31)
departure is the specific package (where as there could be different-longer packages with different itinerary)

Data:
TABLE: prod_itin
itin_ID	brand_ID	cons_ID	date_added		itin_live	prod_ID	dep_ID	itin_day	itin_IATA_start	itin_start	itin_finish	itin_IATA_finish	itin_item
20		GPT		1	9/08/2017 1:00:00 PM	Yes		3		1		AEGPA		1:00:00 PM	2:30:00 PM				Free Practice 1
21		GPT		1	9/08/2017 1:00:00 PM	Yes		3		1		AEGPA		5:00:00 PM	6:30:00 PM				Free Practice 2
22		GPT		1	9/08/2017 1:00:00 PM	Yes		3		2		AEGPA		2:00:00 PM	3:00:00 PM				Free Practice 3
23		GPT		1	9/08/2017 1:00:00 PM	Yes		3		2		AEGPA		5:00:00 PM	6:00:00 PM				Qualifying
24		GPT		1	9/08/2017 1:00:00 PM	Yes		3		3		AEGPA		5:00:00 PM						Race
25		GPT		1	9/08/2017 1:00:00 PM	Yes			6	1		AUH		2:00:00 PM						Check-in
31		GPT		1	9/08/2017 1:00:00 PM	Yes			6	5						10:00:00 AM	AUH			Check-out
32		GPT		1	9/08/2017 1:00:00 PM	Yes			6	1		AEGPA		8:00:00 PM						Concert: Calvin Harris
33		GPT		1	9/08/2017 1:00:00 PM	Yes		3		4		AEGPA		8:00:00 PM						Concert: P!NK

TABLE: prod_deps
dep_ID	brand_ID	cons_ID	date_added		dep_live	prod_ID	dep_date	dep_type	dep_conf	dep_sold	dep_prod	

Open in new window

0
Hi experts, please help me  understand what's the reason why some computers cannot  get the message from the server while trying to  accessed it? The codes below is trying to test the server response how the server deal with the response. My laptop is able to get message while some of my destops, pc cannot. I'm using chrome to all computers but some of my computers cannot get the message from the server. The alert box message will appear blank but some computers able to obtain the message.

Js

 function iSaveToServer(x)
{
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp = new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (this.readyState==4 && this.status==200)
	    {
	        	var str = this.responseText; 
	        	alert (str);
	    }
	  }                                             
		xmlhttp.open("GET","SendMsg.asp?a="+ x, true);
		xmlhttp.send();
}

Open in new window


Asp


<%
dim msg
msg = request.querystring("a")

response.write("test-1")
response.end()

%> 

Open in new window

0
I am having issue trying to get my Web Application published and running correctly on our IIS server.

When I test from within Visual Studio 2015 with the same ODBC driver setups, everything works fine.  It is only once I try to publish the Web Application and access it off the IIS webserver in a browser that I am getting an issues.

I am using Visual Studio 2015 v14.0.25431.01 Update 3

The IIS server is a 64-bit Windows 2016 server

The ODBC driver is a Progress OpenEdge 11.6 driver - 32 Bit

The ODBC connection is setup using the 32-b it ODBC Manager found in c:\windows\sysWOW64\odbcad32

I came across many forums that say to make sure that the ODBC driver is setup correctly, and using the correct ODBC manager, which it is.

I also came across some posts that reference compiling the Web Application and specifying in the Configuration manager to use x86 instead of Any CPU.  x86 is not an option when I go into the configuration manager.

I am at a loss as to how to resolve this error so that I can access the new Web Applications from the IIS server.


The error I get is...

Server Error in '/' Application.

ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception …
0
Hi experts, I wish to put some colspan in a table created from server side as a response of a certain request. My code below is trying to implement such thing but it does not work. Any help please!

         response.write("<tr>")
            response.write("<th style="" width: 170px; color: black; padding: 1px; text-align: center; colspan: 2; "">" & "Date executed" & "</th>")
            
            
            response.write("<th style=""width: 130px; padding: 3px; color: black; "">" & "Notes" & "</th>")

         response.write("</tr>")

Open in new window

0
Hello All,

I am trying to re-direct from Classic asp application to a .aspx page for a File upload. I am receiving following error. Any input of what this error is can be really helpful.


Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.

Source Error:


An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
0
How do I reference an xml object inside a function so that after the function runs the xml object is transformed
per the function code as follows


<%

      set xmldoca = Server.CreateObject(objxml)  

      set sbixmla = xmldoca.createElement("sbixml")
      xmldoca.appendchild sbixmla

      xmlarrA = Array("NodeName1~NodeName2~Attribute1:Value1","NodeName2~NodeName3")
      call objectify(xmlarrA)


Function objectifygen(xarray, targnode)
      set objectifygen = targnode

      for each node in xarray
            set n = objectifygen.createElement(split(node,"~")(1))
            objectifygen.selectsinglenode("//" & split(node, "~")(0)).appendChild n
            if ubound(split(node, "~")) > 1 then
                  for a = 2 to ubound(split(node, "~"))  
                        if split(split(node, "~")(a), ":")(0) = "Text" then
                              n.Text = split(split(node, "~")(a), ":")(1)
                        else
                              call n.setAttribute(split(split(node, "~")(a), ":")(0),split(split(node, "~")(a), ":")(1))
                        end if
                  next
            end if      
      next

End Function

Function objectify(xarray)  
      for each node in xarray  
            set n = xmldoca.createElement(split(node,"~")(1))  
            xmldoca.selectsinglenode("//" & split(node, "~")(0)).appendChild n
            if ubound(split(node, "~")) > 1 then
                  for a = 2 to ubound(split(node, "~"))  
                        if split(split(node, "~")(a), ":")(0) = "Text" then  
                              n.Text = split(split(node, "~")(a), ":")(1)
                        else
                              call n.setAttribute(split(split(node, "~")(a), ":")(0),split(split(node, "~")(a), ":")(1))
                        end if
                  next
      …
0
ASP Script using request from data sent via get can reat using request("data") but if data is sen via post no data is received.

Originated with the get method

http://www.atletasmexico.com/demo/checkout.asp?reference_sale=FE68A77B-AEEA-4976-893C-3706ACCBE7BF&reference_pol=840833038&value=10.

Variables are retrieved and the job get done.

Originated with the post method

http://www.atletasmexico.com/demo/checkout.asp?reference_sale=FE68A77B-AEEA-4976-893C-3706ACCBE7BF&reference_pol=840833038&value=10.

Variables are not retrieved and the script does not work


Any ideas
0

ASP

81K

Solutions

31K

Contributors

Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.