log4net “it is being used by another process” problem

Hi,

If you use log4net for logging, and try to download log file from ftp, sometimes “file is being used” problem occurs. There is a configuration for minimal locking the log file.

  • <log4net>
    • <appender…
      • <lockingModel type=”log4net.Appender.FileAppender+MinimalLock” />
    • </appender>
  • </log4net>
Advertisements

Get Table Columns And Sizes

You can get SQL Server table columns and sizes with this query. Just change “___TABLE___NAME___” value with your table name.

 

CREATE TABLE #temp
(
colname varchar(50) NULL,
collen int NULL
)

INSERT INTO #temp (colname, collen)
SELECT column_name, character_maximum_length
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = ‘___TABLE___NAME___’
and data_type in(‘varchar’,’char’,’nvarchar’,’nchar’)

SELECT * FROM #temp

DROP TABLE #temp

Google Crawl Error 404

A word about 404 errors

One of the most common crawling errors are 404 errors, which occur when somebody tries to access a page that does not exist (usually because the page has been deleted or the user clicked on a broken or incorrect link). Most of the time, 404 errors can be ignored. However, if you’re seeing a lot of traffic leading to a URL that 404s, check your site for broken links. More information about dealing with 404 errors.

http://support.google.com/webmasters/bin/static.py?hl=en&page=checklist.cs&tab=1095580

Windows 7 – Enable Telnet

It’s very rare that I use Telnet these days, so it took a long time for me to notice that by default it was not packaged with Windows 7. I did some research and found out that this was also true for Windows Vista. More than likely this was an attempt to make Windows more secure by default, as Telnet is very insecure and whenever you have the choice you should always use SSH.
However, with that being said, you can quickly re-enable Telnet by following these steps:
  • Start
  • Control Panel
  • Programs And Features
  • Turn Windows features on or off
  • Check Telnet Client
  • Hit OK
  • After that you can start Telnet via Command Prompt.

Difference between POP3 and IMAP

What is the Difference between POP and IMAP Mail Server?

The using of IMAP to access your mailbox has advantages over POP3 and the difference of their working mechanism can be summarized in the following table.

POP3

IMAP

Since email needs to be downloaded into desktop PC before being displayed, you may have the following problems for POP3 access:

  • You need to download all email again when using another desktop PC to check your email.
  • May get confused if you need to check email both in the office and at home.

The downloaded email may be deleted from the server depending on the setting of your email client.

Since email is kept on server, it would gain the following benefits for IMAP access:

  • No need to download all email when using other desktop PC to check your email.
  • Easier to identify the unread email.
All messages as well as their attachments will be downloaded into desktop PC during the ‘check new email’ process. A whole message will be downloaded only when it is opened for display from its content.
Mailboxes can only be created on desktop PC. There is only one mailbox (INBOX) exists on the server. Multiple mailboxes can be created on the desktop PC as well as on the server.
Filters can transfer incoming/outgoing messages only to local mailboxes. Filters can transfer incoming/outgoing messages to other mailboxes no matter where the mailboxes locate (on the server or the PC).
Outgoing email is stored only locally on the desktop PC. Outgoing email can be filtered to a mailbox on server for accessibility from other machine.
Messages are deleted on the desktop PC. Comparatively, it is inconvenient to clean up your mailbox on the server. Messages can be deleted directly on the server to make it more convenient to clean up your mailbox on the server.
Messages may be reloaded onto desktop PC several times due to the corruption of system files. The occurrence of reloading messages from the server to PC is much less when compared to POP3.

Source: http://email.cityu.edu.hk/faq/popimap.htm