Server.execute Command Inside Global.asa

Question. Is it possible to run Server.execute command inside global.asa
file. if it is where. Inside Application onstart?

View Replies


ADVERTISEMENT

How To Execute A Command On Server Side

I would like to know how could I execute a
command/script on server side which is located in the same
directory as the asp ? And how could I response.write()
the result?

View Replies View Related

Server.Execute Command Disables Body OnLoad

i have this web page which on loading shows + hides a selection of div's using the command : Code:

<body onLoad="showHide()">

i wanted to include a standard banner by adding the command : Code:

<%
Session("titleString") = "some title"
Server.Execute "index.asp"
%>

but this seems to disable the onLoad command, presumably because there is already a full header and body in the "index.asp" file

the reason why i didn't use the "include file" command here was because the latter won't allow the title string to be fed through

the question is : is there an alternative way to execute either the "Server.Execute" or the "body onLoad" command that will allow the function showHide() to work ?

the same function is also called from a "select" form element Code:

<select onChange="showHide()">

and that works fine, so the problem definitely lies with the onLoad command, not the showHide() function.

View Replies View Related

Global.asa And Server.Execute

I'm working on a web app, and I want my global.asa file to execute another file (it's a configuration file which then writes a stylesheet file), but I can only seem to get the global.asa to run once in a while. For a stretch, whenever I edited the global.asa, it would run on the next server request. I had read somewhere that the IIS process had to be restarted each time you wanted the global.asa file to execute, so when it stopped running every time I changed it I wasn't too surprised. But now, even when I restart the IIS process, the darn thing won't run! I've tried putting my server.execute statement in a regular .asp file and it creates the stylesheet file every time I run it (so I know the file I'm trying to execute runs properly). I just don't get what's going on with the unpredictability of the stinkin global.asa.

View Replies View Related

Execute A DOS Command

with dos command of " ipconfig/all>c:ip.txt " I can retrieve some info and save it in a text file of ip.txt, now I am wondering if there is a way to do the same thing within asp?

View Replies View Related

Execute A Remote Command

I have a shell script that needs to be executed on a unix machine on our network and text output needs to be retrieved How can I make a asp.net page do it ?

is there a way to batch execute the command that I execute in the command prompt and just retrieve the outoput.

Here is what I am manually executing currently from the dos command prompt

Step 1. telnet <unixmachine>

Step 2. login <login name>

Step3. I Provide the password

Step4. once logged in to the machine I Provide the <shell script command>

The results of the script get displayed on my command window. I copy and paste the result

can the above be done through asp/asp.net page

View Replies View Related

How To Execute Command Line In ASP

Does anyone know how to execute command line in ASP?

View Replies View Related

Execute Command Lines

I need to be able to execute DOS command lines via ASP. This would include running an .exe along with passing commands/switches.The platform is Win2k/IIS.Is this easily accomplished with ASP?

View Replies View Related

Execute Command From A String

I am trying to make our website a bit more dynamic. one of the ways i want to do this is to be able to put in ASP code into our MySQL database (the code would be different for every company) and have it execute when the page is brought up.

We have the potential of having thousands of companies using our website, so having it hard coded will be hard to maintain, and having it save to a file will become cumbersome if there are too many users. Anyone have any ideas on how to execute a piece of ASP code straight from a string varaible?

View Replies View Related

Checking For No. Of Rows Affected Using Command.Execute

DBMS: MS Access 2000
ADO Version: 2.8
IIS Version: 5.1

I'm trying to use the ADO's Command object, Execute method to execute a SQL Update Statement. I would like to ask how do I check for the no of rows affected by the SQL Update command.

View Replies View Related

Global.asa Not Execute

my global.asa file doesn't seem to be executing in IIS and i don't know how to make them run. Any ideas how to execute the global.asa file in IIS 5.1 ,

View Replies View Related

Can Php Files Execute Inside Asp Files?

Can a php file be executed inside an asp file? I need to execute a php file in another asp file but i'm not so sure it's possible.
My server can run both asp and php and they run without any problems... I just need to find a way to include the execution results of the php file in the asp one.
Is it possible to use SSI and include the executed php file and then the executed asp file in a main ssi file?

View Replies View Related

Server.execute/response.redirect/server.transfer

Real quick, please refresh my memory which one of the following preserves the information that was posted from a form?

