Search This Blog

Friday, December 14, 2012

Application Request Routing IIS

IIS Application Request Routing (ARR) 2.5 enables Web server administrators, hosting providers, and Content Delivery Networks (CDNs) to increase Web application scalability and reliability through rule-based routing, client and host name affinity, load balancing of HTTP server requests, and distributed disk caching. With ARR, administrators can optimize resource utilization for application servers to reduce management costs for Web server farms and shared hosting environments.

Microsoft Application Request Routing (ARR) for IIS 7 and above is a proxy-based routing module that forwards HTTP requests to content servers based on HTTP headers, server variables, and load balance algorithms. ARR can be used to:
  • Increase application availability and scalability.
  • Better utilize content server resources.
  • Facilitate application deployment including pilot management and A/B testing.
  • Lower management costs and create opportunities for shared hosters.
Install Application Request Routing

The Application Request Routing installer package contains the following components:
  • Microsoft URL Rewrite Module for IIS.
  • Microsoft Web Farm Management Version 1 for IIS.
  • Microsoft Application Request Routing Version 1 for IIS.
  • Microsoft External Cache Version 1 for IIS.
Download:

Microsoft Application Request Routing Version 2.5 for IIS 7 (x64)

Microsoft Application Request Routing Version 2.5 for IIS 7 (x86)





kill SQL Server

SQL Server > Transact-SQL > Kill

Terminates a user process that is based on the session ID.  

  • if the specified session has a lot of work to undo, the KILL statement may take some time to complete
  • KILL can be used to terminate a normal connection, which internally terminates the transactions that are associated with the specified session ID. 
  • can also be used to terminate orphaned and in-doubt distributed transactions when Microsoft Distributed Transaction Coordinator (MS DTC) is in use.


Example

exec sp_who

Results:
spid ecid status         loginame hostname    blk dbname                    cmd request_id
53   0       suspended sa            pc01            0    db                             DELETE 0

kill 53

Results:
Command(s) completed successfully.




sp_who SQL Server

SQL Server > System Stored Procedures > sp_who

Returns information about current users, sessions, and processes.
 Syntax: sp_who [ loginame | sessionID | 'ACTIVE' ]  

Example
Find the spid and kill user process.

exec sp_who

Results:
spid ecid status         loginame hostname    blk dbname                    cmd request_id
53   0       suspended sa            pc01            0    db                             DELETE 0

kill 53


sp_who2 is undocumented and unsupported. sp_who2 adds some extra columns which sp_who does not include.

EXEC sp_who2




Thursday, December 13, 2012

If function Excel

Excel > Functions > IF

The IF function returns one value if a condition you specify evaluates to TRUE, and another value if that condition evaluates to FALSE.
       IF(logical_test, [value_if_true], [value_if_false])
 
Example:







Response.IsClientConnected asp.net

ASP.NET > Web > HttpResponse > IsClientConnected

The IsClientConnected property is a read-only property that indicates if the client has reset the connection to the server.

This property enables you greater control over circumstances where the client may have reset the connection to the server. For example, if a long period of time has elapsed between when a client request was made and when the server responded, it may be beneficial to make sure the client is still connected before continuing with something.

Example

If Not Response.IsClientConnected Then 
  Response.Redirect("login.aspx")
End if

Response.Redirect asp.net

Redirects a client to a new URL. Specifies the new URL and whether execution of the current page should terminate.

Parameters

url
The target location.
endResponse
Indicates whether execution of the current page should terminate.

bool continue;

// some code

if (continue)
{
    Response.Redirect("page.aspx", false);
}
else
{
    Response.End();
}

HttpCookie asp.net

ASP.NET > HttpCookie 

The HttpCookie class gets and sets properties of individual cookies.

HttpCookie loginCookie = Request.Cookies.Get("loginCookie");
if (loginCookie == null)
{
     loginCookie = new HttpCookie("loginCookie");
     loginCookie.Value = txtUsr.Text;
     loginCookie.Expires = DateTime.Now.AddDays(15);
     Response.Cookies.Add(loginCookie);
}