 Rank: Advanced Member Joined: 7/9/2014(UTC) Posts: 88   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
|
|
|
|
 Rank: Administration Medals:  Joined: 7/23/2013(UTC) Posts: 715  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 |
|
|
|
 Rank: Advanced Member Joined: 7/9/2014(UTC) Posts: 88   Thanks: 8 times
|
Thanks @Alex, I did this on the other server and it worked. Code:Response.AppendHeader("Access-Control-Allow-Origin", "*")
|
|
|
|
 Rank: Advanced Member Joined: 7/9/2014(UTC) Posts: 88   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?
|
|
|
|
 Rank: Administration Medals:  Joined: 3/28/2014(UTC) Posts: 2,862  Thanks: 3 times Was thanked: 351 time(s) in 303 post(s)
|
is the extension signed and/or able to load in 6.5? |
ScreenConnect Team |
|
|
|
 Rank: Advanced Member Joined: 7/9/2014(UTC) Posts: 88   Thanks: 8 times
|
Scott - I have not created any extension, the Host.aspx page was updated with in-house customizations.
|
|
|
|
 Rank: Advanced Member Joined: 7/9/2014(UTC) Posts: 88   Thanks: 8 times
|
Any suggestions on how to handle this situation when the Host page is customized?
|
|
|
|
 Rank: Advanced Member Medals:  Joined: 2/6/2014(UTC) Posts: 316   Thanks: 6 times Was thanked: 33 time(s) in 29 post(s)
|
|
|
|
|
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.