XMLHttpRequest works in preview but not in install

I work with Dreamweaver CS5 and preview the HTTP/Javascript Adobe Air application as I create the code.
The application is now in a state that I figured I'd compile the application, install it, and test it.  One problem, one call, which authenticates me to an API fails.
I was hoping that someone could point out the error in my ways.  I'm thinking it's a security thing but can't figure it out.
The code I use is as follows:
var url = "http://open-api.domain.com/authentication.getUserToken.domain";
var vars = "v=3&appKey="+appKey+"&email="+email+"&password="+password;  
var domainCOM = new XMLHttpRequest();
domainCOM.open("POST", url, true);
domainCOM.setRequestHeader ("Content-type", "application/x-www-form-urlencoded");
domainCOM.setRequestHeader ("Content-length", vars.length);
domainCOM.setRequestHeader ("Connection", "close");
domainCOM.onreadystatechange = function() {     
    if (domainCOM.readyState == done) {
        if (domainCOM.status == ok) {
            if (domainCOM.responseText) {
            //do some stuff
            else {
                window.alert('unknown error in authenticationGetUserToken.');
        else {               
            window.alert('Password / Userid combination is not valid.  Please correct and try again.');
domainCOM.send(vars);
return;
It works perfectly and hits the //do some stuff code every single time in preview mode.  It always hits the 'password /userid' combination error when I'm running the application.
Any help would be apreciated.

The header captured was (i edited out specific sitenames, data, etc):
POST http://URL HTTP/1.1
Referer: app:/applicationName.html
Accept: text/xml, application/xml, application/xhtml+xml, text/html;q=0.9, text/plain;q=0.8, text/css, image/png, image/jpeg, image/gif;q=0.8, application/x-shockwave-flash, video/mp4;q=0.9, flv-application/octet-stream;q=0.8, video/x-flv;q=0.7, audio/mp4, application/futuresplash, */*;q=0.5
x-flash-version: 10,1,82,73
Content-Type: application/x-www-form-urlencoded
Accept-Language: en-US,en
User-Agent: Mozilla/5.0 (Windows; U; en-US) AppleWebKit/531.9 (KHTML, like Gecko) AdobeAIR/2.0.3
Origin: app://
Content-Length: 77
Accept-Encoding: gzip,deflate
Host: open-api.URL.com
Connection: Keep-Alive
Pragma: no-cache
v=3&appKey=XXXYYYZZZ&email=XXXYYYZZZ&password=XXXYYYZZZ
This is the raw results of the call based on what I captured in Fiddler2:
HTTP/1.1 200 OK
X-Mashery-Responder: proxyworker-i-XXXYYYZZZ.mashery.com
Content-Type: text/xml
X-Aspnet-Version: 2.0.50727
Server: Microsoft-IIS/7.0
Cache-Control: no-store
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Cp: LVA08
Date: Tue, 24 Aug 2010 00:03:23 GMT
Cteonnt-Length: 74
Vary: Accept-Encoding
X-Original-Content-Encoding: gzip
X-Original-Content-Length: 90
Accept-Ranges: bytes
Content-Length: 74
<?xml version="1.0"?>
<value>xxxyyyzzz</value>
In comparing it to the version that works, the header is different on these lines:
x-flash-version: 10,1,53,64
User-Agent: Mozilla/5.0 (Windows; U; en-US) AppleWebKit/531.9 (KHTML, like Gecko) AdobeAIR/2.0.2  <-- note the adobeAir version change
Accept-Encoding: gzip,deflate  <-- this line doesn't exist in the working call
The response has the following different line(s):
Cp: LVA07 <-- instead of LVA08
Vary: Accept-Encoding  <-- this line doesn't exist in the working call
X-Original-Content-Encoding: gzip  <-- this line doesn't exist in the working call
X-Original-Content-Length: 90  <-- this line doesn't exist in the working call
My guess is that I need to turn off the new 'defaulted' accept-encoding: gzip, deflate but I've no clue how.  I tried adding it to the code with a value of blank (ie: "") but that did nothing.

Similar Messages

  • Flash work in preview but not in the browser!?

    Hi there:)
    I have a .swf file in a table in Dreamweaver. When I preview it in place and in Safari, it plays. When I upload eveything, it is not in any browser on the server.. any ideas?
    Thanks!
    V

    Hi John!
    Yes, sorry about that.. here it is.
    http://farmingtonfarm.com/appraisal.html
    Thanks for your help!!
    v
    Date: Thu, 8 Apr 2010 18:52:05 -0600
    From: [email protected]
    To: [email protected]
    Subject: flash work in preview but not in the browser!?
    Can't really help without a link to the site. Can you provide one?
    >

  • XML (RSS) Spry Dataset File Works in Preview But Not Over Internet

    hello
    I am trying to build a custom feed reader using the Spry framework in Dreamweaver CS4 and everything seems to go smoothly until I actually host the file (with the accompanying js and css files) and try to view it over the internet
    previewing from DW shows everything working the way it should
    I feel like I am missing something obvious ... but not sure what
    thanks for any help!

    Hi, i have a similar problem..
    These URL returns a XML:
    1) http://www.bolsadesantiago.com/intradayServlet?symbol=IPSA
    2) http://www.valorfuturo.com/contenidos_vf/proyectos/clientes/penta/titularnoticias.asp
    I use a CS4 and both works in preview, but only first works over internet (IE7).
    I suspect that 2° has a problem of syntax XML, but work with jQuery.

  • Simple buttons working in Preview, but not on iPad

    Hello everyone. I have a Button (I'm working in InDesign CS6), with instructions "Go to State". It links to a photo on a seperate layer. The link works perfectly in the SWF preview (shift-command-return). But when I update the file to view it in Adobe Viewer it does not work. (I am using Viewer Vers 25) There are no other functions on the page that could be "blocking" it. In fact, on some pages where there are two or three buttons (all of them with instructions of "Go to State"), 2 may work and one not. I am confused as to how I can see it working in the Preview, but not on the iPad. Any suggestions appreciated. Many thanks!!

    Bob, just got in and downloaded the patch - the buttons are working perfectly now!!
    Thank you for taking the time to help me out!! I'll be more diligent from now on in checking for updates. Thanks again. James

  • Works in preview but not when published in captivate 8?

    My youtube widget used in captivate 8 works just fine in the preview, but when published there's nothing where the video should be, any idea as to why?

    Hi Robert,
    as far as I understand your post, you are missing some kind of "button-artwork" in the published file, but do not report a problem with the "action" that the script should perform.
    My guess would be that it will be hard to help you without having a better understanding what your trying to achive and how (are you using a prebuilt component, or did you build the button fron scratch etc....)
    It might be even necessary to have a look at the fla itself.
    M

  • Interactive PDF–buttons working in preview but not in PDF

    I have a series of buttons that reveal hidden graphics. One of those hidden graphics is a background layer, in a separate layer, that should appear when a button is clicked. It is showing up, but in front of all other content, even though the layer is in the background. I have nothing else on the background layer. Also, the preview in InDesign shows this working properly, it's the exported Interactive PDF that is having problems. Any suggstions?

    Show/hide buttons can let you show and hide graphics which have been themselves turned into buttons. But in InDesign, they cannot control the visibility of layers. I think that's because of the way buttons are handled in the PDF file. I think the buttons themselves are seen as a separate layer above the "content" of the PDF.
    You can change layer visiblity with buttons but not in InDesign. You have to do it in Acrobat.
    Create your layers in InDesign. Export as a PDF but in the Export Adobe PDF dialog box, you must select Acrobat 6 compatibility and check Create Acrobat Layers. This takes InDesign layers and makes them PDF layers which you can work with in Acrobat.
    You can either create the buttons in InDesign or in Acrobat, but controlling layer visibility isn't an available action in InDesign. So you'll need to change their action WITHIN ACROBAT.
    In Acrobat, you can choose View > Navigation Panels > Layers. You can turn the eyes on and off to control visibility like in InDesign. Then set the layer visibility the way you want the first button to set and set the action for the first button to be Set Layer Visibility. When you click Add. It sets the visibility to the current state. Repeat the process for the second button.
    In InDesign CS5, to export buttons you'll need to choose File > Export > Adobe PDF (Interactive). Check Acrobat Layers.

  • Swap images works in preview but not in browser

    Hi everyone,
    I am attempting to get a swap images to work.  It works in the preview window but not when I preview it in the browser.  When I open it in a browser the states seem to "cycle" through really quickly in rapid succession.  I have linked my png file for you to see.  Any thoughts?
    Thanks,
    denbeck

    Your swap image slice is set to Animated GIF. Change it in the Optimize panel to plain GIF or PNG 8
    Jim Babbage

  • Flash image viewer works in preview but not online

    Hi
    I followed an online demo on how to get an image slideshow on my webpage using flash. It was using insert media image viewer. It all worked fine, looked great in the preview but when I put everything online I can't see it. Just an empty space were it should be. This is the site where it is
    http://www.idoityourself.com.au/ if tried moving the image to different areas in case it didn't like being in a folder within a folder etc but still didnt work. Any ideas??
    thanks

    http://www.idoityourself.com.au/Scripts/AC_RunActiveContent.js File not found.
    You have not uploaded the Scripts folder to your server which DW generated automatically for you when you inserted the Flash.

  • Dreamweaver rollover working in preview but not online

    I use image swap for rollovers often. After making some changes to my friends website I noticed all the rollovers stopped working. I tried it in all browsers, I tried restoring a file from time machine, I tried it with a bunch of different images.
    So I tried a very simple blank page with one image on it and "swap image" behavior applied to it. It also displays fine in the preview and not online (Dreamweaver CS5.5)
    http://amypalma.com/test3.html
    Please help, I think I'm going crazy.

    Nancy O. wrote:
    Your file is corrupted.  All line breaks have been stripped clean out of your code.  Scripts cannot work this way. 
    Try using a different FTP client like Filezilla to upload your pages.
    Also check the Line Break type in your Preferences.  See screenshot.
    Hit OK. 
    Go to Commands > Apply source formatting.
    Nancy O.
    Possibility #2 (and I've done this countless times) is that somewhere along the way in editing, someone inadvertently removed line breaks using the "Find and Replace" feature while cleaning up other code and applied it to more than necessary places.. If that's the case, replace the scripts with redownloaded (or in this case reinstalled) originals. I've broken some really cool scripts this way and I spend a few hours kicking myself in the backside for it, but I always keep a backup of my scripts for when I forget and do it again.
    Nancy's right, though Filezilla is a good solution, but if the pages are corrupted, it will load them as they are, and the problem will persist.

  • PayPal button action works in preview but not when published

    Hi! 
    Any thoughts as to why this works correctly in CS5 publish preview but when I publish it I either get no action or (XP comupter) or a blank page (vista).  Any thoughts or insight would be appreciated.  Also, I'm new to flash and here's the button action:
    on (release) {
            //create the LoadVars that will hold our paypal information
            var paypal = new LoadVars();
            //specify the business, amount of the item, shipping, etc.
            paypal.cmd="_xclick";
            paypal.upload="1";
            paypal.business="[email protected]";
            paypal.currency_code="USD";
            paypal.amount="275.00";
            //paypal.handling = "0";
            //paypal.no_shipping = "0";
            paypal.item_name="One Session";
            //added
            //paypal.lc="GB";
            paypal.bn="PP-BuyNowBF";
            //paypal.no_note="1";
            //send our information to PayPal, including all the optional  variables we have collected from customer
             paypal.send("https://www.paypal.com/cgi-bin/webscr","_blank","POST");
    Thanks!
    Robert

    Hi Robert,
    as far as I understand your post, you are missing some kind of "button-artwork" in the published file, but do not report a problem with the "action" that the script should perform.
    My guess would be that it will be hard to help you without having a better understanding what your trying to achive and how (are you using a prebuilt component, or did you build the button fron scratch etc....)
    It might be even necessary to have a look at the fla itself.
    M

  • PortalApp working on Preview but not on Portal

    Hi everybody!
    I'm facing a real very strange situation. I've developed a PAR, which contains two Components. One of them calls the other using AJAX & Prototype. I've tried it on my own machine, and works perfect. I've upload the par to the server which will contain the Portal, created an IView for the par, a Page for the IView, and the preview works fine. But the page doesn't work on the portal. The AJAX request fails, and doesn't reach the server....
    We're connecting the server via VPN.Can that be a problem?
    Thanks in advance, and sorry for my terrible english.
    Eneko

    If application works in Preview and doesn't work in portal page, it could be a permissions issue.
    Did you check the application with same user in both places?
    Previewing the iView with administrator rights is not the same as viewing it in portal with some standrard not-administrator-rights user.

  • CommandAction works through OnDeviceDebug, but not when installed from jar

    Hi everybody,
    I'm trying to run a HelloMIDlet example and if I run it on emulator it works fine, also when I run it on mobile through OnDeviceDebug from eclipse it works fine, but when I install a jar file and run the application it ends with Application Error message and it exits. I found out that the problem might be in the CommandAction method, because when I use this:
    public void commandAction(Command c, Displayable s) {
              notifyDestroyed();
    }then the application works also when installed from jar, but when I use this:
    public void commandAction(Command c, Displayable s) {
       String label = new String("Exit");   //just for test
       if (label.equals("Exit"))
         notifyDestroyed();
    }then it ends with Application Error right after I run the program (and it works when I use OnDeviceDebug). I'm using jdk1.5.0_06 and WTK from Sony Erricsson (my target device is W800i, which supports CLDC1.1 and MIDP2.0)
    My manifest file is
    Manifest-Version: 1.0
    MicroEdition-Configuration: CLDC-1.1
    MIDlet-Name: HelloMIDlet
    Created-By: Sun Microsystems Inc.
    MIDlet-Vendor: Sun Microsystems, Inc.
    MIDlet-1: HelloMIDlet, , HelloMIDlet
    MIDlet-Version: 1.0
    MicroEdition-Profile: MIDP-2.0
    MIDlet-Description: Hello Worldand I don't use the jad file when installing the application (seems to be unecessary when you have a manifest file inside the jar). And I'm unable to debug it because when debugging then it works normally. Also I tried to recompile the BluetoothDemo and the same error(and works through OnDeviceDebug). And when I installed the jar file, which is originally distributed with BluetoothDemo then it worked. When I compared original jar file and my jar file then the only difference was in the size the class files (class files compiled by me were bigger then the class files in original jar file (which work)).
    Any ideas guys and girls?

    I tried that approach but it doesn't work either. I think maybe my directory structure is wrong.
    C:\IRS\IRS.jar
    C:\IRS\irs.hs
    referenced: jar:file://C:/IRS/IRS.jar!/irs.hs
    Am I doing this right?

  • Flash video works onDreamweaver preview but not after uploaded to site

    Hi,
    I created a page with FW CS3 and opened it with Dream weaver.
    Using Flash CS3 I created some video clips. I then inserted three
    video files to the web page. In DW preview mode I can see the
    videos. I copy the source code and pasted it to the index page of
    my website as well as uploaded all the sit files from my hard drive
    folder to the website. The page comes up but not the videos.

    Search this forum for "FLASH" "UPLOAD". You'll find hundreds
    of answers.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "SERocks" <[email protected]> wrote in
    message
    news:g11qep$n8m$[email protected]..
    > Hi,
    > I created a page with FW CS3 and opened it with Dream
    weaver. Using Flash
    > CS3
    > I created some video clips. I then inserted three video
    files to the web
    > page.
    > In DW preview mode I can see the videos. I copy the
    source code and
    > pasted it
    > to the index page of my website as well as uploaded all
    the sit files
    > from my
    > hard drive folder to the website. The page comes up but
    not the videos.
    >

  • Dps video working in preview but not on ipad

    I have a mp4 video that plays in the preview but on the ipad i just get a white blink. please help

    I had a problem like that in the past and the answer for me was to delete the link and place the file again.
    Other than that, it could be a memory issue.
    Bob

  • Mask Crop Effect Working in Preview, but Not Rendering

    Machine: iMac
    Version: Premiere Pro CC 2014 - Updated this morning (1.27.15)
    Editing an interview where the camera operator shows up in a reflection.  To fix this, I grabbed an earlier shot without the camera person in that spot, looped the frames, placed it on a layer below the main footage, and cropped using a mask to let the looped footage show through (hiding the camera operator).
    This looks fine in the preview, but when I render the footage, the person is there again, as if the crop mask just went away.  I can't seem to correct this.
    Please help!
    Thanks.

    Richard,
    That was my first attempt this morning, but I was getting a weird effect: the cropped area was fine, but the entire bottom right quadrant of the screen was rendering the "cropped" footage as well.  When I couldn't get this to stop, I decided to try it the other way around.  I just added a bit of information that may be important: this footage is a multi-cam project. 
    Thanks

Maybe you are looking for

  • How to reset Windows 7/Vista/XP/2000 password if you forgot or lost windows

    How to reset Windows 7/Vista/XP/2000 password if you forgot or lost windows password It is truly very often for us to meet the password problem, sometimes we would forgot windows password or lost windows password, and could not login windows system a

  • Can I get two wireless routers to communicate in the same house?

    Hi there, Here's my problem. BT (a UK telecoms company) upgraded the household telephone line to fibre optic broadband on Friday and installed their BT Home Hub router and ADSL2+ modem. However, although this is a great upgrade for the household, thi

  • Using CUIC to Show Calls Waiting on UCCX 9.0.2

    Hi, I am about to deploy UCCX 9 for a customer, and they want to use CUIC to replace their existing wallboard.  This appears to be fine with the exception that none of the existing or available report definitions show calls waiting (as they are based

  • Why do I get a Track out of memory error while running open loop frequency response?

    MatrixX Build 61mx1411: I get a "Track out of memory" error when I run the Open Loop Frequency Response from the MatrixX pull down tools. What can I do to prevent this? We are running on an HP B1000 with 768 MB of RAM under HP-UX 10.2.

  • Polling using WCF SQL Adapter

    Hi - I have to develop this in BizTalk There is a table in SQL database where BizTalk needs to poll the data using WCF SQL Adapter. How and what query/stored proc do I need to write ? and how about polling interval should I mention. Is there any deta