Arduino A device attached to the system is not functioning.

I have arduino connected to usb with own power supply 3 x8 relays (24) 220V . Evry relay board (8) have their power supply, evrything works ok until i dont connect something to relay, i can turn on/off relay for as many times i want. After I connect something, lets say light bulb to the relay works for few times on/off but after that i get error in visual studio:

An exception of type 'System.IO.IOException' occurred in System.dll but was not handled in user code Additional information: A device attached to the system is not functioning.

Its obviusly hardware error, but i dont know what, and how to solve it, thank you for your help.

And the code for asp.net / C#:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO.Ports;

namespace Smart_House
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        SerialPort serijska_vrata;
        
        
       
        protected void Page_Load(object sender, EventArgs e)
        {
           
            Button3.Text = "\uf011";
            
            /*Inicializacija dropdownList*/

            DropDownList1.Items.Add("COM3");
            DropDownList1.Items.Add("COM2");
            DropDownList1.Items.Add("COM1");
            DropDownList1.Items.Add("COM4");
            DropDownList1.Items.Add("COM5");
            DropDownList1.Items.Add("COM6");
            DropDownList1.Items.Add("COM7");
            DropDownList1.Items.Add("COM8");
            DropDownList1.Items.Add("COM9");

            /*Inicializacija Serialport*/

            serijska_vrata = new SerialPort();
            serijska_vrata.PortName = DropDownList1.Text;
            serijska_vrata.BaudRate = 9600;
            
               
            
           
                
                
                
            
          
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
           
           
        }
        


        static bool on_off_namizna = false;
       
       
        protected void Button3_Click(object sender, EventArgs e)
        {
           
            
            
            if (on_off_namizna == false)
            {
               
                    serijska_vrata.Open();
                    serijska_vrata.Write("1");
                    button_style.Href = "Buttonon.css";
                    label_style.Href = "labelon.css";
                    on_off_namizna = true;
                    serijska_vrata.Close();
                    serijska_vrata.Dispose();
                
            
               
              }
            else if (on_off_namizna == true)
            {
               
                    serijska_vrata.Open();
                    serijska_vrata.Write("0");
                    button_style.Href = "Buttonoff.css";
                    label_style.Href = "labeloff.css";
                    on_off_namizna = false;
                    serijska_vrata.Close();
                    serijska_vrata.Dispose();
                
              
              }
            
        }

      
    }
}

hi. have you solve this problem? i have the same problem now.