a developer's notes – a semi-technical web development BLOG

March 30, 2014

Can’t Connect to SqlServer 2012 LocalDB

Filed under: SQL — Duy Nguyen @ 11:12 am
Tags: , , , , , , ,

I had trouble connecting my sql server to (LocalDB)\v11.0 with my Windows account. I ended up having to delete it and recreate it.

Open a cmd prompt

c:\sqllocaldb delete "v11.0"
LocalDB instance "v11.0" deleted.

c:\sqllocaldb create "v11.0"
LocalDB instance "v11.0" created with version 11.0

If the database is in use, stop MSSQL service and try again.

May 13, 2012

How to setup a FTP server in Windows 7

Filed under: Daily Computing — Duy Nguyen @ 11:34 pm
Tags: , , , , , , , , ,

1. Install IIS : Control Panel (Turn Windows Features on or off)
2. Make sure FTP Server is installed

3. Configure Firewall

(Optional. You only need this if you want to host a website from your home computer.)

4. Create a folder on your file system to store your files that you want to host on your FTP server.

5. Create the FTP site. You can follow this guide. http://www.programmerfish.com/how-to-make-local-ftp-server-in-windows-7/ **I suggest you create a user account on your computer to only allow that user to access your page. If you do this, you will need to enable Basic Authentication and disable Anonymous Authentication.

6. Configure your router so that you can use your FTP site from outside your network.

7. Access your FTP site. FTP://yourPublicIpAddress

Here is a great video you can watch on how to do this.

February 8, 2012

Remote Desktop Connection To Your Computer From Outside Your Home

Filed under: Daily Computing,General Tips — Duy Nguyen @ 10:23 pm
Tags: , , , , , , , , , ,

You need to open up port 3389 on your Router and have it forwarded to your specified machine (by IP).

1. Open your Router’s admin page
2. Add port 3389 and specify the machine’s IP you want to allow remote desktop.

See below

Then you will want to register a FREE public domain with https://www.dnsdynamic.org. The reason for this is that your ISP will sporadically change your IP address. Unless you want to keep up with what is your current IP address that your IP gave you, you can just use your public domain and be able to remote to your computer every time.

So just open up the RDP connection and use your new domain.

To enable pings responses on a Linksys E1000, uncheck Filter Anonymous Internet Requests in the Security Tab

Also, make sure your Windows firewall has the ports 3389 open.

You can confirm that port 3389 is open to the public. Go to http://www.yougetsignal.com/tools/open-ports/ and test port 3389.

**To test the remote desktop connection from a computer outside your home network, you should ask a friend to assist. Many corporations and schools block these ports so that you can’t access your home PC while at their facilities.

October 4, 2011

How to restart Windows during a Remote Desktop Connection

Filed under: General Tips — Duy Nguyen @ 10:10 am
Tags: , , , , ,

If you are RDP into a machine, you won’t have the option to reboot with the start button. You can only log off or disconnect.

Type ALT + F4 and you will have the option to restart.

September 29, 2011

Why can’t I run my .NET 4.0 site on Windows 2003 with IIS 6?

Filed under: ASP.NET — Duy Nguyen @ 10:44 pm
Tags: , , , , , , , , , , , , , , , , , ,

IIS 6 (that comes with Windows 2003) does not let you have more than one framework at a time running in the same instance like IIS7 that can create Application PoolS targeting different frameworks. This just means a single application pool can’t be used for two different frameworks like IIS7.

You have a two options:

  1. Downgrade the .NET application to 3.5 with Visual Studio 2010. Just go to the Website project properties, Application tab and there is a drop down with all the framework releases, select 3.5.

    VS2010 will reload the project and modify the web.config. If you added A web service reference, thEN you may have to delete them and re-add them under 3.5

  2. Configure IIS6 with a second application pool and a second web site.

    • Create a new application pool…

      and new web site…

      Then assign this application pool to the Framework 4 web application that will be hosted by your new site. To assign the application pool, in the IIS console open the properties section of the web application, and click on the “Home directory” tab and select the application pool which you have created earlier.

    • Then you need to change the ASP.NET version of your application. Right click your virtual directory that hosts your application and click the property and check the ASP.Net. Select Framework 4.

    • Select ASP.NET 4.0 on IIS6 under Web Service Extension. Go to the IIS6 console open “web service extension node” which is right below the “default website” node. You will see the entire ASP.Net framework list that is installed. By default these frameworks might be prohibited so please select ASP.Net Framework 4 and click allow button.

      *If you don’t see ASP.NET 4.0, make sure the framework is installed on the server! If it is, then open a command prompt go to this directory: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
      Then run this command: aspnet_regiis -i

      You will now see ASP.NET 4.0. If you don’t set ASP.NET 4.0 to ALLOW, You will get a “404 Page is not found.”

Check out this great article:


September 5, 2011

Killing a Windows Service that seems to hang on “Stopping”

Filed under: Daily Computing,General Tips — Duy Nguyen @ 1:13 pm
Tags: , , , , , , ,

1. Go to the command-prompt and query the service (e.g. the SMTP service) by using sc:
sc queryex SMTPSvc

2. This will give you the following information:

TYPE               : 20  WIN32_SHARE_PROCESS
STATE              : 4  RUNNING
WIN32_EXIT_CODE    : 0  (0x0)
CHECKPOINT         : 0x0
WAIT_HINT          : 0x0
PID                : 388
FLAGS              :

3.  Find the process identifier (PID) and kill the process with “taskkill”:

taskkill /PID 388 /F

where the /F flag is needed to force the process kill (first try without the flag).

Taken from http://bartdesmet.net/blogs/bart/archive/2004/10/16/438.aspx

Blog at WordPress.com.