Category Archives: Developers

Install Python from Source on Linux

\r\n\r\n\r\nThis article is helpful for you to install Python from source on Linux system. Follow the steps as describes below:\r\n\r\nlocalhost:~$ su −\r\n\r\n\r\nPassword: [enter your root password]\r\n\r\n\r\nlocalhost:~# wget http://www.python.org/ftp/python/2.3/Python−2.3.tgz\r\n\r\n\r\n Resolving www.python.org… done.\r\n\r\n\r\n Connecting to www.python.org[194.109.137.226]:80… connected.\r\n\r\n\r\n HTTP request sent, awaiting response… 200 OK\r\n\r\n\r\n Length: 8,436,880 [application/x−tar]\r\n\r\n\r\n …\r\n\r\n\r\nlocalhost:~# tar xfz Python−2.3.tgz\r\n\r\n\r\nlocalhost:~# cd Python−2.3\r\n\r\n\r\nlocalhost:~#/Python−2.3# ./configure\r\n\r\n\r\n checking MACHDEP… linux2\r\n\r\n\r\n checking EXTRAPLATDIR…\r\n\r\n\r\n checking for −−without−gcc… no\r\n\r\n\r\n …\r\n\r\n\r\nlocalhost:~#/Python−2.3# make\r\n\r\n

gcc −pthread −c −fno−strict−aliasing −DNDEBUG −g −O3 −Wall −Wstrict−prototypes\r\n

\r\n

−I. −I./Include −DPy_BUILD_CORE −o Modules/python.o Modules/python.c\r\n

\r\n

gcc −pthread −c −fno−strict−aliasing −DNDEBUG −g −O3 −Wall −Wstrict−prototypes\r\n

\r\n

−I. −I./Include −DPy_BUILD_CORE −o Parser/acceler.o Parser/acceler.c\r\n

\r\n

gcc −pthread −c −fno−strict−aliasing −DNDEBUG −g −O3 −Wall −Wstrict−prototypes\r\n

\r\n

−I. −I./Include −DPy_BUILD_CORE −o Parser/grammar1.o Parser/grammar1.c\r\n

\r\n…\r\n\r\n\r\nlocalhost:~/Python−2.3# make install /usr/bin/install −c python /usr/local/bin/python2.3\r\n\r\n\r\n…\r\n\r\n\r\nlocalhost:~/Python−2.3# exit\r\n\r\n\r\n# logout\r\n\r\n\r\nlocalhost:~$ which python\r\n\r\n\r\n /usr/local/bin/python\r\n\r\n\r\nlocalhost:~$ python\r\n\r\n

