cancel
Showing results for 
Search instead for 
Did you mean: 

Suddenly Fails to Login (CrystalDecisions.Enterprise.SessionMgr)

Former Member
0 Kudos

Hi,

I'm using BOE 4.0 and it access my reports through ASP.NET application.

The reports works fine for five months after installation, but suddenly I have experience report is not showing in any of my application reports.

I debug the application and found out that the login fails even it uses valid account, this happens twice successively for short period of time(week interval).

I restarted the SIA but still login failed, finally I restarted the server (hosting the BOE) and everything goes back to normal, all report is working fine.

The ASP.NET application is critical and should not experience downtime for any reports as much as possible.

I need you help if you have any idea what is possible cause of the problem and possible solution.

Thanks,

Erwin

This is the code that access the report

--------------------------------------------------------------

CrystalDecisions.Enterprise.SessionMgr boSessionMgr;

                    boSessionMgr = new CrystalDecisions.Enterprise.SessionMgr();

                    _instance_boEnterpriseSession = boSessionMgr.Logon(CRS_ICMSReportViewerAccount, CRS_ICMSReportViewerPassword, CRS_HostServerName, CRS_AuthenticationTpye);

Accepted Solutions (0)

Answers (1)

Answers (1)

saurabh_pathak
Active Contributor
0 Kudos

Hi Erwin,

Do you have any specific error?

Issue you are facing would be due to different versions of runtimes (thats what comes to my mind first )

Here is what I would do:

  1. Check if the the patch level of BI 4.0 & runtime is same.
  2. Is project using mixed references? For e.g. 13.x or 14.x or for that matter any other version of CR / BOE
  3. Instead of using Any CPU as target platform try to use x86 or x64.

One of the above should help.

Regards,

Saurabh

Former Member
0 Kudos

Hi,

I'm using mixed reference 13.x and 14.x and "Any CPU"  as target platform and with this configuration the application is working for five months without any issue.

I just experience the problem two weeks back as it does not display any report (only white page comes out). The temporary solution that I have right now is to restart the server that hosting the BOE.

Is there anyway in BOE that I have to increase the number of report-job-request to unlimited or auto purging of something (this is how i feel is missing).

Thanks,

Erwin

former_member183750
Active Contributor
0 Kudos

Hello Erwin

Do not use mixed references. This is unsupported and results in unanticipated consequences - as you have just found out. Either go with version 13, or version 14, not both.

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

saurabh_pathak
Active Contributor
0 Kudos

Hi Erwin,

You might want to go through this then:

http://scn.sap.com/community/bi-platform/microsoft-net-sdk/blog/2012/02/01/why-shouldn-t-i-use-cryst...

Hope it helps!

Thanks,

Saurabh

Former Member
0 Kudos

Hi Ludek / Saurabh,

Below image is my Crystal Report file reference.

1) Is this the Mix-Reference are you referring to?, if so, do you have idea where can I get the 14.x version in replacement of 13.x version?

2) I already have the CRS2011 DVD (server and client) was it (14.x files) included in this dvds?

Just to inform that I am deploying my web application using "Copy Web Site" tool of VS2010 (not a MSI or setup.exe installer)

Thanks,

Erwin

former_member183750
Active Contributor
0 Kudos

Hello Erwin

"Copy Web Site", is the problem. You must use the MSI of MSM to install the CR runtime. No other way. As a by the by. The version 14 assemblies are for BI 4.0. E.g.; you'd have to purchase BI in order to get accessed to version 14 assemblies, which in your case you do no need.

- Ludek

Former Member
0 Kudos

Hi Ludek Uher,

I will go ahead with MSI installer (as suggested), I just want to clear some confusions.

Below is the screenshot(dev env computer) of my web app's web.config and assessmbly reference pertaining to crystal report (fig 1.0 below). It has 13.x and 14.x on both settings.

1) Is that the mixed-reference are you referring to (fig 1.0 below)? if that so, where should I get the 14.x version of (eg: CrystalDecisions.ReportAppServer.DataSetConversion, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304)

considering I have purchased the CRS2011 (fig 2.0 dvd content)?

2) Do I have to uninstall anything from my dev env computer?

Thanks,

Erwin

Fig 1.0 My Web Application - Crystal Report Reference screenshot

Fig2.0 Crystal Report Server 2011 (Client dvd screenshot)

former_member183750
Active Contributor
0 Kudos

You should not need to uninstall, but see if you can remove the version 13.x assemblies from your project. Save, recompile and see how that goes.

- Ludek

saurabh_pathak
Active Contributor
0 Kudos

In addition to what Ludek said, you might as well want to add the 14.x version of the assemblies you have removed. It should work well.

~ Saurabh

Former Member
0 Kudos

Hi

I have created setup package for my web app and successfully installed it on the server.

I'm able to login to my application and access its funtionality but when I try to access the crystal report it gives me this error:

Retrieving the COM class factory for component with CLSID {6670DE06-3F39-4C5D-9238-71FF984D2654} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Note:

1) Server is Windows 2008 64-bit OS

2) The application is configured to run in Platform x86

3) Crystal Report libraryies are installed in "C:\Program Files (x86)\SAP BusinessObjects" directory of the server.

Still could not  find the solution after spending hours, maybe you could help me on this.

Thanks,

Erwin

former_member183750
Active Contributor
0 Kudos

Search the registry for the CLSID. This should give you the actual name of the dll that is causing the issue. See if that dll exists. See if you can manually register it (regsvr32). If not, use Modules to see if there is a missing dependency.

- Ludek

Former Member
0 Kudos

Hi Ludek,

