【发布时间】:2012-08-22 01:14:33
【问题描述】:
每当我尝试在不是我的机器上启动我的应用程序时,它都会在启动时崩溃。我不知所措,做了很多没有解决办法的搜索。没有真正的错误,我只是让标准 Windows 7 没有响应。所有机器都是win7Pro 64和.net4。我在下面看到事件查看器日志。
事件 ID 1000:
Faulting application name: MarketingRequests.exe, version: 1.0.0.0, time stamp: 0x5033e787
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4a5bdbdf
Exception code: 0xe0434352
Fault offset: 0x0000b9bc
Faulting process id: 0x1ecc
Faulting application start time: 0x01cd7fe56831cfd9
Faulting application path: C\Intranet\MarketingRequests.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: a78399b1-ebd8-11e1-9474-f04da20e6eaf
我还看到事件 ID 1026,.net 运行时:
Log Name: Application
Source: .NET Runtime
Date: 8/21/2012 9:08:53 PM
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: CORRIE-Z.msing.local
Description:
Application: ExpenseReport.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
Stack:
在 System.Data.Linq.SqlClient.SqlProvider.Execute(System.Linq.Expressions.Expression, QueryInfo, System.Data.Linq.SqlClient.IObjectReaderFactory, System.Object[], System.Object[], System. Data.Linq.SqlClient.ICompiledSubQuery[], System.Object)
在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(System.Linq.Expressions.Expression,QueryInfo[],System.Data.Linq.SqlClient.IObjectReaderFactory,System.Object[],System.Data.Linq.SqlClient.ICompiledSubQuery [])
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(System.Linq.Expressions.Expression)
在 System.Data.Linq.DataQuery1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].System.Linq.IQueryProvider.Execute[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Linq.Expressions.Expression)
at System.Linq.Queryable.First[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Linq.IQueryable1)
在 ExpenseReport.frmMain.refreshEmpInfo()
在 ExpenseReport.frmMain..ctor()
在 ExpenseReport.Program.Main()
事件 XML:
1026
2
0
0x80000000000000
26474
应用
CORRIE-Z.msing.local
应用程序:ExpenseReport.exe
框架版本:v4.0.30319
说明:进程因未处理的异常而终止。
异常信息:System.InvalidOperationException
堆:
在 System.Data.Linq.SqlClient.SqlProvider.Execute(System.Linq.Expressions.Expression,QueryInfo,System.Data.Linq.SqlClient.IObjectReaderFactory,System.Object[],System.Object[],System.Data.Linq .SqlClient.ICompiledSubQuery[], System.Object)
在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(System.Linq.Expressions.Expression,QueryInfo[],System.Data.Linq.SqlClient.IObjectReaderFactory,System.Object[],System.Data.Linq.SqlClient.ICompiledSubQuery [])
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(System.Linq.Expressions.Expression)
在 System.Data.Linq.DataQuery1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].System.Linq.IQueryProvider.Execute[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Linq.Expressions.Expression)
at System.Linq.Queryable.First[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Linq.IQueryable1
【问题讨论】:
-
"所有机器都是win7Pro 64"。您的机器可能是 32 位的,并且您有 32 位的依赖项,而只是其他所有的都是 64 位的?如果这是真的,并且您使用“Any CPU”目标选项进行编译,则会产生这个错误,或者非常接近它。
-
我的机器是 32 位的。我解决了这个问题。这是 sql 数据库权限。
标签: c# .net winforms c#-4.0 linq-to-sql