Friday, April 1, 2011

Mount FTP server as drive in windows 7


1. First open the map network wizard as shown below. If you can’t see the menu in windows explorer, press “alt” key and the menu will popup.

clip_image002

2. In the map network drive wizard click on the link “Connect to a Web site that you can use to store your documents and pictures” as shown below.

clip_image004

3. The “Add Network Location” wizard is shown. Click “Next” on the welcome screen.

4. Then select “Choose a custom network location” link & click next as shown below.

clip_image006

5. In “Specify the location of your website” window, type the ftp server address or the IP address of your server under “Internet or network address”. Then click “Next”

OBS: You have to type the protocol first “ftp://” or the wizard won’t accept it.

clip_image008

6. In “Specify a User Name and Password if Required” window, uncheck the “log on anonymously” checkbox if your ftp server require a user name and password otherwise leave it checked. If your ftp server requires user name and password, then write the user name in the user name textbox. Then click “Next”.

clip_image010

7. In “What do you want to name this location” window, type the friendly name for your ftp site under “Type a name for this network location”. This name will be shown as a “Folder” in your mapped drive. Then click “Next”

clip_image012

8. In “Completing the Add Network Location Wizard” window, click “Finish” to open the ftp site.

clip_image014

9. Then the “Log On As” windows pops up to login to the ftp site. Type your password and check the “Save password” checkbox so you don’t have to type it every time you want to access the ftp site. Then click on “Log On”

clip_image016

10. The Ftp site will open and you will see that you have a network link to it under your drivers as shown below.

clip_image018

11. Now click on the ftp link under the drives, in my example “ftp1” and you will see that the address in windows explorer be “Computer –> ftp1”. Click on the address bar and the physical address on the hard disk will be shown.

clip_image020

12. Now in the address bar, delete “ftp1” and press enter to navigate to the “Network Shortcuts” folder.

OBS: If automatic navigation & hidden files & folder are not shown then you have to activate them as follows:

In Windows Explorer menu, click “Tools”-> “Folder Options”, click both checkboxes under “Navigation pane”. Then click “View” tab and select “show hidden files, folders & drivers”. Then click “Ok”.

clip_image022

13. Under “Network Shortcuts” you will see the “Ftp1” folder. Right click “Network Shortcuts” folder and click “Properties”. Click on “Sharing” tab and click on “Advanced Sharing”

clip_image024

14. In “Advanced Sharing” window, select “Share this folder”, then write a share name, in my example “MyFtps”, then click on “Permission” to set who can access this shared folder. In “Permissions for MyFtps” window select “Full Control” and click “Ok”. Then click “Ok” two times to close the sharing window.

clip_image026

15. Now in Windows Explorer address bar type “\\[YourComputerName]\MyFtps” and press “Enter”, then “MyFtps” share is shown.

clip_image028

16. Now right click on “MyFtps” folder and click on “Map network drive…” and the “Map Network Drive” window pops up. Then choose the drive letter you want and click “Finish” and you will have the folder mapped as a drive and be able to access the ftp site “Ftp1” as a folder in your mapped drive.

clip_image030

Thursday, February 3, 2011

document.getElementById return NULL when the control only have name attribute

A webpage was working well on the development machine but when I moved it to the server the document.getElementById returned null. Here an example:

<script>
alert(document.getElementById(“test”));
</script>

<body>
<input name=”test” type=”text” value=”testing..”>
</body>

The above alert should show the message “[object]” but it returns null. After few hours of troubleshooting it turned out that the webpage contained a wrong doctype tag which is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Then by changing the doctype tag to ver 4.0 (as below) everything worked well:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Sunday, January 16, 2011

Signing in to Windows Live Messenger failed because the service is temporarily unavailable. Please try again later. Error 80040154

After I installed windows live essentials 2011 on Windows Vista I got this error. I tried the instructions in the link provided by the error message (http://windowslivehelp.com/solution.aspx?solutionid=f427b98c-8fc9-4e0c-9931-859ddf8caa69) but didn’t help. So I just run the installation again & run repair as follows:

1. Start –> Control Panel –> Programs.
2. Then locate "Windows Live Essentials 2011" in the list and click on “uninstall/change”.
3. Windows Live Essentials 2011 setup will run and ask you to reinstall or repair. Click on repair.
4. When it finish. Start Windows Live Messenger & sign in.

Thursday, December 16, 2010

Error: Cannot have multiple items selected in a DropDownList

Receiving this error when trying to select an item in an ASP.NET dropdownlist as below:

Dropdownlist1.items.FindByValue(“1”).Selected = True

To Solve this, just call the ClearSelected method before selecting the item:

Dropdownlist1.ClearSelection()
Dropdownlist1.items.FindByValue(“1”).Selected = True