Wednesday, August 1, 2018

ERROR: Failed to receive a call for ovr_RecenterTrackingOrigin or ovr_ClearShouldRecenterFlag within 1 second of recentering request

Starting TestResponseToRecenterRequest
Waiting for the application to run for 5 seconds before testing begins...
Starting test...
Sending a request to recenter...
ERROR: Failed to receive a call for ovr_RecenterTrackingOrigin or ovr_ClearShouldRecenterFlag within 1 second of recentering request
Please refer to VRC Guidelines: https://developer.oculus.com/distribute/latest/concepts/vrc-pc-input-3/
Cleaning up...
Test FAILED


Solution: Attach OVRManager Script to an object in game

Friday, July 20, 2018

c# asp.net - simple aspx file to upload a file to server

Save below as an .aspx file in IIS.

<%@ Page Language="C#" AutoEventWireup="true" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Test Upload file</title>
</head>
<body>
<form id="form1" runat="server" enctype="multipart/form-data">
 <input type="file" id="myFile" name="myFile" />
 <asp:Button runat="server"
   ID="btnUpload" OnClick="btnUploadClick" Text="Upload" />
</form>
<script runat=server>
protected void btnUploadClick(object sender, EventArgs e)
{
    HttpPostedFile file = Request.Files["myFile"];

    //check file was submitted
    if (file != null && file.ContentLength > 0)
    {
        string fname = System.IO.Path.GetFileName(file.FileName);
        file.SaveAs((System.IO.Path.Combine("C:/Temp/", fname)));
    }
}
</script>
</body>
</html>

Thursday, July 19, 2018

Unity VR (XR) camera not located at the position you add it in the scene


The camera is directly controlled by the engine and you may not be able to specify its position. What you have to do is to center the camera in the scene (0,0,0) and then put this inside a empty object. You can then position this camera containing object to where you want the player camera to be located


It may be a good practice to call below just to be sure camera is initialized and centered just before your scene starts
UnityEngine.XR.InputTracking.Recenter();

Wednesday, July 11, 2018

Batch convert using ffmpeg

Say you have some folder and sub-folders full of .wav files and want to convert them all to .mp3 at a single shot, try the below



  1. Get ffmpeg
  2. Copy the below command from down below and save it in a .bat file
  3. Make sure the ffmpeg path is correct in the command
  4. Make sure the file is saved in the root folder where you want the files to be converted.
  5. Run the bat file you have created

for /R %%g in (*.wav) do start /b /wait "" "C:\ffmpeg-4.0.1-win64-static\bin\ffmpeg" -threads 16 -i "%%g" -acodec libmp3lame "%%~dpng.mp3" && del "%%g"



Monday, June 25, 2018

Removing outlook profile

Outlook giving error "Before deleting the e-mail account containing your personal mail, contacts, and calendar data, you must create a new location for your data", when trying to remove email account

I have tried this with Outlook 2016 in Windows 10


  1. Close Outlook if its running
  2. Start -> Run (or Win Key + R) -> outlook.exe /manageprofiles -> OK
  3. Click "Show Profiles" button and delete it
  4. Close window and start outlook
  5. Outlook should ask to create a new profile now
  6. Now you can enter your email address and configure outlook as normal


Wednesday, May 9, 2018

Setting a proxy for a standalone Microsoft .Net application

  1. Find the applications install location (or .exe location). If you are using a shortcut, you can right click, and check the properties to find this place.
  2. Locate your applications .config file. Typically this will be in the same folder as your .exe; For example, for myappname.exe, you should be able to see myappname.exe.config in the same directory
  3. Create one if there there is only not already present. Make sure to name it myappname.exe.config
  4. If creating a new file, Open the newly created file in notepad, and paste the below into it. Make sure to change proxyservernameproxyserverport in your environment
  5. if file already exists, add the defaultProxy section as shown below and save file
  6. Restart the application
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true">
      <proxy proxyaddress="http://proxyservername:proxyserverport/" bypassonlocal="false" usesystemdefault="false" autoDetect="false" />
    </defaultProxy>
  </system.net>
</configuration>


Adding a new resource to Microsoft High Availability Cluster

The following was tried on Windows Server 2012 R2

Here I am giving an example of a Service; you can start an application or a script or a multitude of options that comes with the cluster software

1.  Bring up the Failover Cluster Manager

1.Right click on computer, click manage
2.Select Tools à Failover Cluster Manager

2.  Adding Role

1.Expand down to Roles
2.From Right side, click Create Empty Role
3.“New Role” is created
4.Click on “New Role”
5.Select properties, and set Name as “My Service” or any name you prefer

3.  Adding your service

1.Right Click on newly created “My Service” Role
2.Pick Option “Add Resource”à Generic Service
3.Pick “Your Servie To Use” from list and click Next, Next and Finish

4.To Start the service, Right click again on “My Service” and select “Start Role”

Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...