server.execute

server.transfer

response.redirect

I need to have a page execute if an error occurs while processing a page that a form was submitted to and have the data preserved.

View Replies View Related

Error Server.Transfer / Server.Execute ()

Any one has Idea, How to use Server.Transfer and Server.Execute, When I tried to use these methods I got an eror:

Server object error 'ASP 0230 : 80004005'
Server.Transfer Error
/SISWeb/portal_logon.asp, line 40
The call to Server.Transfer failed while loading the page.

anybody is there who can respond to this problem. Do I need to change any setting at IIS?

View Replies View Related

Server Side Include Inside Of Script

Can I separate the code inside of script into SSI files so that I have reusable code? Is it even possible?

<%
' code
<!--#include file="email_footer.inc" -->
' more code
%>

email_footer.inc has this content in it:

strHTML = strHTML & "Questions about this application?<P>Please contact the helpdesk:

View Replies View Related

Server.Transfer Vs. Server.Execute

i'm using a model, view, control architecture for a group of .asp pages.

i can't decide whether to use Server.Transfer or Server.Execute to pass posted data from my control to my model. are there security implications for using Server.Execute?

just wanting some advice on pros/cons to each of these since this is the first time i'm attempting to use these methods.

View Replies View Related

Server.execute Permissions On Server

I have a website and use server.execute quite extensively. The website was put into production and at first all worked great.

but some users were getting to my site but an error message would pop up stating page was not loaded properly. TO many users it looks like the website simply does not exsist.

What happens is that when the web page (www.cheapbatterypacks.com/main.asp) gets executed it will fail for "some" people at the server.execute point.

Here is a good example of the problem. In my shop I have 3 computers on the same network. connected to a dsl connection etc. All have internet access all run IE6 etc. 2 will pull up www.cheapbatterypacks.com just fine. but 1 will not. maybe some of you will see the same error.

if you type www.cheapbatterypacks.com/loosecells.asp it will pull up fine but that file is supposed to be loaded by the server.execute function and not run on its own.

so now I am pulling my hair out to try and get these other folks on board and working.

How would something be so selective like this. COuld it be me webserver settings? And even if it was how come it appears to only affect some people.

This is a public website so there are no logins/passwords etc meaning they come in a anonymous and have only read/execute permissions.

I am still running windows 2000 server with all Sp's patches etc. IIS 5.0.

View Replies View Related

Server.Mappath Command

In my root folder, there is a folder "Images". I need to check whether there is a file named 23.jpg in it or not. I am using the following code but it's returning false. The file is in the folder.

<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
x="23.jpg"
If fs.FileExists(Server.Mappath("/Images/"&x)) = true Then
Response.Write("File Exists.")
Else
Response.Write("File Does Not Exists")
End If

set fs=nothing
%>

View Replies View Related

Server.execute ?

Can server.execute provide a return value? How? ie.

dim test
test = server.execute("page2.asp")

What code in page2.asp will produce something in test?

View Replies View Related

Server.Execute() &

In Page1.asp I am calling Server.Execute("Page2.asp"). Before calling
Server.Execute(), I set an application variable to a value that it is
important for me to know that it doesn't get accessed by another ASP page
before I call Application.unlock in Page2.asp, that is why I use
Application.lock.
According to the documentation, Application.lock gets automatically unlocked
when the ASP page terminate, I want to confirm that calling Server.Execute()
doesn't automatically unlock the application, i.e that Page2.asp will start
executing when the application is still locked.

View Replies View Related

Anyway To Use MapPath With Server.Execute?

I need to use Server.Execute for dynamic includes. My files are located in different folders and what works for one doesn't work for another. I need to include the full path to the file because relative paths do not work. Can someone tell me how to do something like this:

Server.Execute(Server.MapPath("./") & "includessubnavigationdefault.asp")

I keep getting this error:

Invalid URL form or fully-qualified absolute URL was used. Use relative URLs.

The problem is I NEED to use relative URLs some how.

View Replies View Related

Server.Execute In Scriptlet

I have an ASP calling a scriptlet. There is a method "Exec" which is
using Server.Execute to run any ASP file/command. There rest of the methods
are working fine.Somehow, wscAsp.Exec("myLocalProc"), didn't work. Please
help.

My ASP:

