PDA

View Full Version : enable .asp files on server 2003


zzzeljc
06-24-2005, 06:16 AM
hi.

the problem: it doesn't run the .asp files on a server 2003 from a remote computer.
it says unknown file format, or access denied(on the other one)

how can i enable to run .asp files and where can i check for accesss atributes?

Goldilocks
06-24-2005, 06:38 AM
I'm not sure I entirely understand your question. Have you installed IIS on the server and are the ASP files sitting under the Inetpub folder somewhere? How are you trying to run them from the remote computer, are you viewing them over the web?

zzzeljc
06-24-2005, 08:40 AM
I'm not sure I entirely understand your question. Have you installed IIS on the server and are the ASP files sitting under the Inetpub folder somewhere? How are you trying to run them from the remote computer, are you viewing them over the web?


no, without IIS, only on server 2003. On IIS runs perfectly. but I want to make it run on 2003. .asp files are in some directory on the 2003 server. when I call them within 2003 it opens, but on click on the button sometimes it sends data and does it's action, but more offten says : 'the download of the specified resource has failed'. when I click it again sometimes it does its action sometimes it says again the same 'the download of the specified resource has failed'. but It wil do his action after some more clicking. I want it to work only on one click. i am working with HTTPPUT method within script.

running them from a remote computer: what I ment was, calling the asp file from one computer to another(where I put the asp files). (that 'anotherone' is a server too; I don't know which one) but it works.

thanks

afterburn
06-24-2005, 11:23 AM
This is because the directory in IIS MMC is not marked as scripting nor is it enable to allow it.

IIS 6 has a new node in the MMC, one called Web Extensions. You must find ASP extension and select and allow.

Then on the websites node you must select your website->Properties->Home Directory, on the bottom there should be a button that is not grayed out that says create. The beside it, select scripts only in the drop down box.

By default nothing but HTML pages can run on IIS 6.

zzzeljc
06-27-2005, 02:17 AM
i'm not talking about IIS. only 2003 server.

[by the way, it is already enabled on IIS to run .asp, but still doesn't run the .asp extension (don't know why; it runs them as plain text in IE)]

it sometimes runs the script at first time click on the button, sometimes says 'the download of the specified resource has failed', but eventually after some more cilcking it runs it. want it to run at the first click.

but there is no download, because the file necessary to do it's action is written inside the .asp file.

