Error creating a Scheduled Task on Windows Server 2008 R2

When the “Run whether user is logged on or not”  option is selected in the General tab of the Create Task window the Task Scheduler has to save the password of the selected user.

During the save the following error message appears:

Task Scheduler

An error has occurred for the task <task name>. Error message: The following error was reported: A specified logon session does not exist. It may have already been terminated.

To enable the Task Scheduler to save the password of the selected user, disable the Network access: Do not allow storage of passwords and credentials for network authentication security policy of the server:

  • Click the Start button of the Start Menu and enter SECPOL.MSC into the Search programs and files text field
  • On the left side select Security Settings | Local Policies | Security Options
  • On the right side double click the Network access: Do not allow storage of passwords and credentials for network authentication policy
    Do not allow storage of passwords
  • Select the Disabled radio button and click OK
    Do not allow storage of passwords Disabled

 

Enable File Level Authentication or set SSL requirements in IIS 7 and 7.5

In Windows Server 2008 and 2008 R2 the Internet Information Services (IIS) Manager looks different from the  IIS 6 version.

To set file level attributes, like authentication, SSL requirement, follow the steps below:

  • Start Internet Information Services (IIS) Manager
  • On the left side select the application you want to administer.
  • At the bottom of the middle pane select the Content View tab to view the files of the application.
  • In the middle pane right click the file you want to administer and select Switch to Features View in the drop down menu.
  • In the middle pane double click the Authentication, SSL Settings, or any other icon you want to make changes to.

How to create a mirrored volume in Windows Server 2008 R2?

To create a mirrored volume in Windows Server 2008 R2

  • In the Start Menu right click Computer,
  • In the popup menu select Manage,
  • On the left side of Server Manager expand Storage and select Disk Management,
  • You need a second hard drive with as much unallocated space on it as the size of the volume you want to mirror.
  • Right click the volume you want to mirror and select Add Mirror…
  • Select the disk that will contain the mirror and click the Add Mirror button,
  • The operating system will create a volume on the mirror disk and will start to copy the contents of the original volume to the mirror. This operation can take hours depending on the size of the mirrored volume.

IPv4 Network Subnet Prefixes, Masks, Usable Hosts

The following table shows the IPv4 network subnet prefixes, subnet masks, and the number of usable hosts.

Prefix size Network mask Available subnets Usable hosts per subnet Total usable hosts
/24 255.255.255.0 1 254 254
/25 255.255.255.128 2 126 252
/26 255.255.255.192 4 62 248
/27 255.255.255.224 8 30 240
/28 255.255.255.240 16 14 224
/29 255.255.255.248 32 6 192
/30 255.255.255.252 64 2 128
/31 255.255.255.254 128 2 * 256

* for point-to-point links only

In a subnet the following two addresses cannot be assigned to hosts:

  • the first address is the address of the subnet,
  • the last address is the broadcast address to all hosts.

HP iLO is not responding

When during boot of an HP ProLiant server you see the “iLO2 not responding. System health monitoring has been disabled.” error message you need to restart the HP Integrated Lights-Out (iLO) component in the server.

iLo is a small, always on computer with a web interface to monitor and manage the hardware of the HP ProLiant servers. You can monitor the temperature sensors, fan speeds, power usage, and you can turn on and off the server remotely. So if you accidentally shut down the server or the server loses power and does not start automatically you can push the virtual power button on the web interface and turn on the server as if you would stand in front of it.

To restart iLO in the HP ProLiant server you have to completely discharge all electricity from the server.

  • shut down the server,
  • disconnect all power cords from the electrical outlets,
  • remove all power supplies from the server (you need to disconnect the power cord from the power supply too to remove the power supply),
  • press and hold the power button on the front of the server for 15-30 seconds,
  • re-install the power supplies,
  • connect the power cables to the power supplies,
  • connect the power cables to the electrical outlets,
  • momentarily press the power button on the front of the server to turn on the server.

This power reset does not erase any information of the iLO configuration, just restarts it.

On the power on screen you should see the usual messages from iLO.

There is already an open DataReader associated with this Command which must be closed first

When your MVC 5 web application page tries to read the database using the Entity Framework in a loop you may get the following error message:

InnerException: System.InvalidOperationException
HResult=-2146233079
Message=There is already an open DataReader associated with this Command which must be closed first.
Source=System.Data

This usually happens when a cshtml page receives an IEnumerable<> model from the database and makes repeated calls to retrieve the rows one-by-one in a foreach loop.

If your page does not display paged data, read the rows into a List  with the ToList() method and send the list to the cshtml page to iterate through it. This forces the application to read all appropriate rows with one call from the database.

