<< Previous Topic | Next Topic >>Return to Index  

Calling CR with JavaBean- "Failed to Connect to Server"-CR8.5,CE8,Win2000,SQL2000

August 17 2002 at 12:22 PM
 

 
Pooja Mohan,

I did try your package to call a crystal report with Java Bean and it was success when i run the html in local. eg. c:\cr8_report\report.htm
However, when i run it with http, eg, htp://sia2000/cr8_report/report.htm, an error message " cannot connect to server" show in the console.

I did read some article about the error messge "cannot connect to server" but none of the solution can solve my problem. Do you have any idea about my problem??

I am using cr8.5, ce8, win2000, sql2000.

Thanks for your help.

Cheung From SIA....


    
This message has been edited by pmk16 on Aug 28, 2002 12:57 PM


 
 Respond to this message   
AuthorReply
Pooja M.

re:Calling Crystal Report with Java Bean

August 17 2002, 4:38 PM 

Hello Cheung,

Please go through Re: report viewer bean ;query posted by SATHYAPRAKASH NARAYANA and,see whether you tried everything that I asked him to try 'coz there is no mention about IIS anywhere in your query.

I would also like you to try invoking:

http://sia2000/cr8_report/Report.rpt instead of the HTM page. Please also verify that the Report.rpt is actually present in the cr8_report folder on the Windows 2000 server machine (same place,where IIS is installed).

Are you able to connect properly to the SQL Server?

Please verify that the DataBase Connection Information ,namely,ODBC DSN,UserId and Password are set properly .

I would also like to know what exactly did you try?

regards,



Pooja M.,
http://home.attbi.com/~pooja.mohan

 
 Respond to this message   

re: calling crystal report with java

August 19 2002, 5:14 AM 

Hello Pooja M.,

There is no problem now to run crystal report with javabean in my server machine that installed with IIS, either in c:\cr8_report\report.htm or http:\sia2000\cr8_report\report.htm as i found that i have used the logon information of win2000 rather than those of sql2000.

Everything seems to be alright. However, if i want to run this html file in another machine, the same error message
' Failed to connect server ' show again....

Meanwhile, i did try your method to run the report by itself, ie http:\\sia2000\cr8_report\report.rpt Same case happen, ie no problem in server machine but error message ' Failed to connect server' show again.

PS. :
directory cr8_report is a virtual directory under IIS and also is a real directory under c: of server machine

I wonder is there anything i need to set about the sercurity?

Thanks...

 
 Respond to this message   
Pooja M.

re: Calling Crystal Report with Java- "Failed to Connect to Server"

August 19 2002, 10:44 AM 

Hello Cheung,

I am guessing that it has got to do with Security only as the Crystal Reports does not have the granted permissions to the SQL Server database objects.

Please go through this material and,cross verify.(Source-Microsoft Website)

Symptoms

On a Windows NT Server computer running Internet Information Server (IIS) version 3.0, 4.0, or 5.0, the following ODBC error message appears when you try to verify a connection to a remote SQL database:
ODBC Error: "Client cannot establish connection." SQL ODBC Driver (SQLSRV32.dll) version 3.70.05.87 (10/04/98)

Cause

Microsoft SQL Server Integrated Security requires NTLM authentication in order to map user accounts to SQL Server accounts.

After a Web browser is authenticated by IIS, an authenticated connection to the SQL Server is not possible. IIS is using the IUSR account when it attempts to connect to SQL Server. When using the IUSR account to connect to the SQL Server, NTLM authentication is used.

Essentially, IIS does not have the necessary information to complete the NT authentication process.
 

More Information

To work around this issue, use one of the following methods:

Method 1: Host IIS and SQL Server on the Same Computer

By eliminating the need for IIS to create an authenticated connection to SQL Server, you can work around this issue.

To do this, you must use a data source name (DSN) that looks directly to the local computer for the SQL Server, and not to the network. This can be done by using the "(local)" setting in a System DSN.

Method 2: Use Basic Authentication Instead of NTLM in IIS

By using Basic Authentication, the password is BASE64 encoded and sent to IIS during the authentication process. With the password, IIS can now complete the NTLM authentication process when connecting to SQL Server.

Method 3: Map the Anonymous User Account from IIS to a SQL Server Guest Account

This method assumes that all users will have the same level of privileges to the SQL Server resources. Every user browsing to the Web will have access to the database.

For additional information about creating connections to SQL Server, click the article numbers below to view the articles in the Microsoft Knowledge Base:
Q176377 INFO: Accessing SQL Server with Integrated Security from ASP
Q176378 HOWTO: SQL Server with Integrated Security, IIS on Same Machine

Q176379 HOWTO: IIS and SQL Server on Separate Machines with Trusted Connection

Q176380 HOWTO: Using ASP with a SQL Trusted Connection with Guest Account

HOWTO: IIS and SQL Server on Separate Machines with Trusted Connection

The information in this article applies to:
  • Microsoft SQL Server 6.5
  • Microsoft Internet Information Server 3.0, 4.0, 5.0

Summary

Microsoft SQL Server 6.5 can be used with Active Server Pages (ASP) and Internet Information Server 3.0 (IIS). When SQL Server is configured for Mixed or Integrated Security, certain configuration changes must be made to enable ASP to connect to SQL Server via a trusted connection. This article describes these changes and how to set up Internet Information Server to properly connect to SQL Server over a trusted connection.

