HTTP Return Code 200
My web page is not returning '200' to the user. why this might happen?
View RepliesMy web page is not returning '200' to the user. why this might happen?
View Repliesi've got this code...
Dim oOriginalPO, oXMLHTTP, strFileName, strURL
strURL = "url that is required"
strFileName = sXML
Set oOriginalPO = CreateObject("MSXML2.DOMDocument")
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
oOriginalPO.async = False
oOriginalPO.load strFileName 'name of file containing cXML data
oXMLHTTP.open "POST", strURL, False 'strURL is our URL you post to
oXMLHTTP.send oOriginalPO
So on the assumption that the sXML variable has correct information inside it to send out, can anybody see why perhaps this code isn't working properly?
Just to explain what's going on briefly... I've added an include to the top of all files on our site (this code is pasted below) to check IP address, and then some pages will display slightly different content for our Canadian or US customers.
This works fine in Firefox. However, in IE, when a Canadian visitor comes it doesn't display canadian content on the http version of any page. Once they go to a https page, it works just fine. After that, if they go back to an http page it still displays properly. Code:
I used a Response.Redirect "page.asp" as the last command in ASP code that
processes a submitted form from an Adobe PDF form (using HTML format). For
some reason, if there is any linked file (image, stylesheet, javascript) in
the target "page.asp" IE hangs until you press Escape. With Refresh, the
page loads completely.
I checked the web log and the entry for "page.asp" is 200 (OK) but all the
files I mentioned above all show 400. The description for this status code
is pretty generic and not much help (a syntax error in the request and the
server doesn't understand it
I can't control the syntax of the request so how can this be fixed? (and how
could the submit from the PDF form have anything to do with this since other
HTML forms directed to an ASP page with images etc. works fine.
I have a password-protected area on my site. I'm not using any server
authentication methods: Instead I prompt the user for a username and
password using an HTML form and check these against a database of
registered users.
I was thinking that this page should be returning a HTTP status code of
"401 Unauthorized" instead of its current "200 OK". My reasoning being
that this would let search engines know what's going on when they
request a protected page and get redirected to the "Access Denied"
page.
I experimented with adding response.status = "401 Unauthorized" to the
"denied" page, but now it displays a (Windows/IE) username & password
prompt instead. The HTTP sniffer shows that the www-authenticate field
is set to "Basic".
My question: How can I indicate to the search engines that the page it
is requesting requires authentication, yet have it not display the
login/password dialog box?
I tried to display an error detail on my webpage when I got an "HTTP 500 Internal Server Error" of my .asp page, but I was failed I did setup in IIS so it will display debug error on my asp page as well as setting up my browser internet option.
Can you help me how to set it up so I am able to see the error detail on my browser when I get "HTTP 500 Internal Server Error" ( Currently, I just got a blank page with "HTTP 500 Internal Server Error" in the web page title)I run IIS 5.0 and window professional xp browser.
i'm using windows XP, IIS 5.1, Visual .NET 2003 and SQL Server 2000.
When I open New Project - Visual C# Projects - ASP .NET Web Service -
Location : http://localhost/WebService1
After that i click OK, then it returns error
"The web server reported the following error when
attempting to create or open the web project
located at the following
URL:'http://localhost/WebService1. HTTP/1.1 302 Found"
After that i try this : Code:
I'm looking for sample code that will require a use to enter a code from a scued image format.
I'm sure you've seen them before where the image is barely readable by a human and the user has to enter the code correctly to submit the form.
I'm looking for ASP code and NOT ASP.NET code as I am supporting a legacy site.
I updated to aspx last three month,after developing serveral
applications,Idecided to downgraded to asp, following is my reasons:
1.in ASPX,the page format is hard to control,in ASP u can change every html
as u like ,but in aspx, a aspx control decide the page format,and its hard
to change the format.
2.ASPX is said to be faster that asp, but it is based on too-often
communication back to the server,for example,u click a radio a button,there
is new page request, but in reality,such a communication is
bandwidth-consuming and time-consuming. the user only need to submit the
form, and the exchange between IE and Server was minimazed.
the Speed of ASPX is not useful for most sites, for bigger sites, the speed
increase is singnificant,but for small sites with less traffic, the speed of
ASP is quite enough.
3.ASPX is based on Object Orinted Programming, but in most small sites,
Procedure orinted programming is used, we never build objects, and POP is
more efficient.ASPX is for three-tiered structure with a single layer of
business logic component, but in reality, most of us used two-tier
structure,that is Presetation layer and Datalayer, we can layout the page
and change the database in a single page, quite effienct too.
I want to return a 404 response from an ASP script (IIS 5).
Response.Status lets me set the response string, but if I don't include any
HTML text myself, the result is an empty page.
Is there a way to 'redirect' it to the server's default 404 response, as if
the URI really doesn't exist, but without really redirecting it so the URL
isn't replaced in the browser's address bar?
I am trying to replace a huge chunck of code that currently I incorporate
with an #Include directive. The program rarely has to flow through that
code, so I thought it would be better if I used Server.Execute.
I found I can pass data TO the called asp file by creating an HTML <input>
and erading it after I get there.
However, I also need to read back ONE variable that the called file must
set. I cannot figuer out how to do that. My backup positions are (1) I can
keep on using the #Include technique, and (2) I can use a database to bridge
the gap.Isn't there a way to carry data BACK TO the calling asp file FROM
THE CALLED asp file?
I am using a stored procedure to insert set of values to a table.I am generating or calculating the value of the primary key and inserting that record and i need that value to use in my application so is there any possibilty to return a value from storedprocedure to asp application.
what i am using to do is creating a #temp table and inserting that value in the sp and then opening that value in the asp application and droping that table, but i hope it is not a efficient method.
When a user logs in, I want to redirect them to the page that they were previously on. How do I do that? I already have the login page working. I just need to edit the redirect part.
View Replies View RelatedThe code bellow functions well. However if I want to obtain a return
value using the code bellow, how is it done? Code:
I'm assuming this can be done, but I can't seem to get it to work... I'd
like to easily return a single value from a sql statement, something like:
"intNewItems = conn.execute "SELECT COUNT (ItemID) WHERE ItemDate = Date()",
where conn is the connection object, etc. What am I getting wrong?
There is an access database and asp page .That asp page opens connection with that database,And opens a recordset online..
Is there any way that this opened recordset can be returned to Vb6 application which requested that Asp page to open connection and recordset and return some result.
I know there's a way to do this - well 99% sure anyway - and seem to remember reading an article or tutorial about how to do it but I'm not having any luck finding it.
What I need to do (using MySQL & ASP3) is to find all rows with "X" as a non-unique ID - there may be 30 or so total - and grab them to be archived in a CSV file before deleting the record from a DB.The reason I want to avoid hardcoding the field names is that they're going to change with moderate frequency.
How do I return the true/false value from the database to be either a checked or unchecked box using ASP?
View Replies View RelatedI just need to understand how the following line returns its values.Code:
Dim Var
For each FormElement in Request.Form
Var = Request.Form(FormElement)
Next
You see say I have 5 form elements on an html form.
Element One
Element Two
Element Three
Element Four
Element Five
I know that it is not checking the names of the elements and producing the results in that order, I know its not running through the Elements top to bottom on the form.
So in what order does FormElement return the values and based on what?
am trying to make a carriage return of the following:
Mailer.BodyText = "From: " & Request.Form("FRM") & VbCrLf & VbCrLf & "Message: " & Request.Form("MSG")
but it doesnt work.
when i received the email on my mailbox, the format is all in one line, like this:
From: John Message: Test message only
but i would like the "Message:" to appear in the second line.
in my SQL select query I have a LEFT JOIN between 2 tables that returns a
value if the data from table 1 is present in table 2, below
dbo.booking_form.COLL_CONTACT_TEL = dbo.tblFlag.TelNoMo OR
dbo.booking_form.MOBILE_NO = dbo.tblFlag.TelNoMo
Problem is that if the COLL_CONTACT_TEL and MOBILE_NO are both present in
table 2 it returns the record twice in the asp page repeat region.
I want to create a pop up asp page something like:
popUp('myasp.asp',.......)
and when the user closes the popup can I return a value. So sudo code would be like
myJavaScript
int temp = popUp('myasp.asp;,.............. /* Temp is the value returned by myasp.asp
set some textfield to have value temp.
end
Is this possible?
When should we use 'return' in a function to return the result versus 'FunctionName = result'
View Replies View RelatedCode:
function findcinemaid(nameofthecinema)
findcinemaid = "select cinemasid from cinemas" &_
" where brand = 'tgv' and cinemaplace2 like '"&nameofthecinema&"'"
set cinemaidfound = objconndb.execute (findcinemaid)
optainedcinemaid = cinemaidfound("cinemasid")
end function
tgvcinemanamexcel = "[1u_f$]"
cinemaname = "ONE UTAMA"
findcinemaid(cinemaname)
response.write optainedcinemaid
if I put response.write inside funciton it will display the cinemaid properly but if I put it outside , it wont display
My SQL statement won't return results where any field in a record is blank. What can I do to fix this?
strSQL = "SELECT * FROM newarchive WHERE Program_Title LIKE '%" & program & "%' AND Year_Aired LIKE '%" & yearA & "%' AND Sponsor LIKE '%" & sponsor & "%' AND Month_Aired LIKE '%" & monthA & "%' ORDER BY ID"
It gets its values from a form where some fields can be left blank. If the record itself does not have a blank field, the search will pick it up. But if the record contains a blank field, then it won't be selected unless it matches the Program_Title data.
How can i get the autonumber(primary key value) from the specific rows when i just insert it.Example
i just insert the member information.
sql="INSERT IMTO register(user,password,address) VALUES (shujuan,841218,singapore)"
so how can i get the primarykey for this row after i just create it.
I cannot use the OpenTextFile method, it's never return and I get no
error message! Setting Response.Buffer=False, has no effect. No matter
if I use it ForReading or ForWriting, it never return. In the following
code, the problem occurs at line 3.
aFileName = Server.MapPath("WEB_PROD.htm")
set fs = server.CreateObject("Scripting.FileSystemObject")
set fso = fs.OpenTextFile(aFileName, ForReading, False)
s = ts.ReadAll
ts.Close
set ts = nothing
Response.Write s
How do you return the highest value in a recordset of maybe 100 records?Is it necessary to run 2 recordsets?I was hoping it was as simple as Max([Price]), but no luck.
View Replies View RelatedDoes anyone know of any issues interacting with asp pages from within Flash when you use Control>TestMovie ? i.e. When using a send and load, Flash seems to want to open my asp file (and return the contents in Flash) rather than run it and return a name/value pair as I'm expecting.
View Replies View RelatedThis code doesn't give me a carriage return.Why?
strEmailMess= "Name: " & strName &vbCrLf
strEmailMess= strEmailMess & "Email Address: " & strEmailUser &vbCrLf
Also this code takes user to aspemail.asp page.I want it to go to a page of my chosing, like www.newpage.com
If MyMail.Send Then
Response.Write("Message Sent With ASPEMail.<br />")
Else
Response.Write("Message Not Sent With ASPEMail.<br />")
End If
I know similar questions have been asked, but none seemed to work.Code:
case "postreply"
destinationThreadID = request.querystring("ti")
DateOfPost = date
TimeOfPost = now()
postBy = request.form("uID")
msg = Replace(request.form("message"), vbCRLf, "<br />")
msg = Replace(msg,"'","''")
ValidPost = true
This is an example of the code I have when a reply to a topic is posted (before its inserted into the access DB).An enter till displays as a space though.
I've got an Access database with a memo field with large amounts of text in. In Access forms the text appears with line breaks where the enter key has been pressed. I'm using ASP to display this content on a simple webpage but want it to appear with the same line breaks as in the Access forms.
This is the code that I've got but it doesn't seem to work.
<% Article = rs("Article")
Article2 = Replace(Article, "<br>", chr(13))
%>
<td valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div id="ArticleStyle" align="justify">
<% =Article2 %>
</div></td>
I need to can a function in a COM object that returns a record set and then I need to display the record set. Any ideas of how to return the record set tp the asp page?
View Replies View Related