Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 886199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:01:51+00:00 2026-05-15T13:01:51+00:00

We have a .net based application hosted with SAP enterprise portal iframes. The domain

  • 0

We have a .net based application hosted with SAP enterprise portal iframes.
The domain of the SAP portal is al.xx.companyname.com. The domain of the .Net application server is ss.xx.companyname.com.

Now when I open the application through Enterprise portal, I get a ‘Permission denied’ JavaScript error. I enabled script debugging in IE and then attached visual studio debugger to the JavaScript error. I noticed the error is thrown from the following JavaScript code to set/ reset dirty flags.

if(top.EPCM!=null)

Understandably the issue is due to cross domain scripting. i.e. the application server of ss.xx.companyname.com is trying to access the browser component of enterprise portal of domain al.xx.companyname.com.

However this cross scripting is a trusted domain scripting and I want to somehow allow this cross scripting. I tried to set the primary DNS suffix of the application server. by following the below approach.

  1. Right click on My computer of application server. (Windows 2003 server, by the way)
  2. select properties – Computer Name
  3. Click Change button and in the next window click More button
  4. And under the’Primary DNS suffix of this computer’ textbox, I entered the value – al.xx.companyname.com.

Now after the above settings, I assume the domains of both enterprise portal and application server will be taken as al.xx.companyname.com. However I am still getting the JavaScript permission denied error in the same JavaScript code mentioned above.

As suggested in the replies, I also implemented document.domain approach.

var requireddomain = 'al.xx.companyname.com';
var text = document.domain; //returns the domain as ss.xx.companyname.com

if (text != requireddomain) 
        {
            for (i=0; i < 2; i++)
            {
                dotposition = text.indexOf( "." );
                text = text.substr(dotposition +1);
            }
            document.domain = text;
         }

    if(top.EPCM!=null)

With the above code, the document.domain object is set as companyname.com which is common to both Enterprise portal and application server.
However still the permission denied issue is thrown in the line >> if(top.EPCM!=null)

This issue is breaking my head for past 3 days. Can someone please help me with this?
The objective is to allow cross domain scripting between application server and enterprise portal which is a trusted connection. Thanks.

Update:

Interesting & frustrating development. I have installed ssl certificates in my application server. And still the permission denied error is thrown.

  • Portal domain: al.xx.companyname.com
  • app domain: ss.xx.companyname.com

I was trying to set the document.domain property to 2 sublevels down, i.e to companyname.com.

But still the ‘permission denied error’ occurs.

I guess, the setting of document.domain will only work if the app domain is a subset of portal domain. i.e.

  • portal domain: al.xx.companyname.com
  • App domain: ss.al.xx.companyname.com.

In the above case, I can just reduce the app domain to one sublevel down (to al.xx.companyname.com). Then I guess, it would work.

However in my case the portal and app servers are 2 branched subdomains of the same companyname.com and hence cross scripting is still not allowed.

Any suggestions on how to proceed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:01:52+00:00Added an answer on May 15, 2026 at 1:01 pm

    The Same Origin Policy is probably so strict that it doesn’t make exceptions even with trusted sites.

    The cross-browser document.domain property should be able to solve this:

    There is one exception to the same origin rule. A script can set the value of document.domain to a suffix of the current domain. If it does so, the shorter domain is used for subsequent origin checks. For example, assume a script in the document at http://store.company.com/dir/other.html executes the following statement:

    document.domain = "company.com";

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used to have a BlogEngine.net based blog, hosted in IIS7. Now I have
I have a web based application (ASP.NET 2.0) on a virtual dedicated Windows Server
Let me share the following scenario: I have a ASP.NET intranet Web-based application that
I have a Windows.Forms based .NET desktop application that stores privileged information in a
We have .NET WinForms based application and it is expected to work on at
I have a vb.net based windows application, where when GO button is clicked a
In my Quartz.NET based application, I have a JobListener that audits all jobs executed
I have a WinForms based application using the .NET 3.5 framework. The application has
I am working on a web-based application using asp.net 4.0. I have some dlls
I currently have a .net web application on a cluster based system (Rackspace cloud).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.