2
Answers

Word file problem on server

aarohi verma

aarohi verma

12y
2.9k
1

Server Error in '/' Application.

Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80040154): Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).]
   Job_Seeker_resumeview.lnkdwnldres_Click(Object sender, EventArgs e) +440
   System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +113
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Answers (2)
0
Vulpes
NA 98.3k 1.5m 13y
You'll need to call Application.DoEvents() before Thread.Sleep(), otherwise the color changes will be cached by GDI+ and won't take effect until the method ends.

Here's how I'd do it. I'm assuming that the buttons all have different colors to start with and you want them to retain their colors when they are in sorted order. You don't need to deal with the case i == 5 as it will never be called:

        public void SwapColor(Button b1, Button b2)
        {
            Color tempColor = b1.BackColor;
            b1.BackColor = b2.BackColor;
            b2.BackColor = tempColor;
        }

        public void BubbleSort(int[] array, int Size)
        {
            int temp;

            for (int pass = 1; pass < Size; pass++)
            {
                for (int i = 0; i < Size - pass; i++)
                {
                    if (array[i] > array[i + 1])
                    {
                        if (i == 0)
                        {
                            SwapColor(btn1, btn2);
                        }
                        if (i == 1)
                        {
                            SwapColor(btn2, btn3);                       
                        }
                        if (i == 2)
                        {
                            SwapColor(btn3, btn4);
                        }
                        if (i == 3)
                        {
                            SwapColor(btn4, btn5);
                        }
                        if (i == 4)
                        {
                            SwapColor(btn5, btn6);
                        }
                       
                        Application.DoEvents();
                        Thread.Sleep(1000); // 2000 is a bit long 
                        temp = array[i];
                        array[i] = array[i + 1];
                        array[i + 1] = temp;
                    }
                }
            }
            a();
        }