my problem is i just finished a C# program using visual studio 2012 , sql server management studio 2014 , sap crystal report and .net framework 4.5.1
this is not my first program i finish using these programs by the way
then i created a setup file and copied it to another pc and tried to start it but the program don't start or even give me an error message so i tried on of my old programs on the same pc which i made in the same way it worked
so what should i do ?
by the way this pc i setup .net framework 4.5.1 on , sap crystal report runntime and the same sql server version
this is the error in the windows event log
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2016-01-18T01:22:02.000000000Z" />
<EventRecordID>6715</EventRecordID>
<Channel>Application</Channel>
<Computer>Tota-pc</Computer>
<Security />
</System>
- <EventData>
<Data>
Application: FALCON HR.exe Framework Version: v4.0.30319
- List item
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Data.SqlClient.SqlException
Stack:
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory, System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory, System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>)
at System.Data.SqlClient.SqlConnection.TryOpen(System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(System.Data.DataSet, System.Data.DataTable[], Int32, Int32, System.String, System.Data.IDbCommand, System.Data.CommandBehavior)
at System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable[], Int32, Int32, System.Data.IDbCommand, System.Data.CommandBehavior)
at System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable)
at FALCON_HR.DAL.DataAccessLayer.SelectData(System.String, System.Data.SqlClient.SqlParameter[])
at FALCON_HR.BL.CLS_SHAPE.get_shape_state()
at FALCON_HR.FRM_LOGIN..ctor() at FALCON_HR.Program.Main()
</Data>
</EventData>
</Event>
SOLVED: this all was about the connection, i gave the program a server name that was not exist any where but my computer .
Thank you all for your attention & your answers .
Related
BACKGROUND:
I'm having a problem with a ClickOnce WindowsForms NET 4.8 App that now is composed of a Solution with 2 projects.
All began after auto generated certificate expired after 2 y. I do not know if it is relevant, but at the beginning it was only one project that I split in two and used the same generated key for both.
So, I generated new on signing Tab, with Create Test Certificate (wish I had known about extend life of old one... but now it is deleted) and, because they are two projects, with 2 Apps (but I'm using Model and Services from the other) I generated one Test Certificate for each.
At Signing Tab the option sign the ClickOnce manifests is checked, but not the Sign the assembly (neither before were).
I can build, run, debug and use it normally; but, if try to Publish to the same place as before I receive the msg:
The application is signed with a different key than the existing
application on the server. Do you want to overwrite it?
As it is a development phase still, I do not care about it and overwrote it.
CURRENT PROBLEM:
App is Published, but it not starts, and gives no clue or msg.
At the Program.cs I have, of course:
Static async Task Main()
{
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += ApplicationOnThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
//...
}
How I tried to investigate:
So, I changed my Output folder and of course there is no more ... application is signed with a different key than ... but the App still doesn't starts and gives no msg. Same behavior in two other Windows 10 PCs.
I'm using VS 2022 64 bits and Windows 10, both fully updated as always.
After I saw this I changed to Create application without a manifest to no avail.
I went to the event viewer console and there is two error msgs, at same TimeStamp:
The first one is:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2022-03-18T14:52:57.3515638Z" />
<EventRecordID>226871</EventRecordID>
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Channel>Application</Channel>
<Computer>Computer-NAME</Computer>
<Security />
</System>
- <EventData>
<Data>Application: applaunch.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Information: exception code e0434352, exception address 00007FFA01334F69 Stack:</Data>
</EventData>
</Event>
The second one:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>100</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2022-03-18T14:52:57.5775648Z" />
<EventRecordID>226872</EventRecordID>
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Channel>Application</Channel>
<Computer>Computer-NAME</Computer>
<Security />
</System>
- <EventData>
<Data>applaunch.exe</Data>
<Data>4.8.4084.0</Data>
<Data>5dda4211</Data>
<Data>KERNELBASE.dll</Data>
<Data>10.0.19041.1566</Data>
<Data>0833f2d4</Data>
<Data>e0434352</Data>
<Data>0000000000034f69</Data>
<Data>13368</Data>
<Data>01d83ad7dade31c5</Data>
<Data>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\applaunch.exe</Data>
<Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>
<Data>507e79be-c718-4d23-bab8-f153b4601c3b</Data>
<Data />
<Data />
</EventData>
</Event>
Lastly, I unchecked the Sign the ClickOnce manifests; the behavior remains the same and the vanilla error msgs at Event Viewer too.
If I understand correctly, because of none my global error handlers catch it, I'm assuming that the error is firing before any of my code is even loaded in memory and it is related to the certificate changing, but I'm not sure. I'm lost in how to further investigate it. Any directions?
TIA
EDIT 1:
To further investigate I enabled the verbose installation.log as per these instructions.
To my surprise both the functioning version (published with the non-expired key) and the new one (with the new key) output the same installation.log. With this weary information I went to Published folders (%AppData%\Local\Apps\2.0...) and to my further surprise I could instantiate not only the Operational App - with a different behavior regarding displayed version number - but could initiate the missing new version App from its Published folder.
And yes, I correct filled Publisher name and Product name.
After so much time entangled with this error, I:
followed the advise of this thread and I created entirely different solution/projects, from scratch, and I copied all my files (.cs, forms, assets...) to the new one.
adjusted namespaces and installed the needed Nuget packages and references.
signed the ClickOnce manifests with the Create Test Certificate as usual, but few minutes after I changed the duration of .pfk key to several years; it must be done BEFORE it ever expires, and I'll forget for sure; so, did it in sequence because, if after, no effect at all...
I'm back to the game, publishing again!
PS: I never more will let a temporary certificate expires...
I have this Entity Framework based web service code developed in VS2015 that has been working fine - until my system got replaced with a new one. On a fresh new system, I am unable to compile the code in the same version of Visual Studio even though I have all the dependencies installed - including the Oracle 11.2 Client Runtime (which says it, "installs tools for developing applications, networking services and basic client software").
When I build the solution in VS2015, the error thrown is: Error 175: The ADO.NET provider with invariant name 'Oracle.DataAccess.Client' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.
Double-clicking the error takes me to the EDMX File pointing to and the EDMX file tag StorageModels > Schema:
<Schema Namespace="Model.Store" Alias="Self" Provider="Oracle.DataAccess.Client" ProviderManifestToken="11.2" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
Interestingly, the DLL file gets created (ins spite of the above error) but when I replace the existing DLL on the server with this new one it seems to have issues extracting data from the database with something like:
System.ArgumentException: The specified store provider cannot be found in the configuration, or is not valid. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
--- End of inner exception stack trace ---
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
at System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection)
at System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config)
at System.Data.Entity.Internal.LazyInternalConnection.Initialize()
at System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel()
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate)
at MyCo.MyDept.MyIntegration.MyService.DataAccess.DAL.GetLocation() in C:\Users\xxxx\MyCo.MyDept.MyIntegration.MyService\DataAccess\DAL.cs:line 17
at MyCo.MyDept.MyIntegration.MyService.Utility.Helpers.GetLocations() in C:\Users\xxxx\MyCo.MyDept.MyIntegration.MyService\Utility\Helpers.cs:line 303
at MyCo.MyDept.MyIntegration.MyService.KService.GetLocations() in C:\Users\xxxx\MyCo.MyDept.MyIntegration.MyService\KService.svc.cs:line 71
I have tried the solutions provided in other similar threads but none of them seem to work. Any help is appreciated. Thanks.
Late answer but this still comes up a lot if you are connecting Visual Studio with Oracle. If you have repeatedly installed and uninstalled ODT and are still getting this error, this is what worked for me:
In Visual Studio, go to Tools -> Options
You should find Oracle Developer Tools, if not you have not installed ODT correctly
Open Oracle Developer Tools, click General
This will magically wake up ODT to complete its installation
Running Visual Studio 2019.
Check whether you have following in the config file. If not add them accordingly.
Have manageddataaccess <configSection>
<configSections><section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /></<configSections>
Provider under <entityFramework>
<entityFramework>
<providers>
<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</providers></entityFramework>
Provide factory details under <system.data>
<system.data>
<DbProviderFactories>
<remove invariant="Oracle.ManagedDataAccess.Client"/>
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</DbProviderFactories>
Expanding on Evan's answer, here are screen shots, clicking the Oracle Developer Tools option, this pops up:
Upon reopening solution, 2 new files were added:
I am trying to use Entity Framework with Sybase SQL Anywhere 16 and database first. I have successfully integrated SQL Anywhere into Visual Studio over SetupVSPackage. I also have added the correct data provider like this:
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="iAnywhere.Data.SQLAnywhere"
type="iAnywhere.Data.SQLAnywhere.SAProviderServices, iAnywhere.Data.SQLAnywhere.EF6, Version=16.0.0.21274, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />
</providers>
</entityFramework>
But now I have the problem that when I try to add a data model, nothing happens, no files were added. If I start Visual Studio with administration access, it simply crashes.
Did anyone get SQL Anywhere 16 working with Entity Framework 6 database first?
Edit
If I start visual studio with devenv.exe /log , the created log file does not contains any error messages. Even the windows eventlog does not contain any error messages.
Thank you!
I have a project with Output Type of Console Application that sometimes fails to start up when I debug. When this happens, may app starts to run and write to the vshost.exe console that is hosting the process being debugged. Then all of a sudden I will see a message in the Output window that says something like "The program '[13476] MyApp.vshost.exe' has exited with code -1 (0xffffffff)."
It doesn't happen every time, but when it does the Console Window my app started up in freezes on the screen and the debugger seems to halt. However, the vshost.exe process does not actually stop (I can see it in Task Manager with the same Process ID as the error message). It is as if Visual Studio thinks the process has exited, but it really has not. When I stop the debugger, the console window remains frozen on the screen as well. The only way to get the debugger to work again is to shutdown and restart VS.
This also happens if I have the Visual Studio hosting process turned off. The application only has one exit point in the Main method and when this happens a breakpoint on that line of code is not hit.
I cannot figure out how to get any more detail about why this is happening to troubleshoot further. I have put code in the AppDomain.CurrentDomain.UnhandledExcpetion handler as well as the Application.ApplicationExit handler, but they are not being hit when this problem occurs. I also don't see anything in the Windows event log, etc.
Output Window sample
...
'MyApp.vshost.exe' (CLR v4.0.30319: MyApp.vshost.exe): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll'.
Cannot find or open the PDB file.
'MyApp.vshost.exe' (CLR v4.0.30319: MyApp.vshost.exe): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll'.
Cannot find or open the PDB file.
'MyApp.vshost.exe' (CLR v4.0.30319: MyApp.vshost.exe): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Diagnostics.ServiceModelSink\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll'.
Cannot find or open the PDB file.
'MyApp.vshost.exe' (CLR v4.0.30319: MyApp.vshost.exe): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'.
Skipped loading symbols. Module is optimized and the debugger option
'Just My Code' is enabled.
The thread 0xf18 has exited with code 259 (0x103).
The thread 0x2928 has exited with code 259 (0x103).
The thread 0x3654 has exited with code 259 (0x103).
The program '[13476] MyApp.vshost.exe' has exited with code -1
(0xffffffff).
I found the events below in the event log. However, it was in a weird spot I’ve never looked before Event Viewer -> Custom Views -> Administrative Events. This lead me to the MS KB http://support.microsoft.com/kb/2773443.
The MyApp project is targeting .NET 4.0 and I recently have installed Visual Studio 2013 on my laptop (.NET 4.5), which is around the time the issue started to occur. So I assume this is my issue.
What I don’t understand is why this exception wasn’t raising the AppDomain.UnhandledExcpetion event in my MyApp project and instead was silently terminating the process. The WCF service that was causing this issue was being started from a new thread that was being kicked off, but I think exceptions in this thread should still raise the AppDomain.UnhandledExcpetion event. I verified the UndhandledException handler is working in my application.
To resolve this, I have moved the startup of this service to its own project that targets .NET 3.5 and x86. This more mimics how we run the application in production anyway so it works for me. There is a patch and various work arounds in the Microsoft KB as well.
I hope this helps someone, I was beating my head against the wall trying to figure out how to even get the exception that was causing my issue.
Log Name: Application
Source: .NET Runtime
Date: 1/21/2014 9:09:23 AM
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: DUDELT
Description:
Application: MyApp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ServiceModel.AddressAlreadyInUseException
Stack:
at System.ServiceModel.Channels.TransportManager.Open(System.ServiceModel.Channels.TransportChannelListener)
at System.ServiceModel.Channels.TransportManagerContainer.Open(System.ServiceModel.Channels.SelectTransportManagersCallback)
at System.ServiceModel.Channels.TransportChannelListener.OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.TcpChannelListener`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan)
at System.ServiceModel.Channels.ReliableChannelListenerBase`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan)
at System.ServiceModel.ServiceHostBase.OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open()
at MyApp32.MyApp32.Main()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-01-21T14:09:23.000000000Z" />
<EventRecordID>287767</EventRecordID>
<Channel>Application</Channel>
<Computer>DUDELT</Computer>
<Security />
</System>
<EventData>
<Data>Application: MyApp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ServiceModel.AddressAlreadyInUseException
Stack:
at System.ServiceModel.Channels.TransportManager.Open(System.ServiceModel.Channels.TransportChannelListener)
at System.ServiceModel.Channels.TransportManagerContainer.Open(System.ServiceModel.Channels.SelectTransportManagersCallback)
at System.ServiceModel.Channels.TransportChannelListener.OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.TcpChannelListener`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan)
at System.ServiceModel.Channels.ReliableChannelListenerBase`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan)
at System.ServiceModel.ServiceHostBase.OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open()
at MyApp32. MyApp 32.Main()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
</Data>
</EventData>
</Event>
Log Name: Application
Source: Application Error
Date: 1/21/2014 9:09:23 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: DUDELT
Description:
Faulting application name: MyApp.exe, version: 0.0.0.0, time stamp: 0x52dd9b89
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18229, time stamp: 0x51fb1116
Exception code: 0xe0434352
Fault offset: 0x0000c41f
Faulting process id: 0x3ac0
Faulting application start time: 0x01cf16b23d49d636
Faulting application path: C:\MyApp\MyApp\bin\Debug\MyApp.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: a0b3e605-82a5-11e3-ab71-0021cc6f2033
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-01-21T14:09:23.000000000Z" />
<EventRecordID>287768</EventRecordID>
<Channel>Application</Channel>
<Computer>DUDELT</Computer>
<Security />
</System>
<EventData>
<Data>MyApp.exe</Data>
<Data>0.0.0.0</Data>
<Data>52dd9b89</Data>
<Data>KERNELBASE.dll</Data>
<Data>6.1.7601.18229</Data>
<Data>51fb1116</Data>
<Data>e0434352</Data>
<Data>0000c41f</Data>
<Data>3ac0</Data>
<Data>01cf16b23d49d636</Data>
<Data>C:\code\MyApp\MyApp\bin\Debug\MyApp.exe</Data>
<Data>C:\Windows\syswow64\KERNELBASE.dll</Data>
<Data>a0b3e605-82a5-11e3-ab71-0021cc6f2033</Data>
</EventData>
</Event>
I hit the same issue, and it looks a .net undocumented issue. But you can mitigate it as follow:
find the portion of code that fail, and follow the class that you try to read.
add a default constructor for that class. The serialization in some case needs a default constructor to create the objects, and this is the actual issue.
Hope this works for future generations who will search for this error! :)
D
I wrote an application using SMO it installs and runs fine on my dev pc, even installing in another location and running it,
but when i move it to another machine it gives the following error
Log Name: Application
Source: .NET Runtime
Date: 4/10/2012 12:03:56 PM
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: ip-0A3AF6C2
Description:
Application: DataExport.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.SqlServer.Management.Common.ConnectionFailureException
Stack:
at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
at DataExport.Data.SqlDataService.GetTableNames(System.String)
at DataExport.Adapter.DataExportAdapter.GetTableNames(System.String)
at DataExport.DataExportForm.SetInitialEditDisplay(DataExport.Adapter.IDataExportAdapter)
at DataExport.DataExportForm..ctor(DataExport.Adapter.IDataExportAdapter)
at DataExport.Program.Main()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-04-10T11:03:56.000Z" />
<EventRecordID>72945</EventRecordID>
<Channel>Application</Channel>
<Computer>ip-0A3AF6C2</Computer>
<Security />
</System>
<EventData>
<Data>Application: DataExport.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.SqlServer.Management.Common.ConnectionFailureException
Stack:
at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
at DataExport.Data.SqlDataService.GetTableNames(System.String)
at DataExport.Adapter.DataExportAdapter.GetTableNames(System.String)
at DataExport.DataExportForm.SetInitialEditDisplay(DataExport.Adapter.IDataExportAdapter)
at DataExport.DataExportForm..ctor(DataExport.Adapter.IDataExportAdapter)
at DataExport.Program.Main()
</Data>
</EventData>
</Event>
I have no idea how to solve this, the SMO dlls are included in the package
Is there any possiblility that the older version of smo (pre 10) is overriding the dlls included?
OK the solution is that SMO 10 is only for Server 2008, it will not work with 2005 SQL Express
So the answer was to lower the version to 9.0