views:

161

answers:

0

Hi all,

We have load balancing set up on out two web server, however, a few users are being asked to login when they are being re-directed to a particular server to upload a document (we are trying to keep all uploaded documents on one server only), here is the code from web.config:

<authentication mode="Forms">
    <forms name="EAAAuthCookie" 
    loginUrl="/login" 
    defaultUrl="/members/home" 
    protection="All" 
    path="/" 
    timeout="60000" 
    slidingExpiration="true"
    enableCrossAppRedirects="true" />
</authentication>

<machineKey
decryption="AES"
validation="SHA1"
decryptionKey="key"
validationKey="key" />

Here is the transfer code to the upload form:

$('#addReport').click(function() {
            if ($.cookie('TransferURL') != '')
            {
                $("#iframeUploadReport").attr('src', $.cookie('TransferURL'));
            };

            $('#overlay').fadeIn('slow');
        });

<script type="text/C#" runat="server">
    void Page_Load()
    {
        string cookieName = FormsAuthentication.FormsCookieName;
        string userName = Request.Cookies["HiddenUsername"].ToString();
        string cookieValue = FormsAuthentication.GetAuthCookie(userName, false).Value;
        Response.Cookies["TransferURL"].Value = "/members/media-upload" + String.Format("?{0}={1}", cookieName, cookieValue);
    }
</script>

<iframe id="iframeUploadReport" src="/members/media-upload" width="500px" height="336px" frameborder="0" scrolling="no"></iframe>

Can you see any obvious step we are missing?

Thanks