Home | Projects | Tutorials | Articles | live chat | Submit Project | Big Vote
 
Ajax Projects
.NET Frameworks
Java Frameworks
PHP Frameworks
Ruby Frameworks
Other Frameworks
Cool AJAX sites
Ajax Resources
Ajax Tools
JavaScript frameworks
Partners
Flex Development

Hight quality AJAX development at low prices

eBuddy

eBuddy articles and instant messenger tips

Stock Exchange Chat

Stock exchange community, chat room for each quote

Web 2.0 Sites

Web 2.0 reviews, articles, cool sites, screenshots, tips...

Self Imrovement

Videos for self improvement, self help, communication skills

Self Help

Articles for self improvement, self help, communication skills

Facebook Applications

Do you want to know the latest facebook applications?

Cotton duvet cover sets

Visit Aqttan online store for famous egyptian cotton home textile products.

 Home /  Articles / ASP.NET AJAX issue with SSL Proxy

ASP.NET AJAX issue with SSL Proxy




My company uses a SSL Proxy for accessing internal web sites from external networks (such as the Internet). The SSL Proxy used is supplied by Juniper Networks and our networking guys have always made comments like “oh, another Juniper bug”, etc.

For my ASP.NET web sites, most of them work fine. However, on a new site that I am developing using the ASP.NET AJAX Toolkit, I noticed that the SSL Proxy messes up the script path and so the client side-JavaScript is trying to connect to a URL that isn’t reachable.

For those that haven’t worked with SSL Proxy servers or just Proxy servers. Here’s Wikipedia’s summary of a Proxy Server:

    [A] proxy server is a server which services the requests of its clients by forwarding requests to other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource, available from a different server. The proxy server provides the resource by connecting to the specified server and requesting the service on behalf of the client. A proxy server may optionally alter the client’s request or the server’s response, and sometimes it may serve the request without contacting the specified server

The key part of this is that the Proxy Server alter’s the server’s response by changing all of the URLs to the proxy equivalent URL. For simple anchor tags, this works fine. However, when using JavaScript and appending variables to create a URL, the Proxy cannot detect which variables to change and so the calculated URL is what an internal user might see instead of a URL that a proxy user should see.

Okay, now on to the bug….

Since I didn’t want to dig down into the ASP.NET AJAX JavaScript source code, I just disabled partial page postbacks for all ASP.NET AJAX Toolkit controls, so everything operates in the normal ASP.NET postback methodology.

Luckily, I am using a MasterPage and I have included my ScriptManager control in this class. To disable partial page postbacks, I check to see if the user is coming from the proxy (by checking the request’s URL) and then set the EnablePartialRendering method to false.

This means that any user accessing the site via the SSL Proxy will not have access to the AJAX goodness of the site, but the site will still function properly.

Yes,  I know that the lazy way to solve a problem is to just disable the feature. Our proxy user base is small and typically don’t access the many of the AJAX relevant pages.

source: jamesewelch.wordpress



Software Development Company Says:
Fri Nov 21, 2008 7:24 am
Hi,

Nice Article..

Leave Your Comment

Name (Required)
Mail (will not be published) (required)
Website
Top Projects
e-messenger
MSN Web Messenger
ebuddy
MessengerFX
ILoveIM
AJAX file upload
You Tube
KoolIM.com
Ajax.NET Professional
Meebo
Tutorials
Notes on JavaScript functions and objects
Building an Ajax Chat Room with the Ajax Transaction
OpenSocial: Social JavaScript APIs
Cross-Domain JSON with Silverlight
Mastering Ajax Part 3
Accessible, Usable, and Good Looking CSS Forms
Ajax search in Rails
Implement WebKit CSS transforms in IE
AutoCompleter 101
How To Implement sIFR3 Into Your Website