MS SQL – Missing Index

SELECT
id.index_handle,
DB_NAME(id.database_id),
id.object_id,
id.statement AS object_name,
gs.avg_user_impact,
gs.avg_total_user_cost,
id.equality_columns,
id.inequality_columns,
id.included_columns,
gs.unique_compiles,
gs.user_seeks,
gs.last_user_seek,
gs.last_system_seek,
gs.user_scans,
gs.last_user_scan,
gs.system_scans
FROM sys.dm_db_missing_index_details AS id
INNER JOIN sys.dm_db_missing_index_groups AS g
ON id.index_handle = g.index_handle
INNER JOIN sys.dm_db_missing_index_group_stats AS gs
ON g.index_group_handle = gs.group_handle
ORDER BY gs.avg_user_impact DESC

Advertisements
Posted in Uncategorized | Leave a comment

http://www.helloerik.com/the-subtle-magic-behind-why-the-bootstrap-3-grid-works

Great artical about Bootstrap 3!

Link | Posted on by | Tagged | Leave a comment

An attempt was made to access a socket in a way forbidden by its access permissions XXX.XX.XXX.XX:21

Got error the below while running your application  in your local machine that tries to connect a FTP server?

An attempt was made to access a socket in a way forbidden by its access permissions XXX.XX.XXX.XX:21

Solution: Turn off your antivirus that prevents the program to execute. In case if you are using McAfee then turn off your McAfee McShield windows service. Local system admin can do that even in enterprise versions.

Posted in Uncategorized | Tagged , | Leave a comment

Activation error occured while trying to get instance of type Invoker, key “”

Solution: When you the below error, change your LifeStyle from PerWebRequest to desired style. 

Cause: PerWebRequest can run only in the context of a request and not outside it, which is exactly what Application_Start is.
{"Looks like you forgot to register the http module Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule\r\nTo fix this add\r\n<add name=\"PerRequestLifestyle\" type=\"Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.Windsor\" />\r\nto the <httpModules> section on your web.config.\r\nIf you plan running on IIS in Integrated Pipeline mode, you also need to add the module to the <modules> section under <system.webServer>.\r\nAlternatively make sure you have Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 assembly in your GAC (it is installed by ASP.NET MVC3 or WebMatrix) and Windsor will be able to register the module automatically without having to add anything to the config file.\r\n"}
Posted in Uncategorized | Tagged | Leave a comment

Secure FTP, FTP/SSL, SFTP, FTPS, FTP, SCP… What’s the difference?

Today I certainly understand, What’s are all the different FTP communication protocols & layers available and how to call them now. Thanks for Rebex product team to for their extensive documentation in simple terms.

FTP – should be only used for the plain old FTP protocol.

SFTP – should be only used for SFTP, the SSH file transfer protocol. However, people often shorten Secure FTP into SFTP – this is not correct, because the S in SFTP does not stand for Secure, but for SSH.

SFTP2 – this confusing name is used by some vendors to highlight the obvious fact that their SFTP protocol runs over SSH2. For all practical purposes, consider this to be a synonym of SFTP, because SSH1 has been deprecated for many years.

Secure FTP – this name is the most confusing, because it is used to refer to either of the two different protocols. Whenever this name is used, it is necessary to specify whether the SSH-based or SSL-based file transfer protocol is meant.

SSH FTP, FTP over SSH – fortunately, these names are not used very often. They usually refer to SFTP, the SSH file transfer protocol. Even though it is possible to run the (slightly modified) plain old FTP protocol over SSH, this is not very common.

FTP/SSL, FTP/TLSFTPover SSLFTP over TLS, FTPS – should be only used for FTP over TLS/SSL.

SFTP over SSL – although the SFTP protocol can utilize any underlying data stream, in practice SFTP over anything other that SSH is very rare. It is much more likely the term was used by mistake in place of either “SFTP over SSH” or “FTP over SSL”.

SCP – should be only used for scp protocol/utility, a variant of BSD rcp. Some applications with SCP in its name now use SFTP by default instead – examples of this practice are WinSCP application and scp2 utility.

TFTP is yet another file transfer protocol different from any of above.

Secure communication layers

Additionally, there are the following two secure communication layers:

SSH – a protocol that allows establishing a secure channel between the local and the remote computer. Serves as an underlying channel for associated protocols such as secure shell, port forwarding, SFTP or SCP. While it is possible to run the (slightly modified) plain old FTP protocol over SSH, this is not very common, fortunately. File transfer over SSH is nearly always done using SFTP or SCP.

TLS – this is almost generally known primarily by its old name – SSL – and provides a way of securing otherwise unsecure protocols such as HTTP, SMTP, POP3 or FTP. Please note that SSL 3.1 is called TLS 1.0, and therefore TLS 1.0 is a newer version of the protocol than SSL 3.0, despite the lower version number. HTTP over SSL is often called HTTPS, and FTP over SSL is often called FTPS and has two variants, explicit (starts as an unencrypted FTP session and is secured on client request) and implicit (is secured right from the beginning and therefore needs a separate TCP port, usually 990). The implicit mode is deprecated, but still widely used. 

 

Communication protocols

Basically, there are the following file transfer protocols around:

FTP – the plain old FTP protocol that has been around since 1970s. The acronym stands for “File Transfer Protocol”. It usually runs over TCP port 21.

SFTP – another, completely different file transfer protocol that has nothing to do with FTP. SFTP runs over an SSH session, usually on TCP port 22. It has been around since late 1990s. The acronym actually stands for “SSH File Transfer Protocol”.

SCP – a variant of BSD rcp utility that transfers files over SSH session. The SCP protocol has been mostly superseded by the more comprehensive SFTP protocol and some implementations of the “scp” utility actually use SFTP instead.

Posted in Communical Protocol | Tagged , , , , , | Leave a comment

Code Syntax Highlighter

SyntaxHighlighter is a fully functional self-contained code syntax highlighter developed in JavaScript. To get an idea of what SyntaxHighlighter is capable of, have a look at the demo page.

SyntaxHighlighter is currently used by Apache, Aptana, Mozilla, Yahoo, WordPress, Bug Labs, Freshbooks and others.

Link | Posted on by | Tagged | Leave a comment

A great tutorial for ASP.NET MVC 3 Internationalization

ASP.NET MVC 3 Internationalization – Part 2 (NerdDinner)

Posted in Uncategorized | Leave a comment