Testing ASP Cookies Using IIS On Win XP Pro
I'm sure I have missed something but I can't see what...
I create two cookies on one ASP page as follows:
response.cookies("Errors") = "Must not be blank" response.cookies("User")("Mem_Username") = response.write(M_Mem_Username) response.cookies("User")("Contact_N") = response.write(M_Contact_N)
This page then calls the second ASP page which then reads the cookies:
E_Contact_N = request.cookies("Errors") C_Contact_N = request.cookies("User")("Contact_N") C_Mem_Username = request.cookies("User")("Mem_Username")
When I then use response.write (for example, response.write(C_Mem_Username)) to view the contents of the variables, there is nothing there.
As I say, I am still developing the site and so am using IIS on a Win XP Pro machine (local host)
What I am doing wrong?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Testing For Cookies
I need to test if cookies are enabled in the browser. I disabled cookies in my browser and rebooted my browser, yet the below code still writes a cookie and reads it correctly. <% Response.Cookies("smcookietest") = ("8") Response.Cookies("smcookietest").Expires = Date + 2 %> <% If Request.Cookies("smcookietest") <> "8" Then Response.Redirect("error.asp?error=19") End If %> <%=Request.Cookies("smcookietest")%>
Testing Of Concurrent Users/ Load Testing
How do test my web application for concurrent users (how much concurent user connect at a time and how traffice will be affected and what will the response time?) and how it is done, how long it will takes, does it interfere with current site, etc.? Reagarding the number of users the site will accomodate is it based on where it's hosted Application written in ASP/Sql Server. Code:
Creating Cookies In Global.asa Session_OnStart But Cannot Read Cookies On Subsequent Pages.
In my Session_OnStart in Global.asa, I am setting some cookies. One of them, I set as follows: dim UserID UserID = Request.ServerVariables("LOGON_USER") Response.Cookies("User")("ID") = UCASE(UserID) When I immediately log the cookie value retrieved from Request.Cookies("User")("ID") into the Windows Event Log, I get the correct value. However, when I try to retrieve the cookie on the home page of my application using the same code, Request.Cookies("User")("ID"), it either cannot find the cookie or cannot read the value. I am retrieving the cookie before all HTML headers are written. It is my first statement on the page after Option Explicit. I have even compared the session IDs. The SessionID created in the Session_OnStart is the same value as the SessionID on the home page. I have read that the Session_OnStart only has access to the Application, Session and Request objects. It does not explicitly say that it does not have access to the Response object. Also, I was even able to use Response.Write's in Global.asa to print out the values although it looked like it had also stopped the session after I did so. Cookies are definitely enabled on my machine. I have even tried setting the session cookie's expiration to be persistent for a few days to see if it was perhaps expiring before I was able to read it but this did not work either. Is there something preventing cookies to be created in Global.asa in the Session_OnStart sub? Is the Response object not available??? Please let me know if anyone else has had this problem or solution.
Creating Cookies File And Stored In Cookies Folder
I m creating a cookies in my application and it work properly but i can't see the cookies where it will sotred i checked the cookies folder but i didn't find that I want to create a cookies file as the other web site create and store where other cookies will stored in Cookies folder or Temprory Internet files folder eg:1. arvind@google.co[1].txt this stored in cookies folder 2. arvind@msn[2].txt ....
App Testing.
test my app? it's still in development but it's very much usable. i'm looking for few good object oriented souls that can look at this. i'm still adding few functions so don't be surprised if it goes down for a VERY short time (minutes really).
Cookie Testing
I need to revisit cookie testing. On the home page and every product page I write a cookie. I do this because some users enter by direct links to product pages. <% Response.Cookies("cookietest") = ("49") Response.Cookies("cookietest").Expires = Date + 2 %> On the cart page I test for the cookie... <% If Request.Cookies("cookietest") <"49" Then Response.Redirect("err.asp?e=1") End If %> I have a user that insists he has cookies enabled, yet he keeps getting redirected to my error page which suggests he does not have cookies enabled. What could cause this? Is the above too simple for all circumstances? Is there more extensive code that I could setup on a hidden page where I can send users to get read out on how they actually have their browsers setup? i.e. Run a test on their browser and the results are emailed to me.
Testing For A Cookie
I know very little about ASP and ASPX pagfes but i inherited a web site done by a guy who knew just a little more than me and I've worked around things with my knowledge of HTML and Javascript, as well as added on to the web site using Cold Fusion. But I am at a point that I need to be able to do more. I have a ASPX page with a Log In button that I don't want see if a certain cookie exists. Is there a way to test for that cookie on the page and display or not display something based on that test?
Security Testing
my system is at testing phase. how do i test my system to check its security especially at the login page? i am running it at localhost. i have tried sql injection but nothing happened. i just saw the invalid login username or password error only.
Error Testing ASP And IIS
I have created a page that will allow all web based errors generated to be logged, like IIS errors 404, 403,401, 400. I am now testing to see if the correct files are being displayed when the errors occur. I am able to replicate the 404 err as well as the 403 error, bu I cannot test the 401 or 400 errors. Does anyone know how to do this? I tried using err.raise, but it doesnt seem to work, unless i m doing something wrong.
Testing Scalability
How can I test the scalability of my website, e.g how can I check if my website still performs correctly when there are 300 people visiting?
Testing ASPs
I need to test ASP pages at home before uploading them (no net connectiona t home, only here at uni and I need the site owrking before I transfer it). The ASP pages are written, PWS is installed (except for some file that had an error - but that didn't install last time and everything worked fine then). Where do I put the ASP pages and DB and how do I set up a connection between them? The pages run in IE at the moment but no data is pulled onto them from the DB.
Testing Tool
May I have the list of good ASP testing tools available on the market?
Testing ASP Locally
When I type in the url...URL I get an error saying I'm unauthorized to view the page?
Unit Testing
I've been given a task to develop an automated unit testing framework for a project I'm workin on... I've spotted ASPUnit on sourcesafe... but it doesn't seem to handle situations when we have global variables, session stuff etc... I was thinking of doing something to a screenscrape and just do a file comparison... actually, there ARE ways to do this aren't there? I've heard/read about that before.. some HTTP objects or something that would allow me to call an asp page, and grab the output as a string.. rather than have the output go to a screen... anyone able to point me i the direction of this kinda stuff?
Code Testing
I am developing a Testing Checklist for the Programmers in my company. As i am not a programmer, Can you guys help me. I am looking for some common Code testing steps which a programmer should do when he is testing his web application These testing checklist could include common mistakes programmers do or any special coding error which they might receive when they are testing their web application.
Testing Web Server
I had a mild hack of the default windows web page in inetpub because I was running IIS whilst my DSL connection was on. Ever since,I have disconnected the DSL before running IIS. Could anyone give me advice on running IIS safely as a local testing server (for asp pages) whilst online? I have to admit that I run an admin account (win2000) so I know this is one thing I should change
Testing Without Connection
I'm running IIS under windows XP, and developing an ASP web page locally. My problem is that I can't get it to work without connecting to the internet. Am I doing something wrong, or does ASP require a redundant connection in order to run? I have a page that simply displays the current time. If I'm connected and press the refresh button the displayed time is updated. If I disconnect, then the time displayed remains unchanged even after hitting the refresh button.
Testing Tool
May I have the list of good ASP testing tools available on the market?
Testing A MS SQl Connection
If I have 2 MS SQL Databases, one as Production and the other as Backup. The Production updates the data on the Backup. WHat I want to do is to test the the Production database is still online and if not I want to change the connection string to point to the Backup. I want to this via ASP.
Testing Connection
I have a page where I am connecting to more than one server. I want to set it up so that if one of those connection fails it does not kill the whole page. The page would still load but just display a little error message about the one failure - the other connection and code would still be executed... is this possible?
Testing And Analysis Tools?
I'm nearing the end of my site development (currently ASP and Access moving to SQL) and am looking for site testing tools... In particular looking for load testing and concurrent connection analysis to see where site might be heavy or pages leave connections open! Can anyone recommend good testing software that can give information on the above...
About Testing On Local Computer
I have been teaching myself ASP for several months now and seem to have a pretty good handle on it. All along, I have been uploading changed files directly to the website and refreshing to test. However, today I will be at a location with no internet access and would still like to be able to work and test my programming. How do I go about testing ASP pages on my local computer without an internet connection? For now I am not worried about testing any databases or anything, just layout and design. If it is useful, I am running Windows XP Home edition and I use Dreamweaver to write the ASP.
MSXML: Testing For GetNamedItem Before Use
I have an xml document fragment that I'm trying to process: <field id="summary" type="textarea" label="Summary" /> <field id="content" type="wysiwyg" label="Content" /> <field id="status" type="hidden" /> (this is part of a bigger document loaded into XML DOM) I'm looping through the <field> elements and extracting their attributes into variables: Code:
Query String Testing
I am working on a site to provide displaying and navigation of images from several groups and have the following code that changes to displayed gif based on the query string passed in: Call: <a href="ShowImage.asp?group=01&image=01&max=28">Group 01, Image 04, Max 28</a> Code:
Testing Server Error
I'm using Dreamweaver for a number of ASP sites and long ago set up testing servers for each, which worked fine. Now they don't - I just get a 404 message. I've double-checked the testing server address and HTTP address and nothing's changed, so I'm wondering if the address of localhost can have been altered? I've forgotten how to check it, though. Can anyone point me in the right direction?I should say that the only thing that has changed since I last did some testing is that I've downloaded IE7 - is that a clue?
Testing Equality Of Arrays
I would like to test two recordsets to determine if they have the same number of records, and that those records are identical for the equivalent rows. Is there an elegant way to do this? My only solution so far involves some rather inefficient looping. Even a solution using a clever query in a stored procedure would be nice.
Using IIS For LocalHost Testing Server
I trying to run a sample asp web application, using IIS as a localhost testing server. I have created a virual directory called global with path C:/global/asp/. I also have a another website sitting in the default root folder in intpub/wwwroot. then i use localhost my old website home page starts up not my virtual directory site global if I type localhost/global/asp/filename.asp, I get cant find. What am I doing wrong, what do I have to do to get virtual directory site to run and not the old site in wwwroot folder. I start and stop IIS from the right click from the default web site.
Testing Date/time Format
I want date inputs to be in the form "d-m-yyy h:m:s". On submitting a form. I want any date input not i this format to be alerted for the correct format.
Testing To See If Image Exists Before Displaying It
I dont know if this is the right place to ask this but I have a database which contains shop details, each of which can have several images associated with it. In the database I am just storing the image paths, the actual images are held on a remote server. I am able to grab the pathnames from the database and then use the following code to loop through the recordset displaying the associated image(s). While NOT rs.EOF Response.Write("<img src=""servernameImages" & rs.Fields(0) & """ width=""150"" height=""150"">") rs.MoveNext My question is, in the event of one of the images not being found, it just displays a red cross, is there any way of testing to see if the image exists before I try and display it?
Testing Custom Membership Provider
How can I test a membership provider using a test project within VS 2005? Basically I am stuck trying to read the custom app.config file I added to the project with a <system.websection. I think the testing environment is more structured than creating a web application to test the provider.
Testing Email From IIS On Local Machine
I have written an asp page that is supposed to send email (using CDONTS). I think my code is correct, but I'm trying to test it from my local machine and although the ASP code runs I am not sure the email portion of the code works. I have not yet received any messages from the code. Perhaps there is a delay of some sort - or perhaps it is because I am on a network behind a firewall. Whatever the case, could someone offer some suggestions in testing the emailing portion of my code? Code:
Testing For Null In Filter Property
Is it possible to test a string column for null in the filter property of a RecordSet object? rs.filter = "display = '' "? This doesn't return any rows.
Access Forbidden On Testing Page
I got this message ' HTTP 403.9 - Access Forbidden: Too many users are connected Internet Information Services' on my testing page , I'm doing an ASP e-commerce website. I am not sure whats wrong. i am running on Windows Xp using IIS version 5.1 . how can rectify this problem? would really appreciate cos I cant seem to solve it.
Testing ASP Pages With Windows Front Page
I have FrontPage 2003 on my XP laptop. I need to test some web pages with *.asp codes which worked perfectly well with my old Win95 computer in the past. Of course I had to install Personal Web Server to it in order to do the job. The help files of FP, gives the clue that it has the facilities to behave like a server and test interactive web pages. But I haven't seen the use of ASP pages with it. I do not wish to install a server on my XP just to test ASP pages.
Regular Expression :: Testing For Invalid Links
Have a regular expression that I can't quite get my head around. I need to remove invalidate links like the one below... <a href="java_script_: alert('blah');" onClick="alert('blah')">Bad Link</a>' A validate link would look like this... <a href="http://www.hotmail.com">Good Link</a> I believe I have the regex for removing validate links: str.replace(/<a href="[^">]+">/gi,'') // result on validate link: Good Link</a>
Cookies
I've added a cookie and I am able to read it when using the same window but if I load up a new window and try to access it, it can't find the cookie. Any one know why?
Cookies?
I am creating a user tracking app that tracks a user one of two ways... 1)First Method is cookies 2)Second Method MS SQL DB I first check if the users browser accepts cookies if not I go to the db. If the user accepts cookies then I check for a specific crumb if it does not have the value I am looking for I kill it and rewrite it. This is working fine (im in the middle of testing it). The problem is I decieded to test the script with NN7 and not turn cookies off but block cookies from my site and all fell apart. The condition that I have set (detect if cookies are enabled) does not stop the script from trying to set a Session Variable because the browser accepts cookies and to keep a long story short it goes into an infinite loop because the script is looking for a Session value and Its not being stopped becaues the script thinks its alright to write cookies! Is there a way to detect if a user has your sites cookies blocked? This is important because Server.CreateObject("MSWC.BrowserType") will return .Cookies = True and you will not know that your script is not executing properly because a user has your sites cookies blocked but excepts them elsewhere...
Should We Use Cookies??
After a login we have a menu from where we have access to different operations such as add ,delete,update.. but if a user enters the appropriate URL he has access to these operations with out proper authorization.how do we solve this. should we use cookies,if so how exactly?
Log-in Cookies
I've built a website which requires a user to log-in to access the site. I have already built a page that enters their details into a db (register.asp), and another page where the user enters their email address (the log-in ID) to actually log-in (login.asp). How can I use a cookie to automatically log a user in?? More specifically, what are the commands to set a cookie (upon successful registration) and access it (upon re-logging in)?
Using Cookies
Hey i've spent the last few hours trying to work this problem out about cookies. When a user logs in to the site the login.asp page checks the database to see the personal page that the user re directs to e.g if bob brown logged in he would be redirected to bob.brown.asp. This is stored in a field in the database table along with the username and password. i would like to put a cookie onto the users computer that remembers the url they were redirected to so when they press the main page button it would look for the cookie and see what url they are meant to be redirected to and take them there My current login system is this ....
Getting Cookies
I'm trying to load up a page through my asp page and get the cookie from that page so that I can use it later on when it needs to have it to access other parts of the site. Basically the asp page is going to act like a browser and store the cookie from the other site, then send that cookie back when the asp page goes back to the other site again. The problem is, I can only seem to access my own cookie. I didn't run into this problem when I was doing a similar thing inside my .cs scripts that were run by the server, as I suppose they were not coming from the actual domain that my page is running on (and thus, wasn't getting everything trampled by local cookies). Is this possible, or should I just give up on it now?
Using Cookies - Best Way To Do This?
im building a site for a few doctors surgeries. the user is able to see what appointments are available and then book that date/time. i have a table (in my db) of dates/times and a checkbox to say whether the time has been booked or not (and display only times that havnt been booked). i was going to have the user add the time to a "cart" and then check the "booked" checkbox in my db when theyve paid for that appointment. but if i have lots of people looking at the site at the same time, then they may be able to see times that are just about to be booked. i think a better way is to have the date/time stuffed into a cookie which expires after 5 minutes. so when a user adds a time to their "cart", it will say something like: "this time will expire in 5 minutes until you book it or re-add it to your cart". does that make sense? how can i do this with server-cide cookies (im using jscript)? can anyone think of a better way to do this?
Cookies
trying to delete a cookie, without success it seems. The following code to delete and check a cookie produces "yes" where I expected "no" Anyone tell me how to delete a cookie if this code is wrong. response.cookies("savedforum").expires = date - 1 if request.cookies("savedforum").haskeys then response.write "yes" else response.write "no"
Cookies
I have the code below which I know it is wrong where the cookies come in. I am trying to write the values collected from a database into cookies. However I am having difficulty trying to figure out how to write rows of cookies with different values. This may be a little difficult to explain - see the following code:
Cookies
I need to set a cookie on a user after they have logged in. I want to use just the user's login name , since that is a unique field. If rsPersonIDCheck.EOF Then Session("blnValidUser") = False Else Session("login") = rsPersonIDCheck("login") but: set Cookies("User") = Session("login") seems not to be creating the cookie
What Is Cookies
I know little abt asp.I have done aproject on asp but I don't know much on cookies.if u know then plz give me idea with some codes.
Asp Cookies
Not strictly a full asp question but Im sure someone here will have the answer.I've read in several web sites that you can read and write to the same cookie with asp and javascript.Does anyone have any sample coding showing how to do this with the javascript along with the asp code or were these websites I saw it mentioned on bogus?
Cookies
In my web application i'm are able to store large data in the browser cookie keeping in mind the limit of 300 cookies per browser, 20 keys per cookie per domain and 4KB max size of each cookie. i'm are unable to retreive this large amount of data immediately after storing through document.cookie in IE browser (The same works fine in Netscape). Is there any limit on the size of the data that can be retreived using document.cookie? Could you please suggest a solution to this problem i'm are facing.
|