cyprich.com

Occasionally Relevant Insights from a Software Builder

By

How to Fix Microsoft Outlook Failure to Activate License

When I upgraded to Windows 8 from Windows XP, everything worked well except Microsoft Outlook. It required me to activate its license and failed on every attempt I made at this. This may be due to it trying to write data to a folder that Windows 8’s enhanced security was blocking. Windows 7 users experience the same problem with Outlook’s license activation.

The solution is very simple. You need to run Outlook as an administrator, i.e. right click on the Outlook program icon and select “Run as administrator” from the list of options. Even though I was logged in as administrator, I still had to do this step to force Windows to run Outlook as an administrator. Outlook was then able to activate its license with Microsoft and then ran without a red title bar in the application that indicated a problem.

By

Redirecting ASP.NET Pages

You can redirect an ASP.NET page using one of three methods. The first method is through metatag redirection. If that fails, then it will try to redirect with JavaScript. If that fails, a URL will be displayed that the user can click on to redirect the page.

An HTML 5 only version of this redirect page can be found in the post Redirecting Pages in HTML 5.

— ASP.NET code below —

<%@ Page Language=”C#” %>

<!DOCTYPE html>

<script runat=”server”>
</script>

<html>
<head runat=”server”>
<title>Page Title</title>

<meta http-equiv=”Refresh” content=”0; url=http://www.website.com”>

<!– If the meta tag doesn’t work, try JavaScript to redirect. –>

<script type=”text/javascript”>
window.location.href = “http://www.website.com”
</script>
</head>

<body>
<form id=”form1″ runat=”server”>
<div>
<!– If JavaScript doesn’t work, give a link to click on to redirect. –>

<p>If you are not redirected automatically, click <a href=’http://www.website.com’>here</a>.</p>
</div>
</form>
</body>
</html>

By

Finding the Version of Joomla in the Back End

I was trying to find out which version of Joomla was installed in a web site. The first place I looked was in the database where this type of information was normally stored. I couldn’t find any global settings table which would have the version number. This is because Joomla stores version information in the libraries folder in version.php which is located in different folders on Joomla 1.5 and Joomla 2.5/3.x.

Joomla 1.5
/libraries/joomla/version.php

Joomla 2.5/3.x
/libraries/cms/version/version.php

In the version.php document will be the following variables:

public $RELEASE = '3.3';
public $DEV_LEVEL = '1';

This shows that the installed version of Joomla is 3.3.1.

By

Restore Backed Up Database in MS SQL Server Using Transact-SQL

The following code will restore a database from a backup file in MS SQL Server. Normally you would use Management Studio to do this, but this might fail if the database needs to be in single user mode to restore. The code below will restore the database as a single user, then put it back in multi-user mode after its done.

—[ Transact-SQL Code ]——————–

-- Set database as single user and restore from backup.
USE master
ALTER DATABASE <your_database>
 SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATABASE <your_database>
 FROM DISK = 'D:\Databases\YourDatabase.bak'
 WITH REPLACE
GO
-- Set database back to multi user.
ALTER DATABASE <your_database> SET MULTI_USER WITH ROLLBACK IMMEDIATE
GO

By

Fixing Terms and Conditions in uStore 7.3

The “Terms and Conditions” link when creating a new user in uStore 7.3 do not seem to work on my system. When the link is clicked, it opens the login page in a new window. If an existing user logs in here, the terms page will then appear. The user will need to close this page and go to the previous page to login to a store.

I made s small modification to the Login.aspx page in \XMPie\uStore\App\CustomerApp folder.

<p>
<span style=”position: relative; top: -27px; left: 19px; padding-bottom: 2px; background-color: #F1F1F1;”>
I accept the <a href=”http://../Terms.html” style=”text-decoration: underline” target=”_blank”>Terms & Conditions</a>
</span>
</p>

The Terms file in the example above is in the CustomerApp folder. Place this code in the < tr id=”trAcceptTermsConditions” … > section. The code is placed after the existing terms and condition text and checkbox. If your not sure how to find it, search for “Please read and accept the Terms & Conditions”. Place the code addition after that.

My code doesn’t change anything on the login page. It creates a grey text box with the same text as the original terms and places the new text over the old one. You will only see the new text and the URL will open in a new page. Create a button to close the terms page or make a note on the bottom after they read it to close it.