Monday, June 29, 2009

howto-restore-your-old-emails

If the user suddenly lost his/her mails, check whether user's Z drive is accessible or not, if Z drive is not accessible check the network cable connection and restart the system. Still Z drive is not available, consult the System Administrator immediately.
If Z drive is available then only do the following to change the outlook express's store folder location to Z drive
1.start Outlook Express(OE), goto tools->options->maintenance->store folder, please write down the path given there.
For winNT the path will look like, C:\WINNT\Profiles\ \Application Data\Identities\ \Microsoft\Outlook ExpressFor Windows XP the will look like, C:\Documents and Settings\ \Local Settings\Application Data\Identities\ \Microsoft\Outlook Express
We need to recover messages form the above store folder location if new messages were downloaded there.
2.Close OE
3.open registry edit by startMenu->run->regedit->ok.
4.On the left panel, goto My Computer->HKEY_CURRENT_USER->Identities->" Identity no. shown in above store folder " ->Software -> Microsoft-> Outlook Express -> 5.0
5.Choose Store Root on the right panel, and double cilck on it.
6.Delete the value data if it is pointing to "C drive" or "%%user name%%...".
7.Enter new store folder value as "z:\oemails" for windows XP or "z:\\oemails" for windows NT.
8.To check the Address book location, in the left panel of registry edit, goto My Computer->HKEY_CURRENT_USER->Software->Microsoft->WAB->WAB4->Wab file name. On the right panel choose Default..check the value data..if it is pointing to "C drive" or "%%User name%% ", delete it and enter value as "z:\\oeaddressbook\.wab" for windows NT or "z:\oeaddressbook\.wab" for windows XP
9.Close Registry Editor
If any mails were downloaded in the old store folder, they need to be recovered. Follow the steps1.start OE2.check the store folder by going to tools->options->maintenance->store folder. It should be pointing to your Z drive. If it is not pointing to Z drive then do the above given steps to change the store folder location to Z drive.3.come back to default Outlook Express interface, then go to File->Import->messages->Outlook Express 6 -> Import mail from an OE6 store directory-> "OK" -> "browse"-> "browse to the previously taken store folder path"->next->choose the desired email folders that needs to imported->next->Finish.Note: if you can't see the required folders in the browse list, go to "windows explorer->view->Options and enable "Show all files""Note:If you get any error messages while importing mails from the old store folder, please consult the System Administrator

out and ref

The out and the ref parameters are used to return values in the same variables, that you pass an an argument of a method. These both parameters are very useful when your method needs to return more than one values.
In this article, I will explain how do you use these parameters in your C# applications.
The out Parameter
The out parameter can be used to return the values in the same variable passed as a parameter of the method. Any changes made to the parameter will be reflected in the variable.
public class mathClass{ public static int TestOut(out int iVal1, out int iVal2) { iVal1 = 10; iVal2 = 20; return 0; }
public static void Main(){ int i, j; // variable need not be initialized Console.WriteLine(TestOut(out i, out j)); Console.WriteLine(i); Console.WriteLine(j);}}
The ref parameter
The ref keyword on a method parameter causes a method to refer to the same variable that was passed as an input parameter for the same method. If you do any changes to the variable, they will be reflected in the variable.
You can even use ref for more than one method parameters.
namespace TestRefP
{
using System;
public class myClass
{

public static void RefTest(ref int iVal1 )
{
iVal1 += 2;

}
public static void Main()
{
int i; // variable need to be initialized
i = 3;

RefTest(ref i );
Console.WriteLine(i);

}
}
}

which folder creates when applicaton created

1.Which folders are created when the application created in dotnet?
Sol.
For windows application
1.application name folder
-->application name folder
bin, obj, propeties, Form1.cs, Form1.Designer.cs, program.cs.
bin(debug(.exe))
obj(Debug(TempPE))
properties(AssemblyInfo.cs, Resource.Designer.cs, Resources.resx, Settings.Designer.cs)
--> .sln
-->.suo

For WebApplication

-->WebSite1
-->App_Data
-->Default.aspx
-->Default.aspx.cs
-->Web.config