[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Thread is being aborted

Posted on 2011-10-11
12
Medium Priority
?
553 Views
Last Modified: 2012-05-12
I have a web grid view with a couple of command objects.  ONe is Print, the other is Edit and the other is close.  I can click edit and it goes to the next page, and I can edit the form.  I click print and I get "Thread is being aborted."  Both the print and edit pages are in the same folder and as you can see I am using server.transfer to get to the page.  I used server.transfer to try and get to the print page, but I get the error.  I have attached the main form with the code.  As well as the page I am going to.  I think it is having a problem loading the report.  I works fine on the developement comnputer

thanks
 
Private Sub gvInspections_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles gvInspections.RowCommand

        Dim i As Integer = CInt(e.CommandArgument)
        Dim mWO As String = sender.rows(i).cells(0).text
        Dim mPropertyID As String = ddProperties.Text
        Try

            Select Case e.CommandName
                Case Is = "Print"
                    Server.Transfer("InspectionReportsForm.aspx?WO=" + mWO + "&Type=1&PropName=" + mPropertyID)
                Case Is = "Edit"
                    Response.Redirect("MOInspectionsEdit.aspx?WO=" + mWO + "&Type=1&PropName=" + mPropertyID, False)
                    'Server.Transfer("MOInspectionsEdit.aspx?WO=" + mWO + "&PropName=" + mPropertyID)
                Case Is = "Close"
                    Dim test2 As String = ""
            End Select
        Catch ex As Exception
            Session.Add("oError", ex.Message)
            Server.Transfer("..\Errors.aspx")
        End Try

        
    End Sub

Open in new window

Protected Function PrintCharges() As Boolean
        Dim rd As New ReportDocument
        Dim rptDS As New DataSet
        Dim rptDS2 As New DataSet
        Dim myCmd As New SqlCommand
        Dim da As New SqlDataAdapter
        ' Dim myConn As String = "SERVER=10.10.10.44,8433;Database=AptGalleryInspections;uid=sa;pwd=sh4207"
        'Dim cn As New SqlConnection(myconn)

        Dim myfilelocation As String = Server.MapPath("\Reports\MOInspectionsReport_Resident_web.rpt")
        
        Try
            rd.Load(myfilelocation)
            ' SetCurrentValuesForParameterField(rd, "mWO_number", "mPropertyName")
            rd.SetParameterValue(0, mWO_Number)
            rd.SetParameterValue(1, mPropertyName)

           
            rd.SetDatabaseLogon("sa", "sh4207", "10.10.10.44,8433", "AptGalleryInspections")
            Dim logon As New TableLogOnInfo
            Dim tbl As Table
            Dim subReport As ReportDocument
            For Each subReport In rd.Subreports
                For Each tbl In subReport.Database.Tables
                    logon = tbl.LogOnInfo
                    logon.ConnectionInfo.ServerName = "10.10.10.44,8433"
                    logon.ConnectionInfo.DatabaseName = "AptGalleryInspections"
                    logon.ConnectionInfo.UserID = "sa"
                    logon.ConnectionInfo.Password = "sh4207"
                    tbl.ApplyLogOnInfo(logon)
                Next
            Next
            CR1.ReportSource = rd
        
        Catch ex As Exception
            Session.Add("oError", ex.Message)
            Server.Transfer("..\Errors.aspx")
        End Try

        
    End Function

Open in new window

0
Comment
Question by:mgmhicks
  • 6
  • 4
  • 2
12 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 36953533
In print case, instead of
  Server.Transfer("InspectionReportsForm.aspx?WO=" + mWO + "&Type=1&PropName=" + mPropertyID)
try

   Response.Redirect("InspectionReportsForm.aspx?WO=" + mWO + "&Type=1&PropName=" + mPropertyID, False)
0
 

Author Comment

by:mgmhicks
ID: 36953552
I tried that with same result.  I have a feeling it's not able to find report.
0
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 36953565
Try to find error by debugging the application (on clicking the print button) and let me know the error.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36954275
Did you step through the code to find out what line of code is throwing the error?

By the way, this

Server.MapPath("\Reports\MOInspectionsReport_Resident_web.rpt")

should be

Server.MapPath("/Reports/MOInspectionsReport_Resident_web.rpt")
0
 

Author Comment

by:mgmhicks
ID: 36956238
Why does it work on developement and not on production machine?  Thats whats really making me confused.  I cant step through cause it works on developement, and errors on production.

0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36959116
I think the error is being thrown by Crystal due to some configuration issue. Have you granted iusr full access to temp files?
0
 

Author Comment

by:mgmhicks
ID: 36959123
Man codeCruiser I would agree with you. What folder is the temp files going to be in?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 36959181
Its usually C:\users\username\...

Try using Process Monitor (free) to see what path its trying to access and getting access denied errors.
0
 

Author Comment

by:mgmhicks
ID: 36959377
hate to be a pain but should I filter on.  Ran the website called esitecompanion and did a search on it and it found nothing.  So what should I filter on?  Thanks again for helping
0
 

Author Comment

by:mgmhicks
ID: 36959470
think I may have found something.  this is between a success read of report file, and a line that goes to the error page.  Now what does it mean?

Date & Time:      10/12/2011 7:45:58 PM
Event Class:      Registry
Operation:      RegOpenKey
Result:      NAME NOT FOUND
Path:      HKU\.DEFAULT\Software\Business Objects\Suite 12.0\Crystal Reports\Locale
TID:      8564
Duration:      0.0000176
Desired Access:      Read
0
 

Author Comment

by:mgmhicks
ID: 36959655
CodeCruiser this looks like the problem maybe.  I did give rights to iuser to the windows\temp folder, but it creates the temp file, but ten it cant

Date & Time:      10/12/2011 8:57:32 PM
Event Class:      File System
Operation:      CreateFile
Result:      ACCESS DENIED
Path:      C:\Windows\Temp\MOInspectionsResidentWeb {ABD569B1-2235-49B8-9B8A-2661168CC052}.rpt
TID:      5244
Duration:      0.0000299
Desired Access:      Generic Read
Disposition:      Open
Options:      Synchronous IO Non-Alert, Non-Directory File
Attributes:      N
ShareMode:      Read, Write, Delete
AllocationSize:      n/a
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36965370
Yeah that's the problem most likely. Did you give it full control? Also see if there is a ASPNET user and give it full access as well.
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question