473,729 Members | 2,144 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access denied not a cross-host issue

Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

The op was having trouble with access denied using resizeTo. I am having the same issue
but the explanations in this article don't seem to apply here. I am not trying to
resize a window with content from a different server. This issue lies here.

What I do is make a popup window in a manner that I was given here. I like it
better then what I had. Here it is:

<script language="javas cript" type="text/javascript">
<!-- Begin
// Set the url of the banner popup window page
var theURL = '<%="/redir/default1.asp?pg =" & Server.URLEncod e(strsnd1) & "&splt=" & splt1%>';

// Set the title of the popup window
var title = 'Warning';

// Set the size of the popup window
var windowWidth = 715; // cannot be less than 100
var windowHeight = 360; // cannot be less than 100

// Set the position of the popup window
var windowX = 35;
var windowY = 200;

// Set true to auto-center (positions will be ignored)
var autocenter = true;

// Set true for popup to close when launch page does
var autoclose = true;

var s = 'width='+window Width+',height= '+windowHeight;
var beIE = ua.ie;
var done = new Object('no');

if (autocenter){
windowX = (window.screen. width-windowWidth)/2;
windowY = ((window.screen .height-windowHeight)/2)+50;
}

function doAgilePopup(){
if (beIE){
var frameString = [
'<html>',
'<head>',
'<title>'+title +'</title>',
'</head>',
'<frameset rows="*,0" framespacing="0 " border="0" frameborder="0" >',
'<frame name="top" src="'+theURL+' " scrolling="no" />',
'<frame name="bottom" src="about:blan k" scrolling="no" />',
'</frameset>',
'</html>'
].join('\n');
window.newWindo wHtml = frameString;
agilePopper = window.open('ja vascript:opener .newWindowHtml' ,'popAgile','fu llscreen=yes,'+ s);
agilePopper.blu r();
window.focus();
try{
if (typeof(agilePo pper) == 'object'){
agilePopper.res izeTo(windowWid th,windowHeight );
agilePopper.mov eTo(windowX,win dowY);
}
}
catch(e){ alert('Cant\'t move window'); }
}
else{
agilePopper=win dow.open(theURL ,'popAgile','sc rollbars=no,'+s );
agilePopper.blu r();
window.focus();
agilePopper.res izeTo(windowWid th,windowHeight );
agilePopper.mov eTo(windowX,win dowY);
}
agilePopper.foc us();
if (autoclose)
window.onunload = function(){ agilePopper.clo se(); }
done = 'okay';
}
// End -->
</script>

You can see I try catch where the issue occurs. I know that it is accessed denied because that is what
the javascript exception says. Any way this does NOT occur all the time. If I access this page directly
then I get this error message. But if I access this page from links on my server I do NOT. Is that the
issue? The other host that I am accessing is called (none) and that is enough to throw this access
denied error? The trouble is the page appears fine and everthing works except the resizing and
moveto. And then they work when the page has a Referrer from my site. Thanks for any further
light on this issue and any suggestions how to work around this (besedes chucking it) would be greatly
appreciated.

--
George Hester
_______________ _______________ ___

Jul 23 '05 #1
7 3297
George Hester wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

[...]

The issue seems to belong very much to IE rather than to JavaScript,
perhaps you'll get more information from an IE-centric group?

The general consensus seems to be don't use popups at all, much less
try to move and re-size them. Loading scripts from the local machine
also seems to cause problems in IE, but I'm no IE guru and not aware of
all the issues it has.

Cheers, Rob.
Jul 23 '05 #2
"George Hester" <he********@hot mail.com> wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

The op was having trouble with access denied using resizeTo. I am having the same issue
but the explanations in this article don't seem to apply here. I am not trying to
resize a window with content from a different server. This issue lies here.

What I do is make a popup window in a manner that I was given here. I like it
better then what I had. Here it is:

<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve
Jul 23 '05 #3
"Steve van Dongen" wrote in message news:eh******** *************** *********@4ax.c om...
"George Hester" <he********@hot mail.com> wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

The op was having trouble with access denied using resizeTo. I am having the same issue
but the explanations in this article don't seem to apply here. I am not trying to
resize a window with content from a different server. This issue lies here.

What I do is make a popup window in a manner that I was given here. I like it
better then what I had. Here it is:

<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve


Yes I tried that Steve. But guess what? It doesn't work right. If I set the open statement like this:

//
var s = 'width='+window Width+',height= '+windowHeight+ ',left='+window X+',top='+windo wY;
//
agilePopper = window.open('ja vascript:opener .newWindowHtml' ,'popAgile','fu llscreen=yes,'+ s);
//

then the agilePopper opens fullscreen. Just as the statement says it should. The dimension and
placement is ignored.

There is one other thing you may find interesting. The way this works is when a page (ASP) is
accessed and if a session variable has not been previously set then this page is accessed to cause this
popup to appear. At this point the link is in this form:

http://www.mydomain.com/more5/more5.asp

This popup will be a relatively small window with its parent as the background to it. You can also
move the child around you jast cannot close it. The parent can be closed but this obviously destroys
the child so in any case the options avaiable in the child MUST be chosen to proceed or the user ends
up nowhere.

Now this link above CAN be accessed directly and there is no issue. The popup behaves admirably.
But if the client tried to access the page directly like this:

http://www.mydomauin.com/more5/more5...x+469&rdr=cube

then I get the "access denied." The user wouldn't even know anything untoward happened if they had
debugging disabled because the popup opens full screen causing the parent to be behind it and so
hidden which is where the error message appears. The alert box you see I make is also unnoticeable.

So I think it has something to do with accessing a file namely the image "mc18045.jp g" or the encoding
that is set into the javascript statements. If I am unclear about something let me know and I can
try to explain the issue better. And any further suggestions will always be taken with the best
of consideration.

George Hester
_______________ _______________ ___

Jul 23 '05 #4
"RobG" <rg***@iinet.ne t.auau> wrote in message news:41******** *************** @per-qv1-newsreader-01.iinet.net.au ...
George Hester wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

[...]

The issue seems to belong very much to IE rather than to JavaScript,
perhaps you'll get more information from an IE-centric group?

The general consensus seems to be don't use popups at all, much less
try to move and re-size them. Loading scripts from the local machine
also seems to cause problems in IE, but I'm no IE guru and not aware of
all the issues it has.

Cheers, Rob.


Every browser has their own idiosynchrosies with JavaScript. That is the nature of the beast. I don't
think posting my question here was wrong the answer may just not be known.

Thanks.

George Hester
_______________ _______________ ___

Jul 23 '05 #5
"George Hester" <he********@hot mail.com> wrote:
"Steve van Dongen" wrote in message news:eh******** *************** *********@4ax.c om...
"George Hester" <he********@hot mail.com> wrote:
>Please take a look at this google artcle:
>
>http://groups.google.com/groups?hl=e...mtel.net#link9
>
>The op was having trouble with access denied using resizeTo. I am having the same issue
>but the explanations in this article don't seem to apply here. I am not trying to
>resize a window with content from a different server. This issue lies here.
>
>What I do is make a popup window in a manner that I was given here. I like it
>better then what I had. Here it is:

<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve


Yes I tried that Steve. But guess what? It doesn't work right. If I set the open statement like this:

//
var s = 'width='+window Width+',height= '+windowHeight+ ',left='+window X+',top='+windo wY;
//
agilePopper = window.open('ja vascript:opener .newWindowHtml' ,'popAgile','fu llscreen=yes,'+ s);
//

then the agilePopper opens fullscreen. Just as the statement says it should. The dimension and
placement is ignored.


That's weird.

I didn't notice the fullscreen option in your window.open call before.
The answer to your original question is taht In IE6 SP1, for security
reasons, full screen windows cannot be resized by script.

Regards,
Steve
Jul 23 '05 #6
"Steve van Dongen" <st*****@hotmai l.com> wrote in message news:eh******** *************** *********@4ax.c om...
"George Hester" <he********@hot mail.com> wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

The op was having trouble with access denied using resizeTo. I am having the same issue
but the explanations in this article don't seem to apply here. I am not trying to
resize a window with content from a different server. This issue lies here.

What I do is make a popup window in a manner that I was given here. I like it
better then what I had. Here it is:

<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve


OK I fugured it out. You see IIS In Windows 2000 when passing a URL always passes the URL
such that certain characters are changed. It does this to a space changes it to + and it does it to . changes it to %2E. Therefore if you receive the URL in a different page using Request.QuerySt ring('paramater ') you will get the URL with those characters changed. It also does it to : but that one isn't necessary here to go into.

Anyway this is how I was passing the URL and in the receiving ASP I used Server.URLEncod e on it. This casued the percentages % to also be encoded to %25. So an image like this.jpg became
this%252Ejpg. Now this didn't stop the image from being displayed but JavaScript did not like it one
bit.

Access denied.

So I changed the encoding around a little bit to catch what IIS does when passing a URL as a
parameter.

George Hester
_______________ _______________ ___

Jul 23 '05 #7
"Steve van Dongen" <st*****@hotmai l.com> wrote in message news:r9******** *************** *********@4ax.c om...
"George Hester" <he********@hot mail.com> wrote:
"Steve van Dongen" wrote in message news:eh******** *************** *********@4ax.c om...
"George Hester" <he********@hot mail.com> wrote:

>Please take a look at this google artcle:
>
>http://groups.google.com/groups?hl=e...mtel.net#link9
>
>The op was having trouble with access denied using resizeTo. I am having the same issue
>but the explanations in this article don't seem to apply here. I am not trying to
>resize a window with content from a different server. This issue lies here.
>
>What I do is make a popup window in a manner that I was given here. I like it
>better then what I had. Here it is:
<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve


Yes I tried that Steve. But guess what? It doesn't work right. If I set the open statement like this:

//
var s = 'width='+window Width+',height= '+windowHeight+ ',left='+window X+',top='+windo wY;
//
agilePopper = window.open('ja vascript:opener .newWindowHtml' ,'popAgile','fu llscreen=yes,'+ s);
//