<%
Set wscASP = CreateObject("ASPScriptlet")
wscASP.sName = "sName (R/W)= OK"
%>
<P>The current date is <%=wscASP.GetDate()%></P>

<P>The value of the Var1 is <%= wscASP.GetVar()%></P>
<%
Call wscAsp.Exec("myLocalProc")

Sub myLocalProc
response.write "Scriptlet is executing myLocalProc!"
End Sub

%>
The Scriptlet, wscAsp.Exec method, is purely just call Server.Execute("any
string passed in")

View Replies View Related

Include Server.execute

I've got an include file inside each page throughout my site. Inside this
include file I'm running server.execute to include other pages based on a
condition (userID).
The problem has two parts-
1) The CPU usage jumps up to 100%
2) The path for these include files is different according to the file that
is calling server.execute, resulting in an invalid path
I'm not sure the best way to go about this. Basically all I'm trying to do
is run server.execute from within an include file, regardless of where the
calling page is inside my site structure.
This will be running off of an IIS 5 box and is being tested with IIS 6.

View Replies View Related

Server.Execute With Vars...

I'm trying to get a page included into another page, and so far I've been using Server.execute("home.asp") without any problems ['home.asp' is just an example], but now I' m trying to get this to work:

server.execute("home.asp?foo=bar")

but to no avail. Code:

View Replies View Related

MapPath With Server.Execute

I need to use Server.Execute for dynamic includes. My files are located in different folders and what works for one doesn't work for another. I need to include the full path to the file because relative paths do not work. Can someone tell me how to do something like this:

Server.Execute(Server.MapPath("./") & "includessubnavigationdefault.asp")

I keep getting this error:

Invalid URL form or fully-qualified absolute URL was used. Use relative URLs.The problem is I NEED to use relative URLs some how.

View Replies View Related

Server.execute Limitations

I'm trying to implement the server.execute instead of using SS includes in a new project I'm doing. the server.execute command will not transfer variables or classes/subroutines defined on the other pages. Is this correct?

That's what I'm seeing but I want to be sure that I'm doing it right. I had to go back to SS includes to include my functions and classes I have stored in other files.

View Replies View Related

Server.execute And Constants

Is it possible to server.execute a file that has a list of constants and then use those constants? I've tried, but the asp tells me the the variable is undeclared when I try to <%=const_name%>

View Replies View Related

Server.execute VS. Include

which one is better? why? if I use server.execute, I can run dynamic queries

like server.execute("A.asp?id="&request("id"))

But I cant do it if I use include method? what do you think about this ?

View Replies View Related

Server.execute And Frames

We have a webshop that has frames (content and "menu in two parts")
I'm experimenting with the general layout and have changed the
location of the link to the cart to be in the (upper) menu frame. The
cart is hidden unless you "call" it.

When something is added to the cart there is a redirect back to where
the customer put something in the cart.

But I also want the link to the cart to change so that it reflects the
fact that something has been put there.

I've tried Server.Execute("logg2.asp") but nothing happens, but a
refresh changes the link. Code:

View Replies View Related

Server.execute Problems

I use the following line of code :

server.Execute("download.asp?file=" & request.QueryString("file"))

which results in :

"Invalid URL form or fully-qualified absolute URL was used. Use relative
URLs."

If I replace the server.execute method with response.redirect everything is
fine but I for a variety of reasons I dont want to do that.

Any ideas what is wrong ?

View Replies View Related

Server.Execute Problem With Localhost

I am having a problem using server.execute on my local machine.

I have set up a virtual directory in IIS call "UltraCamp"

When I use [VBS]server.execute("/scripts/calcenrollment.asp") [/VBS]

it looks for the file in the localhost root instead of the ultracamp root. I can change to[VBS]server.execute("/ultracamp/scripts/calcenrollment.asp") [/VBS] but that is a pain because I have to change it everytime I post to the live site.

What do I need to change to make this work correctly?

View Replies View Related

Server.execute To Retrieve Constants

Can I use server.execute to get constant values ?

View Replies View Related

Stop Server.execute In The Middle

is it possible to somehow "jump out of" an ASP page that is executed from
another page via the Server.Execute method?

on the page being executed i have several instances where i need to stop the
execution and immediately shoot back to the calling page without running
through the rest of the code on the executed page. Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved