Tricks and Tips about Systems/Network

August 25, 2010

How to serve .flv file on IIS

Filed under: admins,IIS,Windows 2003 — Liju Mathew @ 10:17 pm

I’m using Windows 2003 server.

Adding .flv MIME type in IIS

1) Select the site to configure in IIS, right click and select “Properties”
2) Under HTTP Headers Tab, select “File Types” under the MIME Map section and select “New Type
3) Type “.flv” as the associated extension and “video/x-flv” as the content type.
4) Select “OK” and you’re ready to fly!

December 31, 2009

Installing Self signed certificate on IIS6

Filed under: admins,IIS,Windows 2003 — Liju Mathew @ 8:06 am

1. Install IIS root kit. Pls make sure that selfSSL was enabled and installed during the installation time.
2. Switch to IIS Root installation directory from the command mode.
3.http://codeforeternity.com/blogs/technology/archive/2008/02/15/creating-self-signed-ssl-certificates-on-iis-6-0-and-windows-server-2003.aspx

D:\Program Files\IIS Resources\SelfSSL>selfssl.exe /N:CN=dev.mydomain.co.uk /K:2048 /V:600 /S:1656415755 /P:443
Microsoft (R) SelfSSL Version 1.0
Copyright (C) 2003 Microsoft Corporation. All rights reserved.
Do you want to replace the SSL settings for site 1656415755 (Y/N)?y
The self signed certificate was successfully assigned to site 1656415755.
D:\Program Files\IIS Resources\SelfSSL>

/N:cn — Specifies the common name of the certificate. The computer name is used if not specified. Use domain name like mydomain.com
/K:key size — Specifies the key length. Default is 1024.
/V: — validity days Specifies the validity of the certificate. Default is 7 days.
/S:site id — Specifies the id of the site. Default is 1 (Default Site). YOu find the site id from the website listing on the IIS manager.
/P:port —- Specifies the SSL port. Default is 443.
/Q — Quiet mode. You will not be prompted when SSL settings are overwritten.

that’s it. Try to access the website at https://dev.mydomain.co.uk.

Pls note that each SSL certificate installation requires a dedicated ip. For the testing, you may use different port for installing ssl on the same ip.

December 29, 2009

How do I install SSL certificate on IIS

Filed under: admins,IIS,Windows 2003 — Liju Mathew @ 4:43 pm

SSL certificate installations are varying according to the different CA. Here I used Godaddy’s CA to install SSL

There is two steps involved for this.
a. CSR generation
b. Installing Intermediate Certificate Bundle
c. To Install the SSL Certificate

a.Generating a Certificate Signing Request (CSR) – IIS 6.x

1. Open Internet Information Services.
2. Select the computer and website (host) that you wish to secure. Right click and select Properties.
3. Click the Directory Security tab and click on the “server Certificate”. button.
4 Click Next in the Welcome to the Web Server Certificate Wizard window.
5. Select Create a new certificate then click Next.
6 Select Prepare the request now, but send it later and click Next.
7 In the Name and Security Settings window, fill in the name field for the new certificate; then select the bit length (2048 or higher). Click Next.
Complete the Distinguished Name Fields:
a. Organization
b. Organizational Uni
c. Common Name : it should be FQDN including www prefix. eg: www.mydomain.com
d.Country
e.State
f.Province
f.City
g.Locality
8. It will ask to location to store the .csr which which is required for issueing ssl
Go through the next screen and complete the wizard.


b. Installing Intermediate Certificate Bundle

1. Type “mmc” on run command windows
2. In the Management Console, select File then Add/Remove Snap In.
3. In the Add or Remove Snap-ins dialog, click the Add button and then select Certificates.
4. click on Computer Account and choose local comouter on the next window.
5. Close the Add or Remove Snap-ins dialog and click OK to return to the main MMC window.
6. Right-click on Intermediate Certification Authorities and choose All Tasks, then click Import.
7. Follow the wizard prompts to complete the installation procedure.
8. Click Browse to locate the certificate file. Change the file extension filter in the bottom right corner to be able to select the file. Click Open after selecting the appropriate file.
9. Click Next in the Certificate Import Wizard.