Python 2.3.1 (#2, Sep 24 2003, 11:39:14)\r\n

\r\n

[GCC 3.3.2 20030908 (Debian prerelease)] on linux2\r\n

\r\n

Type “help”, “copyright”, “credits” or “license” for more information\r\n

\r\n

 

\r\n

>>> [press Ctrl+D to get back to the command prompt]\r\n

\r\n \r\n\r\nlocalhost:~$\r\n\r\n\r\n \r\n\r\n \r\n\r\nNote: All images, logos and trademarks shown on this site are property of their respective organizations

How To Enable AJAX .NET Framework 3.5 on IIS7 Server

IIS versions before 7.0 did not require <handlers> for AJAX to work.\r\nIf you are installing AJAX on new IIS7 servers, you will have to make sure you have the following code in your web.config:\r\n

<!--  \r\n The system.webServer section is required for running ASP.NET AJAX under Internet \r\n Information Services 7.0.  It is not necessary for previous version of IIS. \r\n --> \r\n <system.webServer> \r\n <validation validateIntegratedModeConfiguration="false"/> \r\n <modules> \r\n <remove name="ScriptModule"/> \r\n <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> \r\n </modules> \r\n <handlers> \r\n <remove name="WebServiceHandlerFactory-Integrated"/> \r\n <remove name="ScriptHandlerFactory"/> \r\n <remove name="ScriptHandlerFactoryAppServices"/> \r\n <remove name="ScriptResource"/> \r\n <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> \r\n <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> \r\n <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> \r\n </handlers> \r\n </system.webServer>

How To Fix ‘Microsoft.Jet.OLEDB.4.0′ error

\r\n

Problem:

\r\n

\r\n
Server Error in ‘/’ Application.

\r\n

——————————————————————–

\r\n

The ‘Microsoft.Jet.OLEDB.4.0′ provider is not registered on the local machine.

\r\n

Description: An unhandled exception occurred during the execution of the current web request.

\r\n

Please review the stack trace for more information about the error and where it originated in the code.

\r\n

Exception Details: System.InvalidOperationException: The ‘Microsoft.Jet.OLEDB.4.0′

\r\n

provider is not registered on the local machine.

\r\nSolution:\r\n\r\nYou will get this error on Windows Server 2008 R2 or Windows 7 64 bit. To fix it, switch your Application Pool from Native 64 bit to 32 Bit more under Advanced Settings.\r\n\r\nSuggestion:\r\n\r\nIt is also suggested that you upgrade your application to new ACE OLEDB provider, you can download from here.

How To Fix overrideMode=”Deny” Error (HTTP Error 500.19)

HTTP Error 500.19 - Internal Server Error\r\nThe requested page cannot be accessed because the related configuration data for the page is invalid.\r\nConfig Error\r\nThis configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".\r\n226:     <system.webServer>\r\n227:         <handlers>

\r\nIf you get the error above, you have to make a change in ApplicationHost.config file. To fix this error follow the steps as  below:\r\n

    \r\n
  • Open ApplicationHost.config file in notepad This file is located under C:\Windows\System32\inetsrv\config
  • \r\n

  • Search for <location path=”Default Web Site” overrideMode=”Deny”>
  • \r\n

  • Replace with: <location path=”Default Web Site” overrideMode=”Allow”>
  • \r\n

\r\nChange “Default Web Site”  with the name of your website.\r\n\r\nNOTE: On 64 bit Windows, if you are using 32 bit editor or File Manager, you will NOT be able to see any files in the config folder. Navigate using Windows Explorer or Notepad in native 64 bit mode.

How to Create Rewrite Rule in web.config

If you need a domain URL redirection from yourdomain.com to www.testdomain.com or vise versa, you can do something like this:\r\n\r\nPlace either of these (depending on what you’d like done. And edit to match your domain) inside the <system.webServer></system.webServer> tags in the web.config of the domain.\r\n

<rewrite><rules>\r\n<rule name=”Add WWW prefix” >\r\n<match url=”(.*)” ignoreCase=”true” />\r\n<conditions>\r\n<add input=”{HTTP_HOST}” pattern=”^testdomain\.com” />\r\n</conditions>\r\n<action type=”Redirect” url=”http://www.testdomain.com/{R:1}”\r\nredirectType=”Permanent” />\r\n</rule>

\r\n—————–\r\n

<rule name=”Remove WWW prefix” >\r\n<match url=”(.*)” ignoreCase=”true” />\r\n<conditions>\r\n<add input=”{HTTP_HOST}” pattern=”^www\.testdomain\.com” />\r\n</conditions>\r\n<action type=”Redirect” url=”http://yourdomain.com/{R:1}”\r\nredirectType=”Permanent” />\r\n</rule>\r\n</rules></rewrite>

\r\n

Note: This is applicable on websites hosted on IIS 7.0 or 7.5 (on Windows Server 2008).

Mono 2.8 is Released.

The Mono developers have released Mono 2.8, a major update to the implementation of Microsoft’s .NET technology for Linux and other platforms.Mono 2.8 Released\r\n\r\nMiguel de Icaza, project lead, said in his blog that the release “contains ten months worth of new features, stability fixes, performance work and bug fixes”. The Mono C# compiler is now a complete implementation of the C# 4.0 specification and defaults to operating as a 4.0 based platform.\r\n\r\nA new Generational GC (Garbage collector) offers better performance for applications which consume and reuse large amounts of memory; benchmarkingshows CPU use is now much more predictable. Support for LLVM has now been marked as stable with a mono-llvm command allowing server applications to run with an LLVM back end, potentially offering greater performance; JIT compilation with LLVM is described as “very slow” in the release notes and therefore only currently suits long-lived server processes.\r\n\r\nOther changes include the incorporation of a range of new frameworks; the Parallel Framework and System.XAML are new to the core of Mono, while Microsoft’s open sourced frameworks (System.Dynamic, Managed Extensibility Framework, ASP.NET MVC 2 and the OData client framework System.Data.Services.Client) are bundled with Mono. Support for OpenBSD has also been incorporated into the release.\r\n\r\nMono 2.8 is not a long term support release as the updates have “not received as much testing as they should”; Mono 3.0 will be the next long term supported release and users wanting the “absolute stability” of a thoroughly tested version are recommended to use Mono 2.6. Information on other new features and details of removed libraries are available in the release notes. Mono 2.8 is available to download for Windows, Mac OS X, openSUSE, Novell Linux Enterprise Desktop and Server, Red Hat Enterprise Linux and CentOS and other Linux systems and is licensed under a combination of open source licences.

ASP.Net Vulnerability Patch released: Microsoft Security Bulletin MS10-070

Vulnerability in ASP.NET Could Allow Information Disclosure (2418042)

\r\n

\r\n\r\nMicrosoft released ASP.net Vulnerability path through Download centre, for details please click here.\r\n
\r\n\r\nThis security update resolves a publicly disclosed vulnerability in ASP.NET. The vulnerability could allow information disclosure. An attacker who successfully exploited this vulnerability could read data, such as the view state, which was encrypted by the server. This vulnerability can also be used for data tampering, which, if successfully exploited, could be used to decrypt and tamper with the data encrypted by the server. Microsoft .NET Framework versions prior to Microsoft .NET Framework 3.5 Service Pack 1 are not affected by the file content disclosure portion of this vulnerability.\r\n\r\nThis security update is rated Important for all supported editions of ASP.NET except Microsoft .NET Framework 1.0 Service Pack 3. For more information, see the subsection,Affected and Non-Affected Software, in this section.\r\n\r\nThe security update addresses the vulnerability by additionally signing all data that is encrypted by ASP.NET. For more information about the vulnerability, see the Frequently Asked Questions (FAQ) subsection for the specific vulnerability entry under the next section, Vulnerability Information.\r\n\r\nThis security update also addresses the vulnerability first described in Microsoft Security Advisory 2416728.\r\n\r\nRecommendation. Microsoft recommends that customers apply the update at the earliest opportunity.\r\n\r\nSee also the section, Detection and Deployment Tools and Guidance, later in this bulletin.\r\n\r\nKnown Issues. Microsoft Knowledge Base Article 2418042 documents the currently known issues that customers may experience when installing this security update. The article also documents recommended solutions for these issues.\r\n\r\nThe patch is available through Microsoft download centre\r\n\r\n

\r\n