then the agilePopper opens fullscreen. Just as the statement says it should. The dimension and
placement is ignored.


That's weird.

I didn't notice the fullscreen option in your window.open call before.
The answer to your original question is taht In IE6 SP1, for security
reasons, full screen windows cannot be resized by script.

Regards,
Steve


Yes I know. That was OK until Windows XP SP2 now I don't know what is going to happen. I have
to put together that Op sys and see how it goes. The issue of a forced status bar may present a
problem. I like this thing because it gives me complete control over that segment of accessing the site.
And I mean complete control. I don't like people coming by just to have something to complain about.
So I was asked to guard the site and so I did.

Anyway I figured out the issue. If you look at what I said was the URL that caused the problem:

http://www.mydomauin.com/more5/more5...x+469&rdr=cube

that was actually wrong. That link does work correctly. Had a little sneaky stufff going on where in fact the link was looking like this:

http://www.mydomauin.com/more5/more5...x+469&rdr=cube

Accessed Denied.

The issue is Request.ServerV ariables("URL) and Server.URLEncod e in the more5.asp page. There is some funky encoding going on. It's the old issue of encoding and then encoding again. In JavaScript it would be called escaping and then escaping again. Which causes the problem. Here was the fix: (in VBScript Server-side)

<%
'
Response.Redire ct "/Logon.asp?from= " & Replace(Server. URLEncode(s), "%252E", "%2E")
'
%>

This is not right it's a cobjob but will suffice for now until I can find out how to fix this Micrsooft
SNAFU.

http://support.microsoft.com/default...b;en-us;301464

--
George Hester
_______________ _______________ ___

Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
7842
by: Jeff T. | last post by:
All, Is there any way to access a separate IE 6.0 browser process via the Javascript DOM ? For example, open IE once. Open IE again (not using File->New). Can the second IE browser/process access the DOM objects of the first, if so, can someone please post a bit of sample code? thanks. -Jeff
1
11104
by: Cindy Lee | last post by:
I'm trying to dynamically set the height of my Iframe. my https: main page is calling another https in an Iframe. But i get an access denied error from my javascript trying to call the parent document. Main https page <IFRAME APPLICATION="yes" style="width:100%;" id="iframename" frameborder="no" scrolling="no" SRC="https://www.otherdomain.com">
4
3915
by: Fabian von Romberg | last post by:
Hi, I have installed Sql Reporting Services on 2 machines, one is WIN 2000 PRO and the other one is WIN 2000 ADV. SERVER. When I try to access a report using the webbrowser, I get the following error, this happens only if try access the report on the SERVER, it I try on my local machine, it works just fine. Any help will be much appreciated. Thanks in advance, Fabian von Romberg
9
6331
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use the attribute for the Main() function, I get "access denied error", if I use a ManagementEventWatcher to connect to the local machine to receive events. Is there anybody out there, how possibly can explain why this happens?? If I remove this...
1
2258
by: | last post by:
Hello, I have a problem when I try to do this on a aspx page.. Is there anything wrong with this approach? This is the javascript function <Script Language='JavaScript'> function OpenLink(Link){
1
1377
by: dana lees | last post by:
Hi, I have a frameset that contains 2 frames. The upper frame has a "print" button. The lower frame has been redirected to a URL that was sent to it in a QueryString. When trying to call window.print() from the upper frame to the lower frame i get an "access denied" error. How can i solve this problem? Thanks,
0
3894
by: matsla | last post by:
I have followed all guide lines to set up remote debugging but is it possible to do cross-domain remote debugging? I use same account/password on both computers (XP => 2003), added users to debug group, change DCOM security etc. I get following error in the event log when try to start the remote debugging Visual Studio 2003... DCOM got error "General access denied error" from the computer COMP1
11
2523
by: Une Bévue | last post by:
bon he voudrais m'essaye à écrire un widget, qui n'est autre qu'une page html faisant appel à XMLHttpRequest. pour l'instant mon Man_wgdt n'est qu'une co^pie du widget RDoc (pour documentation rubyà mon Man en serait l'équivalent pour le man/*nox, donc MacOS X. à part des erreur sur display que m'indique la console javascript : Error: Error in parsing value for property 'display'. Declaration dropped.
3
5425
by: Simon | last post by:
Hi All, I'm hoping someone will have some words of wisdom for me regarding MS Clustering on Windows 2003. I have a service that runs on a cluster. During invocation it's supposed to determine from the cluster which node is active (this is a active/standby configuration) and either proceed or sleep depending on the status. The interface to the cluster is that advertised by the standard interop layer built by Visual Studio for the...
18
2562
by: Jeff Bigham | last post by:
Hi, I'm getting an "Access is denied" error in IE when I try to focus an input box with node.focus() My understanding is that should only happen when the domains are different of the Javascript and the element that its trying to focus. It might be cross-frame, but everything comes from the same domain. The oddest part about this is that even though I get the "Access is
0
8925
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8763
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9288
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8156
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6026
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2692
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2166
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.