Forum Moderators: phranque

Message Too Old, No Replies

Same domain different servers

IIS Apache Javascript Permission Denied

         

jherington

11:45 pm on Dec 13, 2007 (gmt 0)

10+ Year Member



I have two web servers running on two different computers:
server 1 runs IIS with a single website: server1.samedomain.net,
server 2 runs Apache on Linux with a single website: server2.samedomain.net

I have put document.domain="samedomain.net" in the script section of both pages.

server1.samedomain.net/default.aspx has a single IFrame which calls server2.samedomain.net/default.html
Both default.aspx and default.html have document.domain = "samedomain.net"

I still get "Permission Denied" when the Server2/website/default.html script call "if (parent.scriptXYZ)..."
I don't have a dns, I simple use host files and I don't have subdomains. Do I need to put the document.domain statements somewhere special? I do have access to a dns server on another linux server if necessary, but all I wanted to was do some testing between these two sites and now I can't even get out of the starting gate.

The actual referrer and url properties as seen in Server2 are:
referrer: http://example.com/default.aspx
url: [itsa2.example.com...] (itsa2.example.com is the host name in Server1 host file)

[edited by: physics at 12:32 am (utc) on Dec. 14, 2007]
[edit reason] examplified last paragraph [/edit]

physics

12:40 am on Dec 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld.com [webmasterworld.com] jherington!

Hmm... this might be intentional document.domain behavior in the browser you're using (I'm assuming IE?).

Check this out:
[lists.apple.com...]

jherington

5:07 am on Dec 14, 2007 (gmt 0)

10+ Year Member



Thanks for the response physics,

First; yes I am using IE7. Second, I am not sure what to take from the article you referenced is this a resolution...how do you see it?

Also...
I was under the impression that if I had the same domain name 'itsadvantage.net' for example and two servers 'serverA' & 'serverB' for example that if I used the document.domain="itsadvantage.net" - that this should allow scripting. After all I am not crossing domains...am I? Isn't 'serverA.itsadvantage.net' and 'serverB.itsadvantage.net' from the same domain or am I just over simplifying this?

Thanks!