Sometimes you can also eliminate the problem if you add the following to the connection string in the web.config file:

;multipleactiveresultsets=True

How to increase the security in a NetApp system

  • Use putty to connect to the IP address of the NetApp management port
  • Log in with the Login and Password

Start the System Console

  • at the SP …> prompt type system console

To change the root and naroot passwords

  • type passwd
  • for the Login: question enter root
  • enter the new password
  • enter the new password again for verification
  • This step changes booth the root and naroot passwords.

To enable auditing

  • To check the current auditing status enter options cifs.audit
  • To enable auditing enter options cifs.audit.enable on
  • To automatically save the audit log enter
    • options cifs.audit.autosave.ontime.enable on
    • options cifs.audit.autosave.onsize.enable on
  • The file will be saved at /etc/log/adtlog.evt

To exit the System Console

  • Press Ctrl-D to exit the System Console
  • To see all events of the filer enter  events all

To exit the filer

  • Type exit to close the session

Head tracking with a web camera and FaceTrackNoIR

FaceTrackNoIR is a free open source head tracking device to detect the movement of your head in simulation games.

In a web browser go to http://facetracknoir.sourceforge.net/information_links/download.htm

  • Download the full installer
  • Run the SetupFaceTrackNoIR_Full_v170.exe
  • On the select components page uncheck the Protocol for Virtual Jostick(s) in the Interface to games section. You don’t need it now.

In a web browser go to http://www.faceapi.com/Download/register.php

  • Fill out the registration form and open your email for the activation link.
  • Click the Click here to continue link
  • Select the Non-Commercial faceAPI link to downolad the head tracking API
  • Double click the FaceTrackingAPI_NC-V3.2.6.zip
  • Allow the extraction of the included files
  • Install all features the setup_faceTrackingAPI_NC_V3.2.6.exe

In a web browser go to http://sourceforge.net/projects/facetracknoir/?source=dlp

  • Download and install the SetupFaceTrackNoIR_Full_v170.exe file
  • Copy the headtracker folder to C:\Program Files\Eagle Dynamics\DCS World\bin (sorry I have to research the source of the “headtracker” folder)

Activate the head tracking

  • Double click the FaceTrackNoIR icon on your desktop to start the face tracking application
  • In the Profile group click the Load button.
  • In the  C:\Program Files\Eagle Dynamics\DCS World\bin\headtracker folder select the DCS_A10C.ini file
  • In the Global Settings group set the Smoothing to 20
  • In the Filter group set the filter to Accelera filter Mk2
  • On the Options menu select Keyboard and Mouse Shortcuts
  • For Center select the Middle mouse button
  • Click the Start button to start head tracking

Windows web service authentication in IIS Express

When you develop a SOAP web service in Visual Studio 2013 the IDE uses IIS Express for testing. To set up Windows authentication in IIS Express follow the steps below:

Create a Local Security Group on your computer

  • Right click Computer and select Manage
  • On the left side expand Local Users and Groups
  • Right click the Groups folder and select New Group
  • Create a group with the name WebserviceUsers for the users of the web service
  • Right click the Users folder and select New User
  • Create a user and add it to the WebserviceUsers security group

Add the following lines to the  <system.web> section of the Web.config file of your web service application

<authentication mode=”Windows”/>
<authorization>
<allow roles=”WebserviceUsers”/>
<deny users=”*”/>
</authorization>

Set up IIS Express for Windows authentication

  • Select the web service project in the Solution Explorer
  • In the View menu select Properties Window
  • Disable Anonymous Authentication and enable Windows Authentication
    Visual Studio IIS Express Windows Authentication Properties Window

 

In the caller application call the web service with user name and password

  • Add the following lines to your class to supply the credentials
private Webservice.Service _Webservice = new Service();

// Constructor
public Business() {
    string webserviceUrl = "Webservice_Url";
    string webserviceUserName = "Webservice_UserName";
    string webservicePassword = "Webservice_Password";
    _Webservice.Url = webserviceUrl;
    ICredentials credentials = new NetworkCredential(webserviceUserName, webservicePassword);
    _Webservice.Credentials = credentials;
}

How to sign in to your Windows 8 PC without an email address

When you set up Windows 8 the Sign in to your PC page asks you for your email address. It is you computer you should be able to use it without telling Microsoft your email address and other personal information.

To use you computer without giving away your email address

  • At the bottom of the the Sign in to your PC screen select Sign in without a Microsoft account
  • On the next screen select the Local Account button
  • Enter a User name and a Password