August 19, 2005

Failed to save settings

Error: Failed to save settings: An error occurred executing the configuration section handler for userSettings/XYZ.Properties.Settings. (C:\Documents and Settings\Administrator\Local Settings\Application Data\amastaneh\XYZ.exe_Url_znuhtk3o00xt5ahfq5tlsmqqiclldnz5\1

I had a big problem with this error because every thing came normal but i had one error on Settings.Default.Save() method.
I think that, You can correct this error from app.config file.
I know that you wanna say this file is OK but i must tell you that i was like you, too.
However, you can test this way.
In this way you can build a sample application and then go to app.config and copy/past some line form first.
You must compare these codes with your uncorrected app.config file.
This is a section of my corrected app.config file.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="XYZ.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" />
</sectionGroup>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="XYZ.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
</configSections>
....
I hope this helps, Be happy.

August 18, 2005

Multilanguage Application

If you want to develope the Multi Language Application with newest Microsoft technology for supporting multi language feature then you can follow below:
New innovations in dot net technologies causes you not to need to add a new form for each language. You can have a form with multi configuration, image, and text … on interface.
Step 1: Insert New Form: Ctrl+Shift+A>WindowsForm
Step 2: Insert New Language: [On Form]RightClick>Properties>Design>Language>Select a new language like(French, Italy, US, Persian and ...)
Step 3: Insert New Language again: more and more...
Step 4: For Changing Languages you can use below
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-ES");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("it-IT");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fa-IR");
PS: this method is compatible with Microsoft .Net Framework 2.0 Beta 2 Compiler but I think that you can use this for old version and newest version of .net resealed.

July 12, 2005

NSIS Error

Error:
Installer integrity check has failed. Common causes include incomplete download and damaged media. Contact the installer’s author to obtain a new copy.

More information at:
http://nsis.sf.net/NSIS_Error

Error:
The installer you are trying to use corrupted or incomplete.


Solution:
run you exe file in CMD mode.
[FileName].exe /NCRC

Solution:
This could be the result of a damage disk, a failed download or a virus.
You may want to contact the author of this installer to obtain a new copy.
It may be possible to skip this check using the /NCRC command line switch (NOT RECOMMENDED)
If you have this error then you can go to Start>Run>cmd (or command for Win98 or ME)
and then go to your destination folder and run your setup (or any exe file) like this:
[FileName].exe /NCRC
for Example:
SharpDevelop_1.1.0.1964MayBetaRefresh_Setup.exe /NCRC

July 10, 2005

Express Manager

Do you have quistion like these? ;-)

- Where's the SQL Server Express Manager?
- I can't see the SQL Server Express Manager in start menu.
- I install the Microsoft SQL Server 2005 CTP but i havn't SQL Server Express Manager.
- I have just "Configuration Tools" sub menu in "Microsoft SQL Server 2005 CTP" at start menu.

The new Express Manager with considerable GUI(graphic User Interface) is seprated than Microsoft SQL Server 2005 CTP Package that come with Microsoft Visual Studio 2005 Beta 2.0 and you must download it from microsoft site.
This package is ExpressManager.msi with about "1004KB" size
Aftre install the Microsoft SQL Server 2005 CTP and Express Manager, you must enable SQL Server (SQLEXPRESS). for this work you can used of these two ways:

1- Start > Run > SQLServerManager.msc > SQL Server Configuration Manager (local) > SQL Server 2005 Services > SQL Server (SQLEXPRESS) > Right Click >Start

2- Start > Run > compmgmt.msc > Service and Applications > SQL Server Configuration Manager > SQL Server 2005 Services > SQL Server (SQLEXPRESS) > Right Click > Start

After that you must start the Express Manager from start menu.

In first look you see the "Connect to Server" form that must enter a "Server Instance" and then press Connect. (for example you can enter ".\SQLEXPRESS" in editbox)

Application: Microsoft SQL Server2005 Express Manager Preview 1
Version: 9.00.1116.00

Ok, wellcome to Microsoft® SQL Server™ 2005 Express Manager.

PS: If you don't like that type ".\SQLEXPRESS" for ever strat the Express Manager you can use of Express Manager Arguments.

-? Show the list of Arguments
-S server_name[\instance]
-d database
-U user_login
-P password

Start>Run>C:\Progra~1\Micros~4\XM.exe -? (for show the all Arguments)
Start>Run>C:\Progra~1\Micros~4\XM.exe -E -S .\SQLEXPRESS (for start without command)

Or you can edit your shortcut and insert new Arguments at the last of the target field.
Start>\Microsoft SQL Server 2005 CTP>SQL Server Express Manager>RightClick>Properties>Taget>"C:\Program Files\Microsoft SQL Server 2005 Express Manager\XM.exe" -E -S .\SQLEXPRESS