i don't understand: "the eternal programming question is, camel case, hugarian notation or cross breed?"
more info on that please.(i'm not english or similar :) )

any suggestions? any at all?

thanks

afterburn
06-27-2005, 02:31 PM
OK, IIS is REQUIRED to run ASP pages.

That is because it is serving the page as a plain text file. THe reason is that it is not enabled. Please follow the intructions i gave you.

Yes that error message is returned in IE if friendly error messages are turned on.

Yes that is because IE doesn't know what to do as the file type headers where not what it expected, nor the content correct.

Lastly that is my signature, its meaning is for more seasoned developers, but you will get there.

zzzeljc
06-29-2005, 04:09 AM
I have enabled it for scripting before all this. it is also 'allowed' for asp pages but still shows as plain text.
(i turned the message error on, cause i wanted to know whats the error)
still returns the download error.
any more ideas?
thans for explainig the signature part.

afterburn
06-29-2005, 10:10 AM
Ok, next thing would be to enable the scripting in the site level.

right click on the website in MMC IIS Manager->Properties->Home Directory
on the bottom create application, then select "Scripts only" from dropdown and apply.

zzzeljc
06-30-2005, 05:48 AM
already done it at the beginning
still nothing

Horus_Kol
06-30-2005, 06:21 AM
Under the "home directory" tab, you have a "configuration" button - clicking on it reveals all file associations and their ISAPI libraries... .ASP should be listed.

The only other thing is security - are you using NTFS? If so, what are the security settings (under directory security in IIS properties) for that site?

zzzeljc
06-30-2005, 06:43 AM
i have administrator permissions full control

on the http put matter(sending xml file to a server, to put it off or on) :
i have narrowed it down to xmlhhtp.send command.
because of this, sends me an error message 'the download of the specified resource has failed'
can it be too slow for that method?(if possible)

zzzeljc
06-30-2005, 06:53 AM
it's allowed for .asp in home directory-configuration, and all verbs are on

Horus_Kol
06-30-2005, 08:18 AM
i have administrator permissions full control

on the http put matter(sending xml file to a server, to put it off or on) :
i have narrowed it down to xmlhhtp.send command.
because of this, sends me an error message 'the download of the specified resource has failed'
can it be too slow for that method?(if possible)
sorry... is this the same problem... because this is not an configuration issue, but a script issue... :confused:

zzzeljc
06-30-2005, 08:32 AM
sorry. at the beginning i had two, first one was the script issue(the second post), but then it went on to configuration.

bigger one is the script issue, or the xmlhttp.send command.

if any idea...

afterburn
06-30-2005, 08:35 AM
I still contend that the server was not setup correctly with either of the 2 configs that I have told you about. That is the only reason that an ASP file would not be processed before being sent to the client.

zzzeljc
06-30-2005, 08:47 AM
i understand that, but both of them are done as told.

there is a similar code on the net. if you would like it, i'll send it to you

afterburn
06-30-2005, 09:35 AM
post in attachment to a post.

zzzeljc
07-01-2005, 01:56 AM
here you go. it's not from the web, it's mine

zzzeljc
07-01-2005, 09:10 AM
have a nice weekend

afterburn
07-01-2005, 09:38 AM
way="c:\....."
on1 = way&"on1.xml"
off1 = way&"off1.xml"

is wrong....

no browser should allow you to grab files from a local drive.
[edit] I am wrong not a client script

however you should not beable to use that because the file path is wrong. and you might not have permissions to do so. even if you posted it to the URL's in question, I am not sure if you can post a file like that with the object nor am i sure that the path would be correct to many "..."

zzzeljc
07-04-2005, 02:18 AM
well it can be posted;
i did it with the file on1 and off1 inside the .asp file, without calling it. still the same, but now i have enable it to work: for the third time i formated everything, and set the server again with IIS and all the permissions and allowing and... don't get it; sorry for the trouble
now im doing it with the server object;
the only problem is this:'object doesnt support this property or method: server.createObject'
i have set it to:
set Server = CreateObject("Msxml2.ServerXMLHTTP.4.0")
set xmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
and similar variants;
any suggestions on that?
sorry for the trouble again, thanks

afterburn
07-04-2005, 08:27 AM
either will work thje first is out of process and the second is inprocess calling.

I am not sure that you are running that correctly...... its another line I beleive that is causing the error.

zzzeljc
07-04-2005, 09:35 AM
i have used thees:
set xmlhttp = createobject("msxml2.xmlhttp.4.0")
set xmlhttp = createobject("msxml2.xmlhttp")
set xmlhttp = Server.createobject("msxml2.xmlhttp.4.0")
set xmlhttp = createobject("msxml2.Serverxmlhttp.4.0")
...and similar

still nothing
when using createobject it runs ok, but i must make it with
server.createobject because it has to do it's action from any computer that im
calling the .asp file(or am i mistaking, and it can be run like so even with
createobject?).

afterburn
07-04-2005, 11:42 AM
your issue seems that it is executing on the server not the client. so it shouldn't matter what machine you are calling the page from.

besides "xmlhttp" does not exist in MSXML 4.0

zzzeljc
07-05-2005, 03:17 AM
don't get it:doesn't exist. i've noticed it on the net to be used everywhere. how can i use it then if not this way? another version maybe, 3 or 2?

it seems that the 'server.createobject' is needed, because just the 'createobject' doesn't do nothing if called from another comp. it goes through but it doesnt complete the action,(it needs server.createobject because the computer i'm calling the .asp file from has no msxml instaled on. is it possible it needs the msxml to be instaled on the computer i'm calling from?)

afterburn
07-05-2005, 10:05 AM
HUh?

the only reason server.CreateObject exists is for in/out of process calling.
CreateObject thats a machine name also as a parameter. That is if you know how to setup COM+ application. but i do not think that is your issue.

zzzeljc
07-06-2005, 03:51 AM
i found one flaw in my script. if you remember at the beginning 'The download of the specified resource has failed'
finally found it. at the end of xmlhttp.open command ti was written 'file' instead of 'false' and that is why it couldn't download the specified resource. logical. eh.
thanks for all the info and sorry for troubles. i will try with 'createobject' and install the msxml on those comps that im calling the .asp file from.
thanks again
ps:is it possible to contact you if any other problems appear, by mail or so?

zzzeljc
07-06-2005, 03:53 AM
for 'afterburn'.:
'ps:is it possible to contact you if any other problems appear, by mail or so?'