Hi, i am trying to make a comments page for a website but when i upload it to a free hosting account and try to test the page i keep getting
Server.CreateObject Failed
is this problem because the servers don't support the command or because i have coded it wrong
here is my code: -
-
<%
-
if Request.QueryString.Count = 0 then
-
errStr = "<font color='blue'>Please enter a comment or feedback.</font><br>"
-
else
-
if Request.QueryString("ErrorType") = "1" then
-
smallerrstr = "Error: Your message has been included."
-
errStr = "<font size='+1' color='red'>" & smallerrstr & "</font><br>"
-
else
-
errStr = "<font color='blue'>Please enter a comment or feedback.</font><br>"
-
end if
-
end if
-
-
if (lcase(Request.Form("submitted")) = "true" )Then
-
if (IsNull(Session("feedbacked"))) then
-
Session("feedbacked") = False
-
end if
-
if (Session("feedbacked")=True) then
-
errStr = "<font size='+1' color='red'>You are allowed only one message per session.</font><br>"
-
else
-
Session("feedbacked")=True
-
smessage = Request.Form("feedbody")
-
smessage = Trim(smessage)
-
smessage = Replace(smessage,"<","")
-
smessage = Replace(smessage,">","")
-
sname = Request.Form("feedname")
-
sname = Trim(sname)
-
sname = Replace(sname,"<","")
-
sname = Replace(sname,">","")
-
smail = Request.Form("feedmail")
-
smail = Trim(smail)
-
smail = Replace(smail,"<","")
-
smail = Replace(smail,">","")
-
sdate = Now()
-
smessage = smessage & "<br><b><font color=blue>- " & sname & " - " & smail & " (" & sdate & ")</font></b>"
-
-
sfile = "_feedback.txt"
-
whichFN=server.mappath(sfile)
-
if (whichfN <> "") and (Not ISNull(whichFN)) then
-
Set fstemp = server.CreateObject("Scripting.FileSystemObject")
-
if (fstemp.FileExists(whichFN) = True) then
-
Set filetemp = fstemp.OpenTextFile(whichfN, 8, false, 0)
-
filetemp.writeLine("<FEEDBACK>")
-
filetemp.WriteLine(smessage)
-
filetemp.writeLine("</FEEDBACK>")
-
filetemp.Close
-
set filetemp=Nothing
-
end if
-
set fstemp=Nothing
-
end if
-
end if
-
end if
-
-
-
sfeedback = "<font name=Verdana size=2>"
-
sfile = "_feedback.txt"
-
whichFN=server.mappath(sfile)
-
if (whichfN <> "") and (Not ISNull(whichFN)) then
-
Set fstemp1 = server.CreateObject("Scripting.FileSystemObject")
-
if (fstemp1.FileExists(whichFN) = True) then
-
Set filetemp = fstemp1.OpenTextFile(whichfN, 1, false, 0)
-
Do while (filetemp.AtEndofStream <> True)
-
strLine = filetemp.ReadLine
-
strLine = Replace(strLine,"<FEEDBACK>","")
-
strLine = Replace(strLine,"</FEEDBACK>","<hr>")
-
sfeedback = sfeedback & strLine
-
Loop
-
filetemp.Close
-
Set filetemp = Nothing
-
else
-
Set filetemp = fstemp1.CreateTextFile(whichfN, false)
-
filetemp.close
-
end if
-
Set fstemp1 = Nothing
-
end if
-
sfeedback = sfeedback & "</font>"
-
-
-
%>
-
3 2605
Hello Whelme,
It sounds like you don’t have permissions to create your “fstemp(s)” objects. This might be because you’re using a free hosting company. See if they will allow you to use the file system object. You would need the local internet guest account (IUSR) to have read and write access to the file "_feedback.txt” for your script to work.
Hope that points you to your answer~
Hello Whelme,
It sounds like you don’t have permissions to create your “fstemp(s)” objects. This might be because you’re using a free hosting company. See if they will allow you to use the file system object. You would need the local internet guest account (IUSR) to have read and write access to the file "_feedback.txt” for your script to work.
Hope that points you to your answer~
thank you for the reply and i will check with the company to see if they will allow me, i will be paying for a place to host my site soon i am just using a free site to test my pages.
also how do i allow the local internet guest account (IUSR) to have read and write access?
thank you for the reply and i will check with the company to see if they will allow me, i will be paying for a place to host my site soon i am just using a free site to test my pages.
also how do i allow the local internet guest account (IUSR) to have read and write access?
Some hosting companies give you control of “user” access rights to folders under your site and some don’t. If the company that you decide to go with does not give you this control more then likely they would do it for you if you request them to do it. But, if they do provide you whit the controls more then likely they would have some type of interface that you would use form their website to grant access to “users”.
Hope that I was of some help~
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Davinder |
last post by:
I am trying to invoke the following line of code within
my ASP:
Set oApp = Server.CreateObject("Word.Application")
This results in the following error:
ASP 0178 Server.CreateObject Access...
|
by: Anurag Saxena |
last post by:
If someone can solve this problem,I am using ASP3.0 and IIS on windows
2000 server
The complete Error is
''''''''''''''''''''''''''''''''''
Server object error 'ASP 0177 : 800401f3'
...
|
by: Martin Franklin |
last post by:
I am trying to get a total record count on a Acess 97 mdb database. However
I get the following error when I try to load the page:
Provider error '80040154' Class not registered...
|
by: Simple |
last post by:
I have a VB Script that I call from my ASP page. One of the first
things it does is:
'Launch Access
Server.CreateObject("Access.Application")
'Open DB
'Preview Report
This works fine on IIS...
|
by: Bill Nguyen |
last post by:
Win 2003
IIS 6.0
My users got this error message trying to run a simple ASP application
(sending email using CDO). I have no problem ( with Admin permission):
Server object error 'ASP...
|
by: Marcus |
last post by:
I have a function that simply returns TRUE if it can connect to a
particular Sql Server 2005 express, or FALSE if it cannot. I am getting
some strange error codes returned when the computer that...
|
by: javelin |
last post by:
I'm studying "Visual Basic Developer's Guid to ASP & IIS", and I am
following instructions an pp 72-75. I am creating a WebClass, and enter
code as instructed, and it all is entered correctly.
...
|
by: ashish |
last post by:
Dim oCon
Err.Clear
Set oCon = Server.CreateObject("ADODB.Connection")
If Err.Number = 0 Then
'//
'// Open an ADODB.Connection to the folder URL
'//
oCon.Provider = "ExOLEDB.DataSource"
|
by: Anil Gupte |
last post by:
I am using the following to try to connect to the database, but it does not
seem to be working.
Dim sConnString
sConnString = "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |