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



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

Rank: Newbie

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


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');


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');
}, (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 = "") then it redirects to SR login page.
we want the report shouldn't redirect to login page
#2 Posted : Tuesday, June 19, 2018 11:53:17 AM(UTC)

Rank: Administration

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

Thanks: 9 times
Was thanked: 107 time(s) in 104 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.