Author Archives: admin

Pass Array via Query String

http://galhano.com/?var=1&var=2&var=3&var=4

vb sample:

  Dim arr = Request.QueryString("var").Split(",")
  For Each s In arr
    Response.Write("<br />var:" & var)
  Next

Measure a function’s performance

Imports System.Diagnostics


Dim sw As New Stopwatch()
sw.Start()
' Do the work here
sw.Stop()
Console.WriteLine("Elapsed time: {0}", sw.Elapsed.TotalMilliseconds)

IIS 8.0 error 401.2

Goto  IIS Console > web site properties >IIS authentication and Activate “Basic Authentication”

WordPress Pretty Permalinks on IIS 7.0

Just create a web.config  in wordpress root dir:


<?xml version="1.0"?>

<configuration>

    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Main Rule" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
     </system.webServer>
</configuration>

Read more:

WordPress Pretty Permalinks on IIS 7.0


http://codex.wordpress.org/Using_Permalinks

Add value for dropdown list in asp.net


ListItem li =new ListItem();
 li.value="PT";
 li.Text="Portugal";
 dropdownlist1.Items.Add(li);

or


dropCategory.Items.Add( New ListItem( "Portugal", "PT" ) )

PT inaugura Datacenter na Covilhã com olhos postos na internacionalização

A primeira fase do projeto da PT na Covilhã abre hoje oficialmente as portas, inaugurando uma nova aposta da empresa que quer ser cada vez mais fornecedora de serviços de TI, transformando a operação e abrindo-se à internacionalização.

Dois anos depois de ter sido lançada a primeira pedra da construção a operadora abre a primeira fase do centro de dados que é ainda uma pequena parte do projeto global, pensado para integrar 4 edifícios. Zeinal Bava, CEO da PT Portugal e Presidente da Oi, assume na inauguração que este é um passo importante em direção à concretização do ciclo de transformação tecnológica que a PT está a desenvolver há mais de cinco anos e que sustenta uma estratégia de diferenciação da oferta da empresa.

read more »

Fix corrupted Public Folder in exchange 2003

Fix corrupted Public Folder in exchange 2003:

1. Dismount the store
2. From a command prompt, navigate to z:\program files\exchsrvr\bin folder where z: represents the drive where the exchange program files were installed.
3. Run

eseutil /p "z:\program files\exchsrvr\mdbdata\pub1.edb" 

4. Run

eseutil /d "z:\program files\exchsrvr\mdbdata\pub1.edb"

5. Run

 isinteg -s servername -fix -test alltests

(choose the Public Folders when prompted)
6. Run the above command again to make sure isinteg has fixed all errors (last line should read 0 errors and 0 fixes).
7. Re-mount the Public Folder store.

All should be repaired now.

Set Calendar Extender’s SelectedDate=”<%=DateTime%>”

&lt;asp:TextBox ID=&quot;txtDate&quot; runat=&quot;server&quot; &gt;&lt;/asp:TextBox&gt;
&lt;cc1:CalendarExtender ID=&quot;CalendarExtender1&quot; runat=&quot;server&quot; TargetControlID=&quot;txtDate&quot; Format=&quot;MM/dd/yyyy&quot; OnClientShowing=&quot;showDate&quot; &gt; &lt;/cc1:CalendarExtender&gt;
&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;
function showDate(sender,args)
{
if(sender._textbox.get_element().value == &quot;&quot;)
{
var todayDate = new Date();
sender._selectedDate = todayDate;
}
}
&lt;/script&gt;

Schedule Mysql Backups to Amazon S3 in Windows server 2008 R2

1 – Access Amazon Services, S3
2 – Create a New Bucket if there’s no one.
3 – Create credentials in  IAM Amazon Services
4 – Download the tool s3.exe for windows, from s3.codeplex.com

read more »

Enabling Pretty Permalinks in WordPress

This walkthrough describes how to enable “Pretty Permalinks” for blog posts in the WordPress blog engine that is installed on IIS 7 and above. Typically, without URL rewriting functionality on a Web server, WordPress users must use “Almost Pretty” URLs, for example, http://contoso.com/index.php/yyyy/mm/dd/post-name/. By using the URL Rewrite module, you can use “Pretty Permalinks,” for example, http://example.com/year/month/day/post-name/, for WordPress blogs that are hosted on IIS.
Prerequisites

This walkthrough requires the following prerequisites:

IIS 7 or above with FastCGI and PHP installed. If you need to install PHP, follow the instructions in this article.
WordPress installed. If you need to install WordPress, follow the instructions in this article or use the instructions from the official WordPress site.
URL Rewrite installed.

Note that for the purposes of this walkthrough it is assumed that WordPress is installed in a Web site root directory. If WordPress is installed in a subdirectory, then the rewrite rules that are used in this walkthrough should be included in the Web.config file that is located within the same subdirectory where the WordPress files are.

read more »