Run ASP.NET Website with .NET Framework v1.1 on IIS 8 Windows Server 2012


1) Install IIS with IIS6 meta base compatibilities
2) Install Framework V1.1, SP1 and Security patches.
3) Enable V1.1 in IIS ISAPI and CGI Restrictions.
4) Deploy Site and See if it works. If it didn't work and gives 404 handlers errors goto next step.
5) In web.config add following 1.1 handler mappings just above this tags </configuration>







<system.webServer>
        <handlers>
            <add name="ASPNET-ISAPI-1.1-WebServiceHandlerFactory" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.Net\Framework\v1.1.4322\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv1.1,bitness32" />
            <add name="ASPNET-ISAPI-1.1-SimpleHandlerFactory" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.Net\Framework\v1.1.4322\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv1.1,bitness32" />
            <add name="ASPNET-ISAPI-1.1-HttpRemotingHandlerFactory-soap" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.Net\Framework\v1.1.4322\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv1.1,bitness32" />
            <add name="ASPNET-ISAPI-1.1-PageHandlerFactory" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.Net\Framework\v1.1.4322\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv1.1,bitness32" />
            <add name="ASPNET-ISAPI-1.1-HttpRemotingHandlerFactory-rem" path="*.rem" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.Net\Framework\v1.1.4322\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv1.1,bitness32" />
            <remove name="ASPNET-ISAPI-1.1-AXD" />
            <add name="ASPNET-ISAPI-1.1-AXD" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv1.1,bitness32" />
        </handlers>
</system.webServer>


Enjoy the running site :)
Note: Make sure to backup your current configs.

Thank you,






These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Factors Influencing Consumers Purchase Intentions towards Private Brands

Abstract

The change in market trends, of late, is marked by the growth of ‘brands’ for consumable items. Now, people prefer ‘branded’ products even for household use instead of random selection. Keeping in view the changing trend, this study explores the factors influencing purchase of private brands in Karachi and to understand how those factors affect the purchase intentions of consumers towards private brands.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

How to check if a file exists on remote/local server using php

Linking to a file or displaying an image from remote server is very common practice these days. But problem occurs when the file is not there on the remote server and our page starts showing a broken link. For this problem I have few solutions that will help you in avoiding this issue.

Solution # 1: Using file_exists()

Syntax
file_exists(string $filename)

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Creating a connection to MySQL in PHP - Php For Beginners - Lesson 11

Whenever we want to access the data in the mysql database using php, we have to create a connection to that particular database. Once the connection is establish we can insert and retrieve any data from the mysql database.

Creating a Mysql connection is quite simple in php, a simple built-in php function "mysql_connect()" is used for this purpose.

Syntax:

mysql_connect(servername,username,password); 
Where servername is the name of the server to connect, username and password are the credentials used to connect to the database.

Selecting a Database:
Once a connection is established to the database, we have to select the particular database that we want to use for inserting and fetching the data. This can be done by using another built-in php function "mysql_select_db()".
Syntax:
mysql_select_db(database,connection)
Where database is the name of the database and connection is the connection created in the earlier part of this article.

Working Example:
Since connecting and selecting the database is required each time we want to use a database. So we can save the code for creating the connection and selecting the database in a file and include it wherever we want to use the database. You can name that file as "connection.php" or whatever other name you want. Contents of this file are as follows:
<?php
$db_host="localhost";
$db_user="root";
$db_pass="";
$db_name="any_db";

$con=mysql_connect($db_host,$db_user,$db_pass) or die ('Can not connect to database');
mysql_select_db($db_name,$con) or die ('Can not Select Database');
?>
If you are using this code on the local server then the above mentioned configuration will work fine, as the default host/server name is always "localhost", user name is always "root" and password is always "" for the local server, but if you are using it on some web server then you have to change these settings to your web server's settings. The db_name is the name of the database that you want to select.

Well I guess this is all for this lesson, for any queries, should you have, feel free to comment and ask.

next Previous Lesson

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Enable double escaped sequence in IIS 7

HTTP Error 404.11 – URL_DOUBLE_ESCAPED 

Add the following code in application host file and it will allow double escaped sequence for the default website and those child websites under it.
Open %windir%\System32\inetsrv\config\applicationHost.config

Details # http://support.microsoft.com/kb/942076

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati