AJAX not working over ISA

I need to solve this problem have a web page that use AJAX. When invoked internally it works fine but when acceded from the outside (https), passing through an ISA the AJAX scripts don't work. Problem is that I have no experience with either and don't know where to start the troubleshooting. Is something that I have to be aware when using AJAX with ISA? Is there something that I have to install in the ISA server for AJAX to work?
ecajigasAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

leakim971PluritechnicianCommented:
Hello ecajigas,

Confirm the call are done on the same domain.
You can't directly do an ajax call to an other domain.
For example open a page on your local drive that do an ajax call to a script to your external domain.
You need a simple proxy (php, java on a server to get the content for your an return it)

Regards.
ecajigasAuthor Commented:
By domain you mean DNS FQDN or Windows (active directory) domain? The server is behind a ISA server so it is "internal" all the time. Clients on the internal segment can access the web page and run the AJAX scripts withlout problems. We are doing global NAT using the IP that everybody use to go out. When a user is "outside" (internet) the page can be accessed but the AJAX scripts don't work. We are also using HTTPS not using the default 443 port.
leakim971PluritechnicianCommented:
Yes DNS FQDN

How do you specify the address in your ajax call ? relative ?
What about the log (events and trace with console) in the ISA server ?
I think you already did the trick to use another https port on the ISA server and not simply open the port.
 
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Keith AlabasterEnterprise ArchitectCommented:
What port number are you using? Have you used the ISA_tpr.js script and restarted the ISA services to add the new https port?
ecajigasAuthor Commented:
leakim971 I was able to obtain the code. It is basically something for pull down menus. Please check it out and help me to determine if it is relative or absolute. Honestly I have no idea.

Alabaster the port is 8010 instead of 443.
<%@ Master Language="VB" CodeFile="mpweb.master.vb" Inherits="mpweb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>

    <table class="style1">
        <tr>
            <td>
                <table class="style1">
                    <tr>
                        <td style="width:20%">
                            &nbsp;</td>
                        <td style="width:60%">
                            <asp:Image ID="Image1" runat="server" Height="147px" 
                                ImageUrl="~/images/AMOS-Banner yellow.jpg" Width="839px" />
                        </td>
                        <td style="width:20%">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="width:20%">
                            &nbsp;</td>
                        <td style="width:60%">
                            <asp:Menu ID="Menu1" runat="server" BackColor="#FFFBD6" 
                                DynamicHorizontalOffset="2" Font-Bold="False" Font-Names="Segoe UI" 
                                Font-Size="X-Small" ForeColor="#990000" Orientation="Horizontal" 
                                StaticSubMenuIndent="10px" Width="837px">
                                <StaticSelectedStyle BackColor="#FFCC66" />
                                <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                                <DynamicHoverStyle BackColor="#990000" ForeColor="White" />
                                <DynamicMenuStyle BackColor="#FFFBD6" />
                                <DynamicSelectedStyle BackColor="#FFCC66" />
                                <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                                <StaticHoverStyle BackColor="#990000" ForeColor="White" />
                                <Items>
                                    <asp:MenuItem Text="Upload Schedules" Value="Upload Schedules"  
                                        ImageUrl="~/images/wupload.png" NavigateUrl="~/amosweb_schedules.aspx"></asp:MenuItem>
                                    <asp:MenuItem Text="Upload Operations" Value="Upload Operations" 
                                        ImageUrl="~/images/woperation.png" NavigateUrl="~/amosweb_operations.aspx"></asp:MenuItem>
                                    <asp:MenuItem ImageUrl="~/images/wvalidation.png" 
                                        NavigateUrl="~/amosweb_validation.aspx" Text="Operation Approve" 
                                        Value="Validation">
                                    </asp:MenuItem>
                                    <asp:MenuItem ImageUrl="~/images/whome.png" 
                                        NavigateUrl="~/amosweb_main.aspx" Text="Home" Value="Home"></asp:MenuItem>
                                    <asp:MenuItem ImageUrl="~/images/wprint.png" Text="Reports" 
                                        Value="Reports">
                                        <asp:MenuItem NavigateUrl="~/amosweb_oper_rpt.aspx" Text="Uploaded Operation" 
                                            Value="Uploaded Operation"></asp:MenuItem>
                                        <asp:MenuItem NavigateUrl="~/amosweb_sched_rpt.aspx" Text="Uploaded Schedules" 
                                            Value="Uploaded Schedules"></asp:MenuItem>
                                    </asp:MenuItem>
                                    <asp:MenuItem ImageUrl="~/images/wquit.png" 
                                        NavigateUrl="~/Amos_Login.aspx" Text="Log Out" Value="Log Out">
                                    </asp:MenuItem>
                                </Items>
                            </asp:Menu>
                        </td>
                        <td style="width:20%">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="width:20%">
                            &nbsp;</td>
                        <td style="width:60%">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        
        </asp:ContentPlaceHolder>
                        </td>
                        <td style="width:20%">
                            &nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="text-align: center">
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
            </td>
        </tr>
    </table>
        </div>
    </form>
</body>
</html>

Open in new window

Keith AlabasterEnterprise ArchitectCommented:
You need to tell ISA that you are using that port - but from a cmd prompt using the isa_tpr script. You haven't mentioned the version of ISA being used so pick the right one. My blog tells you how to use it.


http://www.kalabaster.com/dasblog/2009/11/08/SSLPortNotSupportedInISAAndFTMGHowToChangeTheseDefaultsOfPorts563And443Only.aspx

get the tool from here
http://www.isatools.org/tools.asp?Context=ISA2004

As mentioned pick the ISA2000, ISA2004 or ISA2006 tab and get the file.
The syntax you will want is from the directory where you have placed the .js file.
c:\> isa_tpr.js /add port8010 8010 8010
Then stop/restart the ISA services
ecajigasAuthor Commented:
Keith

I will check that but outside users can access the server and get the certificate and everything is just the AJAX scripts that are not working for some pull down menus. The rest of the page loads just fine.
leakim971PluritechnicianCommented:
You can try to download the script directly to see if you get it successfully.
ecajigasAuthor Commented:
Keith the port is fine but we still have the problem with AJAX. At this point we are bypassing the ISA to be sure that problem is residing there. I will let you know. Any other idea will be appreciated.
Keith AlabasterEnterprise ArchitectCommented:
When you put the ISA back, I would be interested in seeing the log outputs. What version of ISA are you using by the way?
ecajigasAuthor Commented:
The test bypassing the ISA was unsuccessful because we didn't have enough public IP address. Anyways internally the page opens without problems the only difference is that when you invoke the page from the outside you use a different FQDM server name than from the inside.

Internet explorer also return some error that I'm including here.

I check the ISA log in event viewer but could not find any error related to the web page in particular.
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; FDM; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Timestamp: Thu, 15 Apr 2010 13:45:20 UTC


Message: ASP.NET Ajax client-side framework failed to load.
Line: 59
Char: 34
Code: 0
URI: https://XXX.XXX.XXX:8010/XXX.aspx


Message: 'Sys' is undefined
Line: 442
Char: 1
Code: 0
URI: https://XXX.XXX.XXX:8010/XXX.aspx


Message: 'Sys' is undefined
Line: 461
Char: 1
Code: 0
URI: https://XXX.XXX.XXX:8010/XXX.aspx


Message: Object expected
Line: 92
Char: 1
Code: 0
URI: https://XXX.XXX.XXX:8010/XXX.aspx

Open in new window

ecajigasAuthor Commented:
The problem was related to the virtual directory. Internally the page was accessed with http://servername/APP. Externally it was accessed with https://APP.domain.xx:8010. AJAX is asynchronous so a mapping was created for the virtual directories. Now the page  is accessed from the outside with https://APP.domain.xx:8010/APP.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
AJAX

From novice to tech pro — start learning today.