Error Logs
When Using Event Log on Asp.net it Shows Requested registry access is not allowed If it shows http 500 , disable the show friendly message on your ie browsers first then you can see the error message.
Grant permission to create a custom event log
1. Log on to the computer as an administrator.
2. Click Start, click Run, type regedit in the Open box, and then click OK. The Registry Editor window appears.
3. Locate the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
4. Right-click Eventlog, and then click Permissions. The Permissions for Eventlog dialog box appears.
5. Click Advanced. The Advanced Security Settings for Eventlog dialog box appears.
6. In the Name column, double-click the Users group. The Permission Entry for Eventlog dialog box appears.
7. Select the Set Value check box, select the Create Subkey check box, and then click OK.
8. Quit Registry Editor, and then log off from the administrator account.
9. Log on to the computer as a regular user.
10. Try to create a custom event log by using Visual Studio .NET, and then try to write to this event log by using an application that is built on Visual Studio .NET.
When Using Pop3,SMTP Shows Socket 1004: forcibly closed by remote host.
Could be hardware failure, could be dns problem,
Try change the host from computer name to IP
When Using Windows Service the System.Timer is not Firing.
I switch to System.threading.Timer.
System.Threading.Timer t = new System.Threading.Timer(
new System.Threading.TimerCallback(RunCommands), null,
0, Convert.ToInt32(ConfigurationManager.AppSettings["IntervalMinutes"]) );
}
public static void RunCommands(object stateInfo)
{ //do something }
You can pass any object/custom object to null,this is common for callback architecture. Or another approach which I haven’t tried is to use GC.KeepAlive(System.Timer)