How to enable VPN support in ASUS Dual-Band Wireless Router RT-N56U

Just upgraded to a dual-band (2.4GHz and 5.0GHz) wireless router ASUS RT-N56U, everything is working fine but it does not support VPN access by default. With the default setup, when I launched the CISCO VPN Client (5.0.07.0440) I got “Reason 421, peer no response…” error message after a few minutes’ unsuccessful connection tries.

To allow the VPN access to be used so that I can connect to the company network at home through this new router, I had to enable the IPSec passthrough.

Here is how-to:

  1. First, make sure the RT-N56U has the latest firmware. I have the 1.0.1.7f version when this post is wrote
  2. Go to the ASUS RT-N56U admin interface  http://192.168.1.1 or any IP address you use) with the correct log in credentials (admin/admin);
  3. Click WAN then select NAT Passthrough tab, select Enabled option for IPSec Passthrough as the figure below. Click Apply to save the change.

Play f4v video file in JWPlayer on IIS web server

I use JWPlayer to play video online, and it plays well with all .flv files. But I got “Video Not Found or Access Denied” error message when I tried MP4 Flash Video format with .f4v file extension, even it worked on the local server. When I typed the video file URL directly in the address bar,  I got a 404 – File Not Found error message in the browser. That means the web server (IIS) has not registered f4v file type by default.

There is a quite easy fix, and all we have to do is to register f4v MIME type with IIS.  Here are how-tos. Continue reading ‘Play f4v video file in JWPlayer on IIS web server’

How to run MagicJack without login Windows for all Users

MagicJack PlusI like MagicJack, at least it has been working for me in past 3 years and I already use it to replace the landline phone services ($29.90 for the USB device and $19.90/year phone subscription service fee). But it still had a couple of glitches in the past few years, at once I had to use the online support chat twice and even was escalated to the super support to resolve my can-not-calling-out problem. Another annoying thing is that you will have to log into the Windows with the same user account who installed the MagicJack to use it. If another family member use the computer with her user account, she has to run the MagicJack executable file exclusively. Otherwise the MagicJack phone services doesn’t work under her user profile.

Here are the solutions to this problem above.

Solution 1, run the MagicJack as a Windows Services.

Continue reading ‘How to run MagicJack without login Windows for all Users’

UserNameRequiredErrorMessage not showing in the Validation summary control when in content page of a master page

It works in a simple web form, but in the content page of a master page.

For example, there is a simple content page:

<%@ Page Language="VB" MasterPageFile="~/Master1.master"
AutoEventWireup="false" CodeFile="Login.aspx.vb"
Inherits="Login" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">

   <asp:Login ID="Login1" runat="server">
    </asp:Login>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server"
        ValidationGroup="Login1" />
</asp:Content>

But the validation summary is not appearing when a password is not entered. There is a blank space on the page for the validation summary, and the login control displays the red asterisk indicating an error. But the error never displays.

Solution:

To resolve this issue, I had to look at the HTML source code and realized that the Master Page changed the client ID of this Login control. And simply way is to put the asp:Content ContentPlaceHolderID before the Login Control ID as the below.

ValidationGroup=”ctl00$ContentPlaceHolder1$Login1″

Of course a better method would be to set the ValidationGroup programatically in the page init method:

ValidationSummary1.ValidationGroup = Login1.UniqueID;

Problems with ASPNETSQLProvider (user instance) in Web Projects in Visual Studio 2010 of Windows 7

I figured out the cause of my problem in the previous post: since the web site I tested in Visual Studio 2010 is under the folder of \Documents\Visual Studio 2010\Websites, and my OS is Windows 7. For some reasons, the Web Site Administration Tool could not auto generate an aspnetdb.mdf under my APP_DATA folder.

