Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inexplicable Crash
Message
From
06/04/2014 07:58:53
 
 
To
06/04/2014 01:58:11
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01598097
Message ID:
01598104
Views:
37
disagree ;-)
logging before and after each Getdescription/Add linepair might establish if those errors occur
somewhat randomly distributed across a dataload-weighted mean
or
clump on few/one particular table.
In second case, I'd start searching on the server, in first I's look at cable/network issues first.



>Stop logging. Use Windows Event Tracing.
>
>
>>Hi,
>>
>>I have the following code compiled into en executable and running successfully at multiple sites. At one site in particular the exe just crashes without any error displaying, just a notice from Windows that the exe has crashed. The Event Log shows this:
>>
>>Faulting application ProvisionClient.exe, version 1.0.0.0, time stamp 0x53408368, faulting module System.EnterpriseServices.Wrapper.dll, version 4.0.30319.18408, time stamp 0x5231093c, exception code 0xc0000005, fault offset 0x00015d65, process id 0x%9, application start time 0x%10.
>>
>>This is my code, any ideas what I can do to work out what is going wrong?
>>
>>
using System;
>>using System.Collections.Generic;
>>using System.Linq;
>>using System.Text;
>>
>>using System.Data;
>>using System.Data.SqlClient;
>>
>>using Microsoft.Synchronization;
>>using Microsoft.Synchronization.Data;
>>using Microsoft.Synchronization.Data.SqlServer;
>>
>>using System.Configuration;
>>using System.IO;
>>
>>namespace ProvisionServer
>>{
>>    class Program
>>    {
>>        static void Main(string[] args)
>>        {
>>            try
>>            {
>>                Console.WriteLine("Getting connection string");
>>                string serverConnection = ConfigurationManager.ConnectionStrings["Server"].ConnectionString;
>>
>>                // connect to server database
>>                Console.WriteLine("connect to server database");
>>                SqlConnection serverConn = new SqlConnection(serverConnection);
>>
>>                // define a new scope named CompleteScope
>>                DbSyncScopeDescription scopeDesc = new DbSyncScopeDescription("CompleteScope");
>>
>>                // add the description of all the tables from the database
>>                //DbSyncTableDescription tableDesc = SqlSyncDescriptionBuilder.GetDescriptionForTable("Accounts", serverConn);
>>
>>                // add the table description to the sync scope definition
>>                //scopeDesc.Tables.Add(tableDesc);
>>
... // lots of unDRY code snipped

>>                tableDesc = SqlSyncDescriptionBuilder.GetDescriptionForTable("Vendors", serverConn);
>>                scopeDesc.Tables.Add(tableDesc);
>>
>>                tableDesc = SqlSyncDescriptionBuilder.GetDescriptionForTable("VFPCommands", serverConn);
>>                scopeDesc.Tables.Add(tableDesc);
>>
>>                // create a server scope provisioning object based on the ProductScope
>>                SqlSyncScopeProvisioning serverProvision = new SqlSyncScopeProvisioning(serverConn, scopeDesc);
>>
>>                // skipping the creation of table since table already exists on server
>>                serverProvision.SetCreateTableDefault(DbSyncCreationOption.Skip);
>>
>>                // start the provisioning process
>>                serverProvision.Apply();
>>            }
>>            catch (Exception error)
>>            {
>>                using (StreamWriter tw = new StreamWriter("BPOSync.log", true))
>>                {
>>                    // write a line of text to the file
>>                    tw.WriteLine(DateTime.Now);
>>                    tw.WriteLine("Error");
>>                    tw.WriteLine(error.ToString());
>>                    //tw.WriteLine(error.InnerException); 
>>                    tw.WriteLine("---");
>>
>>                    // close the stream
>>                    tw.Close();
>>                }
>>            }
>>        }
>>    }
>>}
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform