Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8396475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:32:45+00:00 2026-06-09T20:32:45+00:00

When I start the application I’m getting the exception what could it be ?

  • 0

When I start the application I’m getting the exception what could it be ?

The exception is on the line in the constructor:

checkBox1.Checked = Options_DB.Get_Automatic_Start();

This is the options_db class but I used a breakpoint there and it never get to the options_db

This is in form1 the constructor where the exception fire up:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using DannyGeneral;
using System.Drawing.Drawing2D;

namespace Batch_Images_Convertion
{
    public partial class Form1 : Form
    {
        int i;
        bool cancel_;
        bool automatic_;
        public Form1()
        {

            InitializeComponent();
            i = 0;
            automatic_ = false;
            checkBox1.Checked = Options_DB.Get_Automatic_Start();

It never continues beyond this line.

This is the exception error message:

System.TypeInitializationException was unhandled
  Message=The type initializer for 'Batch_Images_Convertion.Options_DB' threw an exception.
  Source=Batch_Images_Convertion
  TypeName=Batch_Images_Convertion.Options_DB
  StackTrace:
       at Batch_Images_Convertion.Options_DB.Get_Automatic_Start()
       at Batch_Images_Convertion.Form1..ctor() in D:\C-Sharp\Batch_Images_Convertion\Batch_Images_Convertion\Batch_Images_Convertion\Form1.cs:line 26
       at Batch_Images_Convertion.Program.Main() in D:\C-Sharp\Batch_Images_Convertion\Batch_Images_Convertion\Batch_Images_Convertion\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.IO.DirectoryNotFoundException
       Message=Could not find a part of the path 'C:\Users\Chocolade\AppData\Local\Microsoft\Batch_Images_Convertion\settings\settings_convertion.txt'.
       Source=mscorlib
       StackTrace:
            at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
            at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
            at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
            at System.IO.File.Create(String path)
            at DannyGeneral.OptionsFile..ctor(String settings) in D:\C-Sharp\Batch_Images_Convertion\Batch_Images_Convertion\Batch_Images_Convertion\OptionsFile.cs:line 72
            at Batch_Images_Convertion.Options_DB..cctor() in D:\C-Sharp\Batch_Images_Convertion\Batch_Images_Convertion\Batch_Images_Convertion\Options_DB.cs:line 25
       InnerException: 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:32:46+00:00Added an answer on June 9, 2026 at 8:32 pm

    Looks like its trying to load the file 'C:\Users\Chocolade\AppData\Local\Microsoft\Batch_Images_Convertion\settings\settings_convertion.txt' but the directory settings doesn’t exist.

    In your constructor, check to make sure the directory exist by doing:

    Directory.Exists(@"path\to\your\folder")
    

    Before trying to access the file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Qt. I could not find the function or class to start application
On application start I'm creating Config object (Singleton). How could I make Config object
I am getting the following message while installing my application: You cannot start application
I know that using process or processbuilder class in java I can start application.
I've never done a Java Web start application before. I wrote my app's JNLP
I have a Java Web Start application. I specify the resource (jars, images, etc)
I don't know how make my application as auto start application.That is my expectation
I'm going to develop a java web start application, which need to access protected
I want to start manage application ( Settings -> Application -> manage application ->
I want to start an application which will use ajax push, however the web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.