PDA

View Full Version : ASP problem on home server



the-disturbed
10-14-2006, 06:19 AM
recently started my own webserver at home, workinm great except ASP doesn't do anything i want it to do, i'm running IIS 5 on WinXP Media 2005, my understanding is that ASP comes with IIS and should just work, ive done a test, that just displays a word using ASP, works great, problems start when i try to do any file writing. to put in all in context im mainly trying to do a very simple ASP guestbook that stores entries in an XML file (couldnt be bothered to use any DBs) the errors i'm getting indicate that i don't have access, ive gone so far as to give full access to the guestbook folder, and that won't even work, what am i missing...

webpage (http://the-disturbed.co.nr) turn yer speakers down, there bg music
-------------------------

codeexploiter
10-16-2006, 09:35 AM
If you are sure that the background ASP file that starts its execution once you press the submit button exist in the correct loaction. I mean you must check the path in which your ASP file resides.

Make sure that it resides in the correct location, you are getting a 404 file not found error that mostly comes whenever you try to access file which is not present at the moment.

djr33
10-16-2006, 09:52 AM
I get the 404 too.

The frame sees to point to http://the-disturbed.bounceme.net/guestbook/guestbook.asp
And that gives a 404.
However, the actual page that is loaded, and also a 404, is
http://the-disturbed.bounceme.net/guestbook/createxml.asp

I'm not sure what the explanation is here.

However, your domain and the domain those pages are coming from are different.
Perhaps it's something to do with the bounceme redirect?

the-disturbed
10-16-2006, 05:03 PM
hmm, good point the createxml.asp is just a script the creates an xml file with no data in it (was trying something from a tutorial), as far as the 404's.....i'm an idiot, it was linking to an asp file that doesn't exist, i was running the ASP file from an html file that wasn't linked from the page......http://the-disturbed.bounceme.net/guestbook/test.html
the info it's asking for is what the script came with ill change it once i get this working, and as far as the redirect is concerned, i've tried both the co.nr, and bounceme.net addresses, sasme results

the-disturbed
10-19-2006, 12:53 AM
i managed to get the error back.....when I submit the data i get this error:

"Errors occurred while saving your form submission.-2147024891"

just a side note the script originally just gave "Errors occurred while saving your form submission." but i changed the script to show the error number, i searched it with microsoft and it was indicating i didn;t have access to the directory or sumthin like that, any thoughts

im at work at the moment ill get the asp code up here when i get home

codeexploiter
10-19-2006, 04:40 AM
ill get the asp code up here when i get home


Good point, i think without your code it is very difficult to troubleshoot the problem

the-disturbed
10-19-2006, 06:00 AM
contents of addentry.asp:

<%

Function ConvertFormtoXML(strXMLFilePath, strFileName)

Dim objDom
Dim objRoot
Dim objField
Dim objFieldValue
Dim objattID
Dim objattTabOrder
Dim objPI
Dim x

Set objDom = server.CreateObject("Microsoft.XMLDOM")
objDom.preserveWhiteSpace = True
Set objRoot = objDom.createElement("contact")
objDom.appendChild objRoot

For x = 1 To Request.Form.Count

If instr(1,Request.Form.Key(x),"btn") = 0 Then

Set objField = objDom.createElement("field")
Set objattID = objDom.createAttribute("id")
objattID.Text = Request.Form.Key(x)
objField.setAttributeNode objattID
Set objattTabOrder = objDom.createAttribute("taborder")
objattTabOrder.Text = x
objField.setAttributeNode objattTabOrder
Set objFieldValue = objDom.createElement("field_value")
objFieldValue.Text = Request.Form(x)
objRoot.appendChild objField
objField.appendChild objFieldValue

End If

Next

Set objPI = objDom.createProcessingInstruction("xml", "version='1.0'")
objDom.insertBefore objPI, objDom.childNodes(0)
objDom.save strXMLFilePath & "\" & strFileName

Set objDom = Nothing
Set objRoot = Nothing
Set objField = Nothing
Set objFieldValue = Nothing
Set objattID = Nothings
Set objattTabOrder = Nothing
Set objPI = Nothing
End Function

On Error Resume Next

ConvertFormtoXML "c:\Inetpub\wwwroot\guestbook","Contact.xml"

If err.number <> 0 then
Response.write("Errors occurred while saving your form submission." & err.number)
Else
Response.write("Your form submission has been saved.")
End If
%>

sry fer not gettin this up earlyer lol, might help eh