logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ditkar  
#1 Posted : Monday, March 16, 2015 8:20:54 AM(UTC)
ditkar


Rank: Advanced Member

Joined: 7/9/2014(UTC)
Posts: 88
Man
United States

Thanks: 8 times
I am trying to call a different webpage from within Host.aspx. I need to send few parameters that I gather from :
Code:

function joinSession(session) {
}


And would like to trigger a call to a different website. My code below:
Code:

function joinSession(session) {

//My Custom code
var xmlhttp;
	xmlhttp=new XMLHttpRequest();
	xmlhttp.open("GET",http://10.x.x.x:8040/joinSession/Default.aspx?P_name=”+session.SessionID+”&P_AgentID=“+session.Host,false);
	xmlhttp.send();
	alert(xmlhttp.responseText);

//SC original code
SC.launch.startJoinSession(
		session,
		function (sessionToken, promptFieldMap, onSuccess, onFailure) {
			onSuccess(
				SC.util.getClientLaunchParameters(
					sessionToken.SessionID,
					sessionToken.SessionType,
					sessionToken.Name,
					null,
					sessionToken.AccessToken
				)
			);
		},
		false,
		null,
		null,
		null
	);
}


When I try to execute above, I get this error. The joinSession is the compiled website created in asp.net. I moved this folder to ScreenConnect folder.
500 Internal Server Error 375ms

If I directly try to call the website which is hosted on a server other than ScreenCOnnect I receive this error:
Cross-Origin Request Blocked:

I also edited web.config according to the suggestion mentioned in this post but still could not get through:
http://forum.screenconne...ation-Demo.aspx#post5016

Any suggestions?

Edited by user Monday, April 13, 2015 2:17:14 PM(UTC)  | Reason: Not specified

Alexander  
#2 Posted : Monday, March 16, 2015 3:04:55 PM(UTC)
Alexander


Rank: Administration

Medals: Level 3: Shirt off your back! Received 25 Thanks!

Joined: 7/23/2013(UTC)
Posts: 717
Man
Location: Raleigh, NC

Was thanked: 66 time(s) in 63 post(s)
Well, the obvious problem with the code you posted is that there's no quote in front of the url.
If that's not the issue, though, there should probably be a way to get more info than "500 Internal Server Error".

The AccessControlOriginFilter stuff in that thread was for connecting to ScreenConnect from a different server; to go the other way, you'd have to do something like that on the other server.

Edited by user Monday, March 16, 2015 3:06:05 PM(UTC)  | Reason: Not specified

ScreenConnect Team
ditkar  
#3 Posted : Tuesday, April 7, 2015 8:59:33 AM(UTC)
ditkar


Rank: Advanced Member

Joined: 7/9/2014(UTC)
Posts: 88
Man
United States

Thanks: 8 times
Thanks @Alex, I did this on the other server and it worked.

Code:
Response.AppendHeader("Access-Control-Allow-Origin", "*")
ditkar  
#4 Posted : Thursday, March 22, 2018 11:36:35 AM(UTC)
ditkar


Rank: Advanced Member

Joined: 7/9/2014(UTC)
Posts: 88
Man
United States

Thanks: 8 times
I upgraded Connectwise Control to latest version : 6.5.16479.6613
and now my existing customization does not work. The CORS that was working all these year isn't working now after this upgrade.
Any suggestions?
Scott  
#5 Posted : Thursday, March 22, 2018 12:29:50 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,806
United States

Thanks: 3 times
Was thanked: 345 time(s) in 299 post(s)
is the extension signed and/or able to load in 6.5?
ScreenConnect Team
ditkar  
#6 Posted : Thursday, March 22, 2018 12:42:57 PM(UTC)
ditkar


Rank: Advanced Member

Joined: 7/9/2014(UTC)
Posts: 88
Man
United States

Thanks: 8 times
Scott - I have not created any extension, the Host.aspx page was updated with in-house customizations.
ditkar  
#7 Posted : Friday, March 23, 2018 11:36:05 AM(UTC)
ditkar


Rank: Advanced Member

Joined: 7/9/2014(UTC)
Posts: 88
Man
United States

Thanks: 8 times
Any suggestions on how to handle this situation when the Host page is customized?
shawnkhall  
#8 Posted : Tuesday, March 27, 2018 6:13:50 PM(UTC)
shawnkhall


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 301
Man
United States

Thanks: 7 times
Was thanked: 26 time(s) in 23 post(s)
go back to 6.4?
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.