background preloader

Tips & Tricks

Facebook Twitter

How do I force SSL on my ASP/.NET site on Cloud Sites? Below are three examples of how to force SSL on your ASP or ASP.NET site. web.config If your website has the IIS Rewrite Module available*, you can use rewrite rules in your web.config to force SSL on all pages: Please contact support if you are unsure if the IIS Rewrite Module is available for your site. The above example could be modified to force SSL on one page or specific pages. ASP.NET (Non MVC 3) Using ASP.NET you can use this code snippet to force SSL on a page on your site: When using the "RequireHttps" attribute to decorate actions within your MVC application: Classic ASP Using classic ASP you can use this code snippet to force SSL on a page on your site: © 2011-2013 Rackspace US, Inc. Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License See license specifics and DISCLAIMER.

Minify JavaScript - Free JavaScript Compressor. Why Does Every Visitor To My Cloud Sites Website Have The Same IP Address? | Cloud Computing and Web Hosting Knowledge Center by Rackspace. 10 strike plan to grease your site for speed. - Webdistortion. I’ve recently spoke of the importance of speed with your website or blog. It can have a significant impact on site goals, and in many cases improve bounce rates and increase page views. Paying attention to detail and improving page load speed can really get your pages performing at their optimum.

Here are a collection of some of the best ways that you can achieve faster page loads. 1) All Sites – on page speed Javascript Google host a variety of popular javascript libraries for web developers, and this standardised hosting platform provides a central repository for developers. This has a couple of benefits. 2) Images There are a number of way to optimise images for speed. I’ve found in the past the compression engine within Fireworks to be superior to Photoshop when analysing quality verses size. 3) Lowering web requests Web requests are individual web page calls to a web server for a file. 4) Client Side Compression 5) Server Side Compression 6) Position of elements 7) Server side code speed. ASP.NET - Browser speed on localhost. Ascii Table - ASCII character codes and html, octal, hex and decimal chart conversion. How can I test PHP mail functionality? | Cloud Computing and Web Hosting Knowledge Center by Rackspace.

You can use the following code saved into a file with a .php extension to test PHP mail functionality: IMPORTANT NOTE: We strongly recommend using an SMTP relay that requires authentication. Sending mail through unauthenticated SMTP servers (including the localhost relay on Cloud Sites) can result in delays or undelivered email due to stringent anti-spam filters. Or you can use this test code: © 2011-2013 Rackspace US, Inc. Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License See license specifics and DISCLAIMER. Filezilla: Avoid SVN/CVS files. If you use FileZilla as an FTP client and you use version control such as SVN or CVS, you may notice that you actually FTP those meta folders (“.svn” and “cvs”) along with your real data files. Those version control folders are not meant to be tranferred over with your real data and it can be a pain to delete all of them on the remote server.

Not to mention, depending on who has access to the server, those files can give the user access to the repository and therefore they pose a security risk. FileZilla offers a really nice option to ignore those folder so you no longer even see them nor do you transfer them over with your files. Directory Listing Filters The key to fixing this issue is to go to View > Filename filters… Just check the CVS and SVN directories option and FileZilla will no longer display those. A Gotcha Identifying the User's IP Address. Recently I wrote a .NET based Akismet API component for Subtext. In attempting to make as clean as interface as possible, I made the the type of the property to store the commenter’s IP address of type IPAddress. This sort of falls in line with the Framework Design Guidelines, which mention using the Uri class in your public interface rather than a string to represent an URL. I figured this advice equally applied to IP Addresses as well.

To obtain the user’s IP Address, I simply used the UserHostAddress property of the HttpRequest object like so. HttpContext.Current.Request.UserHostAddress The UserHostAddress property is simply a wrapper around the REMOTE_ADDR server variable which can be accessed like so. HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] For users behind a proxy (or router), this returns only one IP Address, the IP Address of the proxy (or router). Thus to get the real IP address for the user, it makes sense to check the value of this first: Adding a nullable column can update the entire table. In a previous article Online non-NULL with values column add in SQL Server 2012 I talked about how adding a non-null column with default values is now an online operation in SQL Server 2012 and I mentioned how the situation when the newly added column may increase the rowsize can result in the operation being performed offline: In the case when the newly added column increases the maximum possible row size over the 8060 bytes limit the column cannot be added online.

In this article I want to show you how such a situation can arise and how it impacts even the case that prior to SQL Server 2012 was always online, namely adding a nullable column. Lets consider the following example: If you run the snippet above in SQL Server 2005, SQL Server 2008 or SQL Server 2008 R2 it will succeed, and the column some_int will be added online, as a metadata only operation. However, the resulting table has some interesting properties. Lets try to update the newly added some_int column: OK, how about this: