Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still Struggling & Need Assistance
Message
Information générale
Forum:
ASP.NET
Catégorie:
Rapports
Divers
Thread ID:
01504280
Message ID:
01504425
Vues:
43
Did you implement any of the unhandled exceptions code that I posted earlier today?

Does this app run as a service?

It looks like you need to reinstall the .net framework - is this 32 bit or 64 bit? That will rule out all framework dependencies.

You can also verify all dependencies exist with this tool:
http://www.dependencywalker.com/

What concerns me is the location you are receiving the error at. It could be dependencies, .net framework 4 needs to be reinstalled, your app.config needs to be correct, registry setting for .net framework 4, etc...

Is this on a server? You can also try putting all *.dll files in the bin directory of the project. If the files are not in the directory then it will throw the error on a server. So when copying the files and folders make sure you copy all the dependencies (all the referenced class libraries, dlls, references, etc.,) along with them. Copy the "System" related dlls files there as well and test. That will tell you it is a dependency problem.

Does it work then? If so, make sure you have the properties set correctly on the prerequisites and other included assemblies so they will automatically be included in the deployment. I am still not clear what type of system you are trying to run this on at the client location?

When you verified your dependencies were installed, did you manually copy them over and register them or did your deployment package do it for you?

Are you sure you don't have anything in your app or service that is pointing to a different version of the .net framework?



>Ok folks, I just remoted in and ran it again. It failed, and the event log has 2 entries:
>
>
>Event Type:	Error
>Event Source:	.NET Runtime 4.0 Error Reporting
>Event Category:	None
>Event ID:	5000
>Date:		3/21/2011
>Time:		12:34:19 PM
>User:		N/A
>Computer:	TS1
>Description:
>EventType clr20r3, P1 abtech.spares.exe, P2 1.0.0.0, P3 4d86aade, P4 mscorlib, P5 4.0.0.0, P6 4ba1da6f, P7 2463, P8 0, P9 system.io.filenotfoundexception, P10 NIL.
>
>For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
>
>
>
>and
>
>Event Type:	Error
>Event Source:	.NET Runtime
>Event Category:	None
>Event ID:	1026
>Date:		3/21/2011
>Time:		12:34:32 PM
>User:		N/A
>Computer:	TS1
>Description:
>Application: Spares.exe
>Framework Version: v4.0.30319
>Description: The process was terminated due to an unhandled exception.
>Exception Info: <b>System.IO.FileNotFoundException</b>
>Stack:
>   at System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, Boolean, Boolean, Boolean)
>   at System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, Boolean, Boolean, Boolean)
>   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName, System.Security.Policy.Evidence, System.Threading.StackCrawlMark ByRef, Boolean, Boolean)
>   at System.Reflection.RuntimeAssembly.InternalLoadFrom(System.String, System.Security.Policy.Evidence, Byte[], System.Configuration.Assemblies.AssemblyHashAlgorithm, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
>   at System.Reflection.Assembly.LoadFrom(System.String)
>   at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr)
>
>
>For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
>
>
>Of course, there's no telling what file it's looking for.
>
>
>
>
>
>
>>Is it a 32 bit app or 64 bit? If 64, does it work at a client site when targeted for 32 bit? Another thing to check: Are all external referenced dll's in your app installed at the client site? did you verify the correct .net framework is installed? And do you have code in place to hand unhandled exceptions? Something like this:
>>
>>http://www.switchonthecode.com/tutorials/csharp-tutorial-dealing-with-unhandled-exceptions
>>http://www.codeproject.com/kb/dotnet/unhandledexceptions.aspx
>>http://stackoverflow.com/questions/3317319/strange-issue-with-the-vs2010-debugger
>>
>>or if separate threads:
>>http://stackoverflow.com/questions/4284986/c-catching-unhandled-exception-on-seperate-threads
>>
>>Look at Application.ThreadException and AppDomain.CurrentDomain.UnhandledException
>>
>>
>>>I am really stuck here. This app runs fine on my PC, bhut when I try to generate the report on the client's server, I'm getting
>>>
>>>
>>>---------------------------
>>>Application Error
>>>---------------------------
>>>Application has generated an exception that could not be handled.
>>>
>>>Process ID=0x16d8 (5848), Thread ID=0x1170 (4464).
>>>
>>>Click OK to terminate the application.
>>>Click CANCEL to debug the application.
>>>---------------------------
>>>OK   Cancel   
>>>---------------------------
>>>
>>>
>>>Here's the code:
>>>
>>>
>>>
>>>private void _RunReport()
>>>{
>>>    try
>>>    {
>>>
>>>        // The selected project Id
>>>        int ProjectId = (int)cboProjects.SelectedValue;
>>>
>>>        // Create the project object
>>>        csCOSApp.ActiveProject = new csCOSProject();
>>>        csCOSApp.ActiveProject.ProjectId = ProjectId;
>>>        csCOSApp.ActiveProject.LoadData();
>>>
>>>
>>>
>>>        // Get the report's data using info from the active project
>>>        List<DbParameter> Params2 = new List<DbParameter>();
>>>        Params2.Add(new SqlParameter { ParameterName = "@ProjectId", Value = ProjectId });
>>>        Params2.Add(new SqlParameter { ParameterName = "@PrimaryWhseId", Value = csCOSApp.ActiveProject.PrimaryWhseId });
>>>        Params2.Add(new SqlParameter { ParameterName = "@SecondaryWhseId", Value = csCOSApp.ActiveProject.SecondaryWhseId });
>>>
>>>        DataSet dsProjectInfo = csCOSApp.DataLayer.ExecuteQuery("ap_GetProjectReportData", Params2, CommandType.StoredProcedure);
>>>
>>>
>>>        // Create an instance of the Crystal .RPT file
>>>        rptCorporateViewReport reportObj = new rptCorporateViewReport();
>>>
>>>
>>>        // Set the report's data source to the DataTable
>>>        reportObj.SetDataSource(dsProjectInfo.Tables[0]);       // <=====   APP DIES HERE
>>>
>>>        // Assign the report to the viewer
>>>        crlReportViewer.ReportObject = reportObj;
>>>    }
>>>    catch (Exception e)
>>>    {
>>>        logMessage(e.ToString());
>>>        throw e;
>>>    }
>>>}
>>>
>>>While I have made some slow progress in getting to this point, I need to deliver this report right now. Anyone see anything here?
>>>
>>>Thanks
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform