A little something about everything

internet marketing and website development made simple..

How to get your business listed on the front page of Google for free

New Telemarketing scam for Google Bing Yahoo prompted me to write this quick blurb.

Prerecorded voice stating something like this:

We have an opening for first page placement in Google, this is a rare opportunity available today only so if you would like to take advantage if this press 1 now

 

You can easily get listed on Google by using adwords for a fee or by using the Google local listing service to add your business, which is free.

How to see if a sender is being spoofed in outlook: helping to prevent fraud and malware

Many times you may receive emails in Outlook that are pretending to be someone they are not, even sometimes they may appear to be coming from yourself.

Simple and effective way to see who the sender of each email really is,

  1. Click on the window where you view incoming emails, then click "view", "add columns"
  2. Now click "New Column" and name it something like "Sender"
  3. Change the Type to "Formula", click "edit" and enter the following: 
    right(([SearchFromEmail],[SearchFromEmail]),InStr(1,[SearchFromEmail],"@"))
    or right([SearchFromEmail],len([SearchFromEmail])-InStr(1,[SearchFromEmail],"@")) to show just the domain.

How to globally redirect all requests from http to https using asp.net

The most effective method will be to use the global.asax file, here is a basic example:

<script language="C#" runat="server">
protected void Application_BeginRequest(Object sender, EventArgs e)	{
if (HttpContext.Current.Request.Url.ToString().ToLower().Contains("http://"))
{
    HttpContext.Current.Response.Status = "301 Moved Permanently"; 
    HttpContext.Current.Response.AddHeader("Location", Request.Url.ToString().ToLower().Replace("http://","https://")); 
}
}
</script>

In some cases you may already have an application using the global.asax file, you can in many cases add the _BeginRequest function or adapt it if it already exists. For example add this after the <script runat="server"> tag but before any other code.

protected void Application_BeginRequest(object sender, EventArgs e)	{
	if (HttpContext.Current.Request.Url.ToString().ToLower().Contains("http://"))	{
	HttpContext.Current.Response.Status = "301 Moved Permanently"; 
	HttpContext.Current.Response.AddHeader("Location", Request.Url.ToString().ToLower().Replace("http://","https://")); 
	}

In some cases this will throw and error, before sure to check the rest of the global.asax file for any other begin requests that may be conflicting. In some cases you may need to adapt the code to work in parallel with exiting code.