Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1392
  • Last Modified:

Unable to connect: incorrect log on parameters. intermittent error message when trying to view a crystal report in an asp.net website.

I have an asp.net website hosted on an internal server running Server 2008 and IIS 7. This website has been in place for a while and has been working fine, then, last week we had an error in a crystal report on the website. The error is:

Error in File C:\Windows\TEMP\FactSheet {80059080-F1AB-4934-A9B1-D05F4A5EF3E1}.rpt: Unable to connect: incorrect log on parameters.

This error would show up anytime a user would try to view the report from any machine but the report name would change to reflect the temp report file. At the time, we restarted IIS completely and this solved the problem. Everything then worked fine until about 3 or 4 days later when the same error occurred again. This time, we restarted IIS on the default website and again, this solved the problem. I am hoping this doesn't become a routine for us to have to restart IIS every few days so I am hoping someone out there will have some advice for me.
0
footpaul
Asked:
footpaul
  • 6
  • 4
4 Solutions
 
mlmccCommented:
What version of Crystal?

What code is running the report?

mlmcc
0
 
footpaulAuthor Commented:
Users have Crystal 13 installed on their PC's but the reports in the website haven't been converted to Crystal 13, they are Crystal 11.

This is the code that loads the report:

CrystalView.ToolbarStyle.Width = New Unit("800px")
        report.Load(Server.MapPath(Session("Report")))
        If Session("Report") = "../Reports/History.rpt" Or Session("Report") = "../Reports/FactSheet.rpt" Then
            report.SetParameterValue(0, CInt(Session("ConsumerID")))
            report.SetDatabaseLogon("****", "********")
        End If
        CrystalView.ReportSource = report
        If Session("Report") = "../Reports/FactSheet.rpt" Then
            'Open connection
            Dim con As New SqlConnection()
            con.ConnectionString = "Data Source=*****;Initial Catalog=*********************;Integrated Security=True;Max Pool Size=200"
            con.Open()
            'Identify CCMS Data Entry Person
            Dim cmdCCMS As SqlCommand = New SqlCommand( _
            "SELECT ... FROM ...WHERE ...= '" & Session("User") & "' AND ... IN " & _
                "(SELECT ... FROM ...WHERE ...)", con)
            Dim iCCMS As Integer = cmdCCMS.ExecuteScalar
            'If Session("User") = sCCMS Or Session("User") = "***" Or Session("User") = "***" Or Session("User") = "***" Or Session("User") = "***" Then
            If iCCMS > 0 Or Session("User") = "***" Or Session("User") = "***" Or Session("User") = "***" Or Session("User") = "***" Or Session("User") = "***" Then
                btnExport.Visible = True
            Else
                btnExport.Visible = False
            End If
        End If

Open in new window

0
 
mlmccCommented:
Do the users have the CR XI runtime installed?

Which report is causing the problem or is it all reports?

Does the code clean up the report objects?  
It may be that there are too many reports still open even though the application has been closed.

mlmcc
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
footpaulAuthor Commented:
The Fact Sheet.rpt is the one we are having issues with although I haven't tried the other reports when the issue is occurring. The user pcs do have crystal 11 installed. Like I said, it is an intermittent problem, currently, everything is working fine, but after 3 or 4 days, we will get the log on error when trying to view the report, then we restart IIS and everything is back to normal again.
0
 
mlmccCommented:
Generally that means you aren't cleaning up the temporary files.  I don't see any code that destroys or closes the report objects.

I don't know how to do it in ASP but in VB6 we always used

    crRpt.Close
   SET crRpt = Nothing

mlmcc
0
 
footpaulAuthor Commented:
In the page unload event we do have the following:
Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
        report.Close()
        report.Dispose()
    End Sub

Open in new window

0
 
footpaulAuthor Commented:
I did find another post saying that if a user cancels the report or closes the browser at any point of opening/printing the report, this can cause the close and dispose code not to run, leaving the temp files open on the server. Their solution was restarting IIS at a scheduled off hours time (not a great solution in my mind) or running java script on the page to find the page close event and clean up the temp files then (also doesn't seem like the greatest solution and doesn't explain to me why this problem just started occurring).
0
 
mlmccCommented:
Unless people have started cancelling or closing the browser rather than closing the report first.
We avoided that with our VB6 application by disabling the close X and forcing them to close through the appropriate menu.  Thus we could clean up anything that was left open.
NOt sure if your ASP can do that or not.

How many simultaneous users might you have?
There is a limit within Crystal.  Not sure what it is.

mlmcc
0
 
footpaulAuthor Commented:
Well, I did find the source of our problem. Another member of our IT team was using an incorrect password in another application for the login we use to access and load our crystal reports. This in turn was locking out the account and leaving the temp files open. I appreciate your help.
0
 
footpaulAuthor Commented:
My reason for accepting my own solution is because while mlmcc had some good tips, he did not discover the actual factor causing our problem.
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now