c.To Install the SSL Certificate
1. Select the Internet Information Service console within the Administrative Tools menu.
2. Select the website (host) for which the certificate was made.
3. Right mouse-click and select Properties.
4. Select the Directory Security tab.
5. Select the Server Certificate option.
6. The Welcome to the Web Server Certificate Wizard windows opens. Click OK.
7. Select Process the pending request and install the certificate. Click Next.
8. Enter the location for the certificate file at the Process a Pending Request window. The file extension may be .txt or .crt instead of .cer (search for files of type all files).
9. When the correct certificate file is selected, click Next.
10. Verify the Certificate Summary to make sure all information is accurate. Click Next.
11. Select Finish.

November 15, 2009

Error 1114: A dynamic link library (DLL) initialization routine failed.

Filed under: admins,General,Windows,Windows 2003 — Liju Mathew @ 11:08 pm

use command
C:\Inetpub\AdminScripts\adsutil.vbs set /MSFTPSVC/PassivePortRange "5500-5525"

do not use starting port < 5500 this will create the above error

November 12, 2009

MSSQL – Transferring ownership of a table

Filed under: admins,General,MSSQL,Windows 2003 — Liju Mathew @ 8:04 pm

Got another issue with the MSSQL migration.

I have restored the MSSQL 2005 database from one hosting company to another hosting. Then I modify the web.config to make the changes. But the site is not connecting even though all the access details are correct

<add name="ConnString" connectionString="Server=tcp:hostglobe-sql1.hostglobe.com;Database=mydatabase;User ID=myusername;Password=mypassword;Trusted_Connection=False;"/>

After few discussion with the developer they informed that error showing because of application can’t connect the database. If so what will be the reason ??

Solution

issue is with the schema. The schema is owned the database user name and not by the user ‘dbo”. I think that this “schema” means the table ownership of the ‘dbo’ user which is application use to connect it. Sorry, I am not fully confidence with MSSQL administration.

1. Open sql query window and execute the following scripts against each table even though it’s making angry.

USE mydatabase;
GO
ALTER SCHEMA dbo TRANSFER [myoldschema].mytable;

The following example modifies the schema “dbo” by transferring the table “mytable” from schema
“myoldschema” into the schema.

Note: Pls note that it’s a not a good idea to keep webiste and it’s database on different network

-Enjoy

October 23, 2009

Automated backup for MSSQL server 2005

Filed under: Applications,Windows,Windows 2003 — Liju Mathew @ 9:59 am
Tags:

Hello,

I have a requirement for taking daily backup SQL server 2005 express on a remote windows 2003 server. How to solve ??????

Yeah thinking and familiar with Google search will be your best friend. After the 2 hours search one of my tech-guy comes up with a solution. But I tested it through before implementing on the server.

After few months later I have need a smiler setup. Amazingly this will cause only 15 minutes to make things.
up.

Solutions

1. Download this program from http://www.lazycoding.com/downloads/SQLScheduler_LatestVersion.zip.
2. Copy the contents of the archive to a directory the target machine.
3. Run InstallService.bat file from the command prompt. The executing user account should have administrative rights on the machine. Make sure that service type is automatically started.
4. Click on SQLScheduler.exe and choose the database and set the backup scheduler. Pls also configure the mail server to get the detailed status of backup process.
5. Use my ftp program to upload the backup to remote FTP as well.

-Enjoy

October 15, 2009

PHP throws an Error on IIS "Invalid access to memory location"

Filed under: Windows,Windows 2003 — Liju Mathew @ 2:51 pm
Tags: , ,

How to solve the IIS error on php script execution.

Yesterday I setup a IIS which is configure to run Php scripts using ISAPI module. But after some time I noticed that things were not going correctly and I got php exception errors on web like “Invalid access to memory location”
Google will give some basic ideas but won’t work for me. I uses the latest Php version php 5.2.11 to install.

Solution.
Simply de-grade the php version to 5.2.3 will solve my problem.

Pls note that I can able to install php 5.2.11 on another windows 2003 web server. But this server running on Standard edition.

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.