More Information

In order for ASP scripts to make a trusted connection to SQL Server using ActiveX Data Objects (ADO), the users must be authenticated when they browse the Web page making such a connection. If you force the users to authenticate themselves via Basic authentication, IIS has all information required to make the trusted connection to SQL Server. If any other authentication method is used (NT Challenge/Response or Anonymous), IIS is not be able to make this connection.

NOTE: Using Basic authentication may compromise security on your Web server. Basic authentication transmits passwords over the network BASE64 encoded. This encryption is available publicly and can be used to decipher passwords. This means that anyone able to use a network sniffer to watch network transmissions will be able to decipher passwords sent via Basic authentication.

Use the following steps to enable Basic authentication and disable other methods:
  1. Click Start menu.
  2. Select Programs.
  3. Select Microsoft Internet Server.
  4. Select Internet Service Manager.
  5. Double-clickthe computer name for the WWW Service. This opens the Properties window.
  6. On the Service tab of the tabbed dialog box there's a section marked Password Authentication. In this section clear the Allow Anonymous and the Windows NT Challenge/Response check boxes.
  7. Select the Basic (Clear Text) check box.
  8. Click OK.
Change in the authentication methods will be effective immediately, and does not require the stopping of the WWW Publishing service.


Regards,



Pooja M.,
http://home.attbi.com/~pooja.mohan

 
 Respond to this message   

re: re Calling Crystal Report with Java - "Failed To Connect Server"

August 19 2002, 11:14 PM 

Hello Miss Pooja M.,

My IIS and SQL Server are installed in the same machine with SQL Server run in a mixed authentication mode.

I did follow the step to set the server's ODBC System DSN point to local but the result is the same as yesterday.

Meanwhile, i try to run the report in client, it is ok if i try
http://sia2000/cr8_report/report.rpt?init=actx
which use an Active X viewer
but failed ("failed to connect server") when i try
http://sia2000/cr8_report/report.rpt?init=java
which use a java bean viewer

Should i create a system DSN as well in my client machine? If yes, what would be the datasource name?
Use 'CE8' or the one 'imdas' that i use to make the report.rpt in server machine last time?

But actually, i have created both of them in my client machine but still have error message in my console
' Failed to Connect server'

Thanks For Your Help!

Cheung From SIA

 
 Respond to this message   
Pooja M.

re:Calling Crystal Report with Java - "Failed to Connect to Server "

August 20 2002, 2:12 PM 

Hello Mr. Cheung,

If you have developed the report on a different machine,other than the Server machine;then I am guessing you should ensure that the datasource is configured identically on each of the computers.(So,in your case,it should be imdas )

If you have distributed the Crystal Enterprise components (such as, Page Server(s), Job Server(s) etc.) to multiple computers, you must ensure that the data source is configured identically on each computer.

1. Click Start > Settings > Control Panel > ODBC Data Sources.

2. On the 'System DSN' tab locate and highlight the IMDAS data source that uses the SQL Server driver.

3. Click 'Configure'.

4. Verify that the data source is configured the same on the Page Server or Job Server as it is configured on the computer on which the problem report was designed.

There is also another possiblity :I would like you to visit

http://home.attbi.com/~pooja.mohan/files/scr_user_session_has_expired.pdf

which explains the Error "User Session has expired" and go through the 11thand 12th pages regarding "User Session has expired "Using Java Viewer"

Regards,

 



Pooja M.,
http://home.attbi.com/~pooja.mohan

 
 Respond to this message   

re: failed to onnect server

August 21 2002, 10:49 PM 

Hello, Pooja M,

I did follow the example that stated in the PDF file p12 and changed the SmartViewerJava.asp setting but the result was the same.

Meanwhile, i found that the server machine was installed with Java plugin 1.3.0_01 and the client machine was installed with Java plugin 1.4.0_01. Then i uninstalled 1.4.0-01 and reinstalled 1.3.0_01, the report on clinet machine seems to be alright.

Crystal report has announced that the java viwer did not support 1.4.0_01 and the case of failure has been verified.

Do you have any idea about where to get a lastest java viewer that can run under 1.4.0_01 as i cannot find any Hot Fixed that released by www.crystldecisions.com did consider this problem.

Thanks.

Cheung from SIA

 
 Respond to this message   
Pooja M.

re: Failed to Connect to Server

August 22 2002, 11:43 AM 

Hello Cheung,

First of all,I would like to thank you for letting us know where the problem actually lies?

I am really sorry.I really have no clue about this.I think it would be better if you enquire about this by contacting Crystal Decisions Customer Support Representatives directly.

Regards,



Pooja M.,
http://home.attbi.com/~pooja.mohan

 
 Respond to this message   
Current Topic - Calling CR with JavaBean- "Failed to Connect to Server"-CR8.5,CE8,Win2000,SQL2000
  << Previous Topic | Next Topic >>Return to Index  
Find more forums on Computers and InternetCreate your own forum at Network54
 Copyright © 1999-2010 Network54. All rights reserved.   Terms of Use   Privacy Statement  
Crystal Report Related Queries And Issues