Friday, June 29, 2012

List of TPC ports

list .

CuteFTP - use pro for interops!

I wasn't using pro and was knocking my head out why the dll wasn't working

Interop excel

I went through hell getting the right saveas format
until I started using
XlFileFormat.xlXMLSpreadsheet

thus:


workBook.SaveAs(path,
                 XlFileFormat.xlXMLSpreadsheet,
                Type.Missing, Type.Missing,
                false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
                Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);

CLR Errors - crashing without actually running

are usually caused by invalid references

to a windows program you can add the following for error handling in program.cs

  [STAThread]
        static void Main()
        {
            AppDomain.CurrentDomain.UnhandledException +=
            new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //CheckForShortcut();
            Application.Run(new Invoice());
        }

        static void CurrentDomain_UnhandledException
  (object sender, UnhandledExceptionEventArgs e)
        {
            try
            {
                Exception ex = (Exception)e.ExceptionObject;

                MessageBox.Show(ex.Message + ex.StackTrace,
                      "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
            finally
            {
                Application.Exit();
            }
        }

Tuesday, June 26, 2012

setting reporting service identity

having big problems with that , as the text box was greyed out. First I changed the apppool. After that I had to restart the services (otherwise got bizarre error) :
System.Runtime.InteropServices.COMException (0x800706B3)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Management.ManagementObject.Get()
   at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.SetWebServiceIdentity(String applicationPool)

Could not load file errors

Could not load file or assembly 'blah' or one of its dependencies. An attempt was made to load a program with an incorrect format.

could just mean  the apppool is not configured for 32 bit apps

In my case I converted a .net 2.0 asp.net project to 4.0. 

Surrogate Keys

in OLAP