Showing posts with label Troubleshooting. Show all posts
Showing posts with label Troubleshooting. Show all posts
Wednesday, 22 March 2017
Unable to set the Freeze Panes property of Window Class C#
It is generally easy to resolve the compile time errors because the reason for the error is probably known but a run time error always hinders the development process for a considerable amount of time so are the exceptions that unknowingly show up from no where. That is why it is always advised to handle each and every exception your application might throw. The only way to be a master in handling exception is experience, yeah you read it right. More you develop, more problem you will encounter in your developing environment and in turn more you will know the reason and the so called timing of the exceptions.
Exception
One of the most encountered is "unable to set freeze panes property of window class" which show up when you try to freeze panes while formatting an excel file in c#.
Reason
The main reason for occurrence of such an exception is incompatibility between older and the newer versions of MS Excel.
When it occirs
This exception occurs when you are using a newer version of MS Excel and your application gets activate in background, I repeat your MS Excel application thread opens in the minimized state which hinders the freezing pane process.
How to counter this exception?
Obviously to get a solution to a problem, first of all understanding the problem is must more precisely the reason of problem should be known. Since we know the reason why freeze panes property is not set and the exception is thrown we can provide a solution.
So if somehow we can make our MS Excel thread open in maximized state or normal state explicitly then bingo we successfully resolved the issue.
Still it is a good practice to surround the exception causing snippet with try block and catch the exception so that there is no exceptional flow change in your application.
Let us look at the source code for the same
Exception
One of the most encountered is "unable to set freeze panes property of window class" which show up when you try to freeze panes while formatting an excel file in c#.
Reason
The main reason for occurrence of such an exception is incompatibility between older and the newer versions of MS Excel.
When it occirs
This exception occurs when you are using a newer version of MS Excel and your application gets activate in background, I repeat your MS Excel application thread opens in the minimized state which hinders the freezing pane process.
How to counter this exception?
Obviously to get a solution to a problem, first of all understanding the problem is must more precisely the reason of problem should be known. Since we know the reason why freeze panes property is not set and the exception is thrown we can provide a solution.
So if somehow we can make our MS Excel thread open in maximized state or normal state explicitly then bingo we successfully resolved the issue.
Still it is a good practice to surround the exception causing snippet with try block and catch the exception so that there is no exceptional flow change in your application.
| Unable to Set Freeze Panes Exception |
Let us look at the source code for the same
Source Code
//Maximize the window state before setting freeze panes property
ExcelApp.Application.ActiveWindow.WindowState = Microsoft.Office.Interop.Excel.XlWindowState.xlMinimized;
ExcelApp.Columns.AutoFit();
try
{
ExcelApp.Application.ActiveWindow.FreezePanes = false;
ExcelApp.Application.ActiveWindow.SplitColumn = 1; //To freeze first column
ExcelApp.Application.ActiveWindow.SplitRow = 1; // To freeze Top Row
ExcelApp.Application.ActiveWindow.FreezePanes = true;
}
catch(Exception ex)
{
}
Also Read Troubleshooting Cisco VPN client 0x8004a029 with screenshots
Also Read Troubleshooting ORA-12505
Also Read Troubleshooting ORA-12505
Tuesday, 28 February 2017
Troubleshooting Cisco VPN client
Before starting troubleshooting, Let us see what VPN
is and what it requires to perform its intended function.
A VPN connection is the extension of a private network
that includes links across shared or public networks, such as the Internet. VPN
connections (VPNs) enable organizations to send data between two computers
across the Internet in a manner that emulates the properties of a
point-to-point private link.
During installation
process, an error 0x8004a029: Couldn't install the network component", might
have occurred.
Error 0x8004a029 means that the maximum number of filter devices for the system has been reached. Other similar software (3rd party firewalls, etc.) install filters. You can either attempt to remove other software that has installed a filter, or attempt to increase the following registry entry value to allow more filters to be installed.
Error 0x8004a029 means that the maximum number of filter devices for the system has been reached. Other similar software (3rd party firewalls, etc.) install filters. You can either attempt to remove other software that has installed a filter, or attempt to increase the following registry entry value to allow more filters to be installed.
A filter
driver is a Microsoft Windows driver that extends or modifies the
function of peripheral devices or supports a specialized device in
the personal computer. It is a
driver or program or module that is inserted into the existing driver stack to perform some specific function.
Hence in order to install VPN
properly increase in maximum number of network filters is required.
Now let us see the steps to change
the system’s registry value to increase the maximum number of filter so that
VPN client could install filters in conjunction with its network component.
1. Open
Registry Editor.
![]() |
| Reg Edit |
2. Extend
System
tab.
| System tab Regedit |
3. Extend
CurrentControlSet tab.
| Current Control Set Regedit |
4. Extend control
tab.
| Control Regedit |
5. Seek
down and click on Network
tab.
| Network Tab Regedit |
6. Double
tap MaxNumFIlters option
present on the right side partition of the registry editor.
| Network Filters |
7. Change
Value data from 8(default value) to 14 and tap ok.
8. Now
restart your system and try re-installing VPN client.
| Max Num Filters |
Note: If you
don't see MaxNumFilters name, you can create it with the Type being REG_DWORD
as shown below.
Monday, 6 February 2017
Troubleshooting ORA-12505( SQL Developer), TNS: listener does not
currently know of SID given in connect descriptor
There are a few things that can cause this problem, but before we get started,you need to be sure that you can connect to the database using SQL*Plus. SQL*Plus, it's a command-line tool for connecting to Oracle databases that has been a standard part of Oracle for a long time and it is included with Oracle XE.
When connecting to an Oracle database using database connectivity API, we don't connect to the DB directly. Instead, we connect to a TNS listener, which then connects you to the database. The error means that the listener was up and you could connect to it, but it couldn't connect you to the database because it doesn't know that that database is up. There are two reasons for this:
ORA-12505 means that the listener knows about that database, but the listener hasn't received an acknowledgement from the DB that it is up.
|
1. Start oracle database.
![]() |
| Start database |
2. Connect to system.
![]() |
| Connect System |
3.
3. Try out command
“LSNRCTL STAT”;
![]() |
| Ora-Listener |
44. Execute command
Alter system
set local_listener = '(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))'
scope = both;
![]() |
| Alter System Listener |
5. Execute command
Alter system
register;
![]() |
| Alter System Register |
6 6.Execute command
Exit;
![]() |
| Exit |
7.
7.Execute command
lsnrctl stat
![]() |
| lsnrctl stat |
Now you should probably be able to connect.
Subscribe to:
Posts (Atom)
Search
Popular Posts
-
File Versioning C# File versioning, saving file with unique file name in c# File versioning allows a user to have several versions of ...
-
Troubleshooting Cisco VPN client Before starting troubleshooting, Let us see what VPN is and what it requires to perform its intended f...
-
Evolution-Mobile Phones With the development of portable technology,wireless communication has so evolved that (According to the announce...
-
Text Box Hint in c# Windows Form Application Text Box Hint in c# Windows Form Application While developing a windows form applicat...
-
Unable to set the Freeze Panes property of Window Class C# It is generally easy to resolve the compile time errors because the reason fo...










