วิธีการใช้งานเว็บไซต์ผ่านโดเมนเนม ก่อนการแก้ไข DNS จริง

User Guide May 21st, 2008

ขั้นตอน:

  1. ใช้ notepad เปิดไฟล์ C:\WINDOWS\system32\drivers\etc\hosts ขึ้นมา
  2. บรรทัดล่างสุดของไฟล์ เติมรายการตามด้านล่างนี้
    IP www.domain.com
    IP domain.com
    IP ftp.domain.com
    IP mail.domain.com
    IP webmail.domain.com
  3. save file ให้เรียบร้อย
  4. เลือก start > run พิมพ์ cmd แล้ว enter
  5. พิมพ์ ipconfig /flushdns
  6. พิมพ์ ping domain.com ถ้าเป็น ip ที่ถูกต้องเป็นอันเสร็จเรียบร้อย

โน๊ต:
- “IP” ในที่นี้หมายถึง IP Address ที่ได้จากผู้ให้บริการ หรือเครื่องเซิร์ฟเวอร์ของเราเอง
- “domain.com” ในที่นี้หมายถึงโดเมนของท่านที่สมัครทดลองใช้บริการ
- ถ้า “จำเป็น” ต้องการให้ในเครื่องสามารถเข้าได้ทั้งที่เดิมและที่ใหม่ ให้ลบ บรรทัด www. ออก
- เมื่อมีการอัพเดต DNS แล้ว ให้ทำซ้ำอีกรอบแต่ข้อ 2 เปลี่ยนจากเพิ่ม เป็นลบออก
- ถ้า ping แล้วเป็น IP เดิมอยู่ ให้รอง restart เครื่อง หรือ modem/router

Tags: , ,

การตั้งค่า Mail Auto Response ใน Plesk

Mail April 28th, 2008

Auto Response ใช้ในกรณีที่ต้องการให้ระบบตอบกลับผู้ส่งทันที เมื่อมีมีอีเมล์เข้ามา สามารถนำไปใช้ในกรณี บริษัทหยุดช่วงเทศกลา ให้ติดต่อกลับมาอีกครั้งวันที่เท่าไหร่ เป็นต้น

ขั้นตอนการตั้งค่า Auto Response หรือ Autoresponders ใน Plesk
1. Login เข้า Plesk (Hosting Control Panel)
2. เข้า Mail และเลือก Mail ที่ต้องการ
3. เข้า Autoresponders > Add new autoresponders
4. กรอกข้อมูลตามต้องการ และตรง Limits ให้เลือก 1 ครั้งต่อวัน
5. คลิ๊ก OK และกด Switch On

Tags: ,

วิธีแสดงไฟล์ .htaccess ใน CuteFTP

FTP April 26th, 2008

1. Go to the site manager and edit the settings for the server of your liking.
2. Under the “general” tab click on the “Enable Filter” checkbox and then the “Filter” button.
3. Under the “Options” tab check “Enable remote filters” and enter “-la” (without the quotes) into the “remote filter” text box.

Tags:

Solving MS SQL 2005: Timeout expired

MS SQL Server April 25th, 2008

ข้อความ Error:
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

สาเหตุ:
หลังจากที่ทำการเปิด SQL Connection แล้วไม่มีการปิดเป็นเวลานาน
อาจเนื่องมาจาก code ที่เราสั่งให้จัดการกับ SQL มีหลายชุดคำสั่งซ้อนกันอยู่

วิธีแก้ไข:
1. ให้เราทำการ เปิด-ปิด connection บ่อยมากขึ้น หรือ
2. เพิ่มค่า timeout “CommandTimeout = 50″ (50 = 50 วินาที) หรือลองดูตาม code ตัวอย่างด้านล่าง

Public Shared Function Query(ByVal sql As string) as string
Dim Data As String = String.Empty
Dim connString as String = ConfigurationManager.AppSettings("conString")

Using conn As New SqlConnection(connString)
Dim cmd As New SqlCommand(sql, conn)
cmd.CommandTimeout = 50;
Try
conn.Open()
Data = cmd.ExecuteScalar().ToString()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Using

return Data
End Function

อ้างอิงจาก: http://forums.asp.net/t/1252358.aspx

Tags: ,

วิธี Import/Export MS SQL 2005 บน Plesk

MS SQL Server April 24th, 2008

ก่อนเริ่มลงมือ
- ต้องสร้าง Database และระบุ Username ใน Plesk ให้เรียบร้อยก่อน
- ติดตั้งโปรแกรม Microsoft SQL Server Management รุ่น 2005 Enterprise Edition (Express ใช้ไม่ได้)

ขั้นตอน
1.  เปิดโปรแกรม Microsoft SQL Server Management ในเครื่องเรา
2. เข้าไปที่ Datababase ที่ต้องการ export
3. คลิ๊กขวา เลือก Tasks > Export Data
4. กด Next แล้วจะขึ้น Choose a Data Source
5. กด Next จะขึ้น Choose a Destination
6. ช่อง Server พิมพ์ชื่อโดเมน
7. ในกรอบ Authentication เลือก SQL Authenticattion แล้วกรอก Username/Password ตามที่ระบุไว้ใน Plesk
8. ช่อง Database ใส่ชื่อ Database ที่ระบุไว้ใน Plesk แล้วกด Next
9. เลือก Copy data from one or more tables or views
10. เลือก Select All แล้วกด Next
11. จะขึ้น Save and Execute Package ให้กด Next อีกครั้ง แล้วกด Finish

Tags: ,

Copyright © 2008 iBiz Network Co., Ltd. Powered by wordpress, Theme by ericulous