I searched the web, and tried the following steps I found from Microsoft web site (http://support.microsoft.com/?kbid=2002980).

Continue reading ‘Problems with ASPNETSQLProvider (user instance) in Web Projects in Visual Studio 2010 of Windows 7′

AspNetSqlProvider does not work in ASP.NET web site administration tool

Recently playing around the Membership feature of ASP.NET, and trying to follow the sample article on MSDN(“Walkthrough: Creating a Web Site with Membership and User Login“). But I got error message when I launch the ASP.net Web Site Administration Tool, which occurred on the Security tab as the below:

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Unable to connect to SQL Server database.

So I went ahead to click the Provider tab, and then click the Test link of AspNetSqlProvider under the Provider section. But I got the following error message:

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

I understand that this error was caused by the database connection. First I had to make sure I have already installed the aspnetdb in my local MS SQL server. I closed the Web Site Administration Tool, and launched a DOS command prompt. Next I ran “aspnet_regsql” under the directory of “C:\Windows\Microsoft.net\Framework\v4.0.30309\” which launched a MS SQL connectionwizard. After I was done with that wizaard, I then verified in my MS SQL 2008 R2 server. I found there was a new database instance called “aspnetdb” created and have some tables like “dbo.aspnet_Applications”, “dbo.aspnet_Users” etc.

Continue reading ‘AspNetSqlProvider does not work in ASP.NET web site administration tool’

Troubleshooting and resolve HTTP 401.1 errors in IIS 6 by resetting IUSR password

After an unsuccessful IIS Admin configuration, all of my ASP.NET web sites went down with the following error message:

HTTP 401.1: Denied by invalid user credentials

I checked the server, all web services are running, but just could not browse the web sites. And since all of these web sites are in Anonymous authentication, I believe the cause for it was the below:

This error may also occur when anonymous access is configured. This may occur if the user name or password for the anonymous account that is stored in the IIS metabase differs from the actual information stored in the local user database (or the Active Directory directory service, if a domain account is used).

So the solution is to “Resetting the password for the account and in IIS”. Continue reading ‘Troubleshooting and resolve HTTP 401.1 errors in IIS 6 by resetting IUSR password’

How to escape special character while writing SQL query in Oracle

I ran a group of SQL queries in TOAD Editor against Oracle database, but got interruption with the special character “&” within the query (the TOAD will prompt a Variables window to ask for input value). To proceed these queries without any interruption, I need to escape such special characters.

Here is the method I used:

SET DEFINE ~;

OR

SET DEFINE = OFF;

In this way, when you are using TOAD or SQL*Plus, the DEFINE setting can be turned off to allow &’s (ampersands) to be used in text.

For escaping other special characters (like Single or Double Quotes), please refer to this FAQ How does one escape special characters when writing SQL queries?

How to display random list items with Array Shuffle

Recently I need to develop a quiz application which will generate the questions and answers on the fly, and each time the answers will be in random order while the quiz is called. It is easy to just randomize the answer items list, but we still need to have the A, B, C, D in front of these answer items in alphabet order. And we still need to track which one is the correct answer. Here are what I came up so far.

First, use dataset to retrieve all answers based on the question ID from the Database; then fill in an array variable.

…. Other Codes ….

 Dim dtA As DataTable = DAL.GetDataTable(myCommand)
...
  'assign values to array list, assume there are only 4 (A, B, C, D) answer items in the multiple choice question
    Dim arrAnswers(3, 1) As String
    Dim iAnswer As Integer = 0
    Do While iAnswer < dtA.Rows.Count
    arrAnswers(iAnswer, 0) = dtA.Rows(iAnswer).Item("ANSWER_TITLE").ToString
    arrAnswers(iAnswer, 1) = dtA.Rows(iAnswer).Item("A_CORRECT").ToString
    iAnswer += 1
    Loop

Continue reading ‘How to display random list items with Array Shuffle’

How to create more partitions in Windows 7 – Part I

My new purchased Dell XPS 8300 finally arrived this afternoon. Of course, the first thing to do is to create two more partitions since Dell only has one single C drive. Which is not acceptable to me considering both the system and user data files reside on such one single big 2 TB disk.

I used to do it with the third-party tools like PartitionMagic. Now in Windows 7, making new partitions becomes easier even without the third-party partition tools. Just enter the Computer Management console and select Disk Management under Storage node, and you will see all disks, partitions, volumes information there and you can take these disk partition actions there too.

It sounds cool and easy, right? But wrong, you won’t believe such simple task (at least it seemed to me at the beginning) still took me a whole night to straight everything out. During this period, I had so many tries and failures. Good thing was that the machine is brand-new without any personal data on it, so I didn’t need to worry about too much data lose while dealing with disk partition experiment. So here I strongly suggest you practice disk partition as earlier as you just open your shipping package. Continue reading ‘How to create more partitions in Windows 7 – Part I’

How to change the main folder of the main domain to a subfolder on JustHost server?

Recently a friend of mine moved all her web sites to JustHost provider web server, and she created each subfolder based on each domain name of web site under her main (home) folder /user/xxxx/public_html. For example, her main domain name is www.herdomain1.com and then she had a subfolder named /user/xxx/public_html/herdomain1/, and so on. There was nothing under the home folder of /user/xxx/public_html/ directly. Here came the problem, wherever the main domain http://www.herdomain1.com was called, the web page showed the directory index of /public_html/ home folder. There is nowhere in the JustHost cPanel to point the main domain to her subfolder of /public_html/herdomain1/.

Challenge:

On host provider server, a home folder is assigned to each user. And the main domain is pointed to the home folder by default. Some host companies, like 1 and 1, can allow you to change the home directory of the main domain points to. But some providers, like JustHost, do not have such feature in their cPanel interface.

Continue reading ‘How to change the main folder of the main domain to a subfolder on JustHost server?’

How to enable or disable user account in windows 7 Home Premium

It is not easy for you to enable or disable a user account in Windows 7  Home Premium with GUI option. In User Accounts GUI, you don’t see that option except the Delete Account option which you might not dare to proceed. According to the online instruction, you are supposed to do so from the Computer Management Console but unfortunately in Home Premium edition you don’t even see the User Account option from the left panel of MMC.

So the easiest way to enable or disable a user account in Windows 7  is from the command line. The following is how you can do it.

Continue reading ‘How to enable or disable user account in windows 7 Home Premium’

How to add a stretchable background image on my web pages

Challenge: It has been a while for me to hand code the HTML for any web sites. Recently I got a task to design a web site for a new building based on the graphical design. In the graphic, there is a cloud background. I would like to set it as a Background Image in the Web Page, which is stretchable no matter what the width of browser is.

Simple Solution:

The simplest way to stretch an image to fit the background of a page is to use the CSS3 property: background-size:

body {
background: url(background-cloud.jpg) no-repeat;
background-size: 100%;
}

Well, not every browsers support the background-size property at this time. If you are using the latest versions of Firefox and Internet Explorer, it might work with it. Continue reading ‘How to add a stretchable background image on my web pages’

How to export Chinese characters encoded UTF-8 from MySql to CSV correctly

I am using buddypress with extend profiles in one of my WordPress site to deal with the membership requirement. Now I need to export all members to a CSV file for an event. It is known that buddypress is not easily to be viewed in the list format due to the design of customizable xprofile feature. Fortunately I can easily export the buddypress members into CSV file with a nice BP Export Users plugin.

I downloaded and installed the plug-in, modified the php file with my own extended fields. And ran it, then a good members list with correct profile fields information. But one small problem though, the Chinese characters became these messy characters which could not be recognized after exporting. Even I know the MySql database was set up right with UTF-8 encode. Continue reading ‘How to export Chinese characters encoded UTF-8 from MySql to CSV correctly’



Get Adobe Flash playerPlugin by wpburn.com wordpress themes