473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Server.CreateObject Failed

2
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:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <%
  3.     if Request.QueryString.Count = 0 then
  4.         errStr = "<font color='blue'>Please enter a comment or feedback.</font><br>"
  5.     else
  6.         if Request.QueryString("ErrorType") = "1" then
  7.             smallerrstr = "Error: Your message has been included."
  8.             errStr = "<font size='+1' color='red'>" & smallerrstr & "</font><br>"
  9.         else
  10.             errStr = "<font color='blue'>Please enter a comment or feedback.</font><br>"
  11.            end if
  12.     end if
  13.  
  14. if (lcase(Request.Form("submitted")) = "true" )Then
  15.     if (IsNull(Session("feedbacked"))) then
  16.         Session("feedbacked") = False
  17.     end if
  18.     if (Session("feedbacked")=True) then
  19.         errStr = "<font size='+1' color='red'>You are allowed only one message per session.</font><br>"
  20.     else
  21.         Session("feedbacked")=True
  22.         smessage = Request.Form("feedbody")
  23.         smessage = Trim(smessage)
  24.         smessage = Replace(smessage,"<","")
  25.         smessage = Replace(smessage,">","")
  26.         sname = Request.Form("feedname")
  27.         sname = Trim(sname)
  28.         sname = Replace(sname,"<","")
  29.         sname = Replace(sname,">","")
  30.         smail = Request.Form("feedmail")
  31.         smail = Trim(smail)
  32.         smail = Replace(smail,"<","")
  33.         smail = Replace(smail,">","")
  34.         sdate = Now()
  35.         smessage = smessage & "<br><b><font color=blue>- " & sname &  " - " & smail & " (" & sdate & ")</font></b>"
  36.  
  37.         sfile = "_feedback.txt"
  38.         whichFN=server.mappath(sfile)
  39.         if (whichfN <> "") and (Not ISNull(whichFN)) then
  40.             Set fstemp = server.CreateObject("Scripting.FileSystemObject")
  41.             if (fstemp.FileExists(whichFN) = True) then
  42.                 Set filetemp = fstemp.OpenTextFile(whichfN, 8, false, 0)
  43.                 filetemp.writeLine("<FEEDBACK>")
  44.                 filetemp.WriteLine(smessage)
  45.                 filetemp.writeLine("</FEEDBACK>")
  46.                 filetemp.Close
  47.                 set filetemp=Nothing
  48.             end if
  49.             set fstemp=Nothing
  50.         end if
  51.     end if
  52. end if
  53.  
  54.  
  55.     sfeedback = "<font name=Verdana size=2>"
  56.     sfile = "_feedback.txt"
  57.     whichFN=server.mappath(sfile)
  58.     if (whichfN <> "") and (Not ISNull(whichFN)) then
  59.         Set fstemp1 = server.CreateObject("Scripting.FileSystemObject")
  60.         if (fstemp1.FileExists(whichFN) = True) then
  61.             Set filetemp = fstemp1.OpenTextFile(whichfN, 1, false, 0)
  62.             Do while (filetemp.AtEndofStream <> True)
  63.                 strLine = filetemp.ReadLine
  64.                 strLine = Replace(strLine,"<FEEDBACK>","")
  65.                 strLine = Replace(strLine,"</FEEDBACK>","<hr>")
  66.                 sfeedback = sfeedback & strLine
  67.             Loop
  68.             filetemp.Close
  69.             Set filetemp = Nothing
  70.         else
  71.             Set filetemp = fstemp1.CreateTextFile(whichfN, false)
  72.             filetemp.close
  73.         end if
  74.         Set fstemp1 = Nothing
  75.     end if
  76.     sfeedback = sfeedback & "</font>"
  77.  
  78.  
  79. %>
  80.  
Jan 27 '08 #1
3 2605
CroCrew
564 Expert 512MB
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~
Jan 27 '08 #2
whelme
2
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?
Jan 27 '08 #3
CroCrew
564 Expert 512MB
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~
Jan 27 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
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...
0
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' ...
4
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...
1
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...
4
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...
14
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...
2
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. ...
1
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"
17
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...
0
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$) { } ...
0
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.