cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying asp.net project / access failed in reportviewer

former_member364076
Participant
0 Kudos

Hi. I'm not able to display the report..

I'm preparing the production server:

. i've installed s.o. = Windows Server 2003 with all patches

. i've added the application role (II6)

. i've installed last runtime for Crystal Report 2008 and .net = CRRuntime_12_1_mlb.msi

. i've deployed my aaplication on the default web site

Result: the site's pages works fine except for displaying my reports! In the position of the report appears a message (in italian: Accesso al database non riuscito) like database access failed..

I don't understand the cause:

- i'm using the same sources working fine on 2 other environment machine (Vista SP1 and another Windows Server 2003)

- the user for database login is written in code, like the Microsoft practices:


private void SetDBLogonForReport()
    {
        ConnectionInfo conn = new ConnectionInfo();
        //conn.Type = ConnectionInfoType.SQL;
        conn.ServerName = "name_server";
        conn.DatabaseName = "name_db";
        conn.UserID = "user";  
        conn.Password = "pwd"; 

        TableLogOnInfo LInfo = new TableLogOnInfo();

        foreach (CrystalDecisions.CrystalReports.Engine.Table table in myReport.Database.Tables)
        {
            LInfo = table.LogOnInfo;
            LInfo.ConnectionInfo = conn;
            table.ApplyLogOnInfo(LInfo);
        }
    }

- the app don't cause exceptions (i've run it in debug mode directly on the server without problems

Maybe the message is misleading and the cause is not about db?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Can you create a udl file and see if the database can be accessed from the server machine?

For this you need to:

1) Create a txt file and change the extension to udl.

2) Open the file.

3) Select the provider, database and test the connection.

Thanks.

former_member364076
Participant
0 Kudos

Trying to configure .udl i have noted than in the provider list SQL Native Client (necessary for SQL Server 2005 I suppose) was not present.

I've installed that on the new server and the report is appeared!!

Thank you very much

PS: an unusual behavior because in the app i open 2 connections to the same SQL2005 db with 2 different users, and only the connection/user used by the .rpt files to access data was giving problem...

Former Member
0 Kudos

Hi,

Good to see you are up and running.

Since we are using a web application we need to have permissions for specific users under which the application is running in IIS so that the w3wp process gets complete control.

Thanks.

AG.

former_member364076
Participant
0 Kudos

i don't understand your last consideration.. what do you mean with 'the users under which the application is running in IIS'?

Former Member
0 Kudos

Well not entirely, basically in IIS6 its w3wp worker process that is responsible for running any application so giving the IIS_WPG full control should help us.

Helps?

Regards,

former_member364076
Participant
0 Kudos

Your considerations give me some questions:

- you say about user permissions but which folders are interested? Can i set security for user IUSR_SERVERNAME instead of user you indicated?

- note that to solve my problem it has been enough installing the SQL Native Client to allow reports to connect to data

Former Member
0 Kudos

HI,

Ya, I know that we needed the SQL Client. I just mentioned that because I though this might help you too.

Regards,

AG.

Answers (0)