The application is working now, what I did is that I reinstalled the BusinessObjects redistribution.

But the problem still persist (the SessionMgr suddenly failed to login, intermittently).

You mention from your reply that I have to stick on the same version of Crystal Report libraries but my queries (also mentioned in this discussion) regarding the validity of the cr libraries in my web.cofig (see image) file is still not answered, this is I feel maybe the cause of the problem or is there any default report-job-limit defined in BOE that I have to increase or anything similar to this?

For reference this is the libraries I'm defined in my web.config file.

former_member183750
Active Contributor
0 Kudos

Hello Ervin

Yup. Bad, bad, bad, bad, bad - but fixed relatively easily

We should nor be seeing any version 13 assemblies. Only verison 14 assemblies are acceptable for a BI 4.0 solution.

Perhaps the following wikis and blogs will help:

How to Install the BI Platform 4.0 .NET SDK on a Development System with Visual Studio 2010

Integrating SAP BusinessObjects BI Platform 4.0 \ CRS 2011 .NET SDK runtime into VS2010 IDE

How to Install the BI Platform 4.0 .NET SDK on a Production, Staging or Test Server

- Ludek

Former Member
0 Kudos

Does the BO .NET SDK have a equivalent to the

String token = SessionMgr.getLogonTokenMgr().getLogonTokenMgr().createToken method?

DellSC
Active Contributor
0 Kudos

You have to use the LogonTokenManager that's part of the EnterpriseSession to get the token.  The code looks like this:

string myToken = mySession.LogonTokenMgr.CreateLogonTokenEx("", 120, 100);

The parameters are computer name, valid minutes, valid number of logons.

-Dell

Former Member
0 Kudos

So in the Logon method can the authtype be set to "secEnterprise"

boEnterpriseSession = boSessionMgr.Logon("username", "password", "cms", "authtype");

DellSC
Active Contributor
0 Kudos

Yes.

Former Member
0 Kudos

When running the method that should load the report, it fails with error message:

Unable to log on: Could not connect to server myservername.  Please check that the server name is correct, and that the server is running.

It fails at the logon method:

boEnterpriseSession = boSessionMgr.Logon("username", "password", "cms", "authtype");

the server name appears to be correct, the error points to the authtype parameter.

DellSC
Active Contributor
0 Kudos

What value are you using for "authtype"?  Can you go to BI Launchpad or the CMC and log in with the same account that you're trying to use here?  Is there a firewall between where your code is running and the BO server?

-Dell

Former Member
0 Kudos

For the authtype I am using secEnterprise and I am able to access this with the url as well by passing the user id and password but it fails when calling the 

CrystalDecisions.Enterprise.SessionMgr.Logon method it gives the error

Unable to log on: Could not connect to server myservername.  Please check that the server name is correct, and that the server is running.

DellSC
Active Contributor
0 Kudos

Do you have the right CMS server name?  Have you included the port number (default = ":6400") on the end of the CMS name?  I have found that with the 4.0 SDK, I need to include the port number all the time, where in earlier SDKs I didn't have to.

-Dell

Former Member
0 Kudos

Hi,

I have the same error as Sarah.

The CMS server name is the right one, and the port number is well included.

The BI Platform 4.0 .NET SDK is well installed on the machine.

//Web.config

<add assembly="CrystalDecisions.Enterprise.Framework, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>

//C#

using CrystalDecisions.Enterprise;

public void Test()

{

    using (SessionMgr session_mgr = new SessionMgr())

    {

        using (EnterpriseSession session = session_mgr.Logon(username, password, server, "secEnterprise"))

        {

            //todo

        }

    }

}

On the Logon method call, the following error occurs :

Unable to log on: Could not connect to server XXX.  Please check that the server name is correct, and that the server is running

Former Member
0 Kudos

Ok, I solved my problem

Firstly, I tried to ping the CMS server, without the port number => it was not working.

So my system administrator did something, I don't no what exactly, and after the ping was working.

Then, I retry the logon method => not working

I removed the port number of the CMS server adress parameter in the Logon method => it's works

Mick

Former Member
0 Kudos

so do you know if it was a firewall issue?

Former Member
0 Kudos

Yes, it was for me, on the server side.

You should try to desactivate the firewall, and check if you could ping the server from your client.

Former Member
0 Kudos

by the way can we write a similar method in vb code rather than c#

Former Member
0 Kudos

other than creating a login token can the sdk be used to pass in Parameters to reports in CRS?

Former Member
0 Kudos

Sure,

you can do pretty the same thing, syntax is just a little bit different.

Former Member
0 Kudos

I am not sure to well understand your question, but if the question is, can I generate an URL to access to a report, the answer is yes. You could basically do something like it, including the generated token as a parameter.

[example for OpenDocument]

http://<servername>:<port>

/BOE/OpenDocument/opendoc/openDocument.jsp?<parameter1>&<parameter2>&...&<parameterN>

More infos:

http://help.sap.com/businessobject/product_guides/boexir4/en/xi4_opendocument_en.pdf

Former Member
0 Kudos

I solved my firewall issue but after running the code to logon and create a token the page is navigated to the BO Logon Page rather than the actual report. I am passing the token within the URL. Here is the code, is there anything wrong with this code:

Dim mytoken As [String] = boEntSession.LogonTokenMgr.CreateLogonTokenEx("", 120, 1000)

Dim urlEncode As [String] = Server.UrlEncode(mytoken)

Response.Redirect("https://myserver/CrystalReports/viewrpt.cwr?id=8979&apstoken" +

urlEncode)

DellSC
Active Contributor
0 Kudos

You're missing an "=" after the word "apstoken".

-Dell