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

Notification

Icon
Error

Options
Go to last post Go to first unread
RamKumar  
#1 Posted : Monday, June 18, 2018 5:55:02 AM(UTC)
RamKumar

Rank: Newbie

Groups: Registered
Joined: 5/31/2018(UTC)
Posts: 1
India
Location: Hyderabad

Hi,

I want to publish SR in server and access it from browser , so i am using below code for login and if login succeed then execute SR in Iframe

<iframe name="Companyiframe" id="Companyiframe" style="width:100%; height: 600px;" align="middle" scrolling="yes" frameBorder="0" ></iframe>
<iframe name="loginresponse" (load)="loadReport();" style="width:100%; height: 600px;display:none" align="middle" scrolling="yes" frameBorder="0"></iframe>



loadReport() {
if (this.cntr == 0) {
this.cntr = 1;
} else {
var sealServer = "http://localhost/seal/";
var self = this;
var form1 = $('<form method="post" target="Companyiframe" />');
form1.attr('action', sealServer + "SWExecuteReport");
form1.append($('<input />').attr('type', 'hidden').attr('name', 'path').attr('value', "\\" + self.ReportName.title + ".srex"));
form1.children('input').attr('type', 'hidden');
$('body').append(form1);

form1.submit();
}
}

myFunction() {
this.service.getAuthentication().subscribe((data: any) => { //call controller to get encrypted username and password
this.username = data.data[0];
this.password = data.data[1]
var self = this;
var sealServer = "http://localhost/seal/";
var form = $('<form method="post" target="loginresponse" />');
form.attr('action', sealServer + "SWILogin");
form.append($('<input />').attr('type', 'hidden').attr('name', 'user').attr('value', this.username));
form.append($('<input />').attr('type', 'hidden').attr('name', 'password').attr('value', this.password));
form.children('input').attr('type', 'hidden');
$('body').append(form);
form.submit();
}, (error: any) => {

})
}



its working fine when there is localhost in url (var sealServer = "http://localhost/seal/"), but when we replace localhost with any server IP like
(var sealServer = "http://192.168.10.54/seal/") then it redirects to SR login page.
we want the report shouldn't redirect to login page
epf  
#2 Posted : Tuesday, June 19, 2018 11:53:17 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 552
Switzerland

Thanks: 7 times
Was thanked: 78 time(s) in 76 post(s)
you have to understand why the Authentication Process is different from localhost to another server...
this depends on your Security Provider.
There is a debug mode you can activate in the Web.config in the <appSettings> section:
<add key="DebugMode" value="false" />

If set to true, you can trace a lot of messages in the Event Viewer...and understand what is going on.

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.