Blog

RSS
Happy New Year 2012 - Sunday, January 01, 2012
Happy New Year To All The Members Of Striving Programmers Community - Would like to thank you guys for supporting Striving Programmers Community throughout the entire year.




Happy New Year to you & your loved ones -Wishing you peace, prosperity & happiness.
Comments (2)
How to fix "The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))" - Saturday, December 17, 2011

Today, one of the websites that I developed started throwing an error message saying:


Server Error in '/' Application.

The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80070006): The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))]   System.Transactions.Transaction.JitSafeGetContextTransaction(ContextData contextData) +0   System.Transactions.Transaction.FastGetTransaction(TransactionScope currentScope, ContextData contextData, Transaction& contextTransaction) +169   System.Transactions.Transaction.get_Current() +121   System.Data.ProviderBase.DbConnectionPool.GetFromTransactedPool(Transaction& transaction) +15   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +147   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126   System.Data.SqlClient.SqlConnection.Open() +125   System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +52



Solution:

This kind of error usually comes when the COM object your InterOp is accessing is throwing an exception.  It is quite hard to give a straight forward answer without knowing that which COM your InterOp is calling.

So, there are 2 possible solutions that will fix this problem:


1st Solution) Under you IIS > Virtual Directory Properties > Execution Permissions might be marked as “Scripts and Executables” the dll is not being loaded so you are  getting “System.Runtime.InteropServices.COMException”

Try changing the Execution Permissions to “Scripts Only” and applying it - It should work now!

I am not sure about the exact different between the two so all I know is:

Scripts only  -> Run only scripts,such as ASP applications  and
Scripts and Executables -> Run both scripts, such as ASP applications, and executables



2nd Solution) On your server where you're website sits, open the command prompt and run the following command:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i - It should work now!

I hope it helps someone...

Comments (1)
How to fix "Couldn't install on USB storage or SD card" installation error on an android phone - Sunday, October 23, 2011

Today, I was trying to install an update for an application on my Android phone (Samsung Galaxy Ace - O.S: Froyo 2.2) and suddenly I received an error message saying:

Installation error

"Couldn't install on USB storage or SD card"


Then I recalled that I receive the same error message last week too (while installing an application). So I started digging into the log (logcat from the adb server) and finally I was able to find the problem, which is:


"Failed to create secure container smdl2tmp1"


After doing an online search, I found out that "smdl2tmp1.asec" is a temporary file that is being used during some installations (specifically for the apps that are movable to SD) but does not get deleted for some strange reason. Because of this, the system can't create it and treats it as an error, rather than simply deleting it.


Here's  the Solution:


Delete smdl2tmp1.asec manually.


You can find this file in this location:

/sdcard/.android_secure - It's an invisible folder on your SD card, which you can access with any file manager, like ASTRO
/mnt/secure/asec/ - You can access this folder by using a program like Root Explorer

Or you can just connect your phone to your PC (in USB mode) and look for the file in the above mentioned location(s).

Now, my phone is working fine and I don't see any error message during an installation or an update.


Comments (1)
1 Year Anniversary of Striving Programmers Community - Saturday, September 17, 2011
I started this Striving Programmers Community, launched it in August 2010 and the response has been amazing. Now, striving programmers community is being followed by many developers/programmers all over the world.

In 1 year from August 2010 - September 2011, we have received almost 103,494 page views with almost 16,839 unique visitors from 142 different countries.

I would like to thank each and every member who is part / member of this website because you are the people who make this website an active community.

Happy Programming :)

Comments (9)
Steps to install ASP.NET Orchard CMS - Monday, July 25, 2011
Today I am going to demonstrate all the steps involved in installing ASP.NET Orchard CMS.

You can download the latest version from here: http://www.orchardproject.net/download

For this example, I have downloaded the "full source code" version so that later on I can play with the code by making some modifications.

After downloading the latest version of orchard, you will get a zip file which you need to extract in a folder.

After that you will get 2 folders "lib" and "src"

Open the folder "src"

Now open the "Orchard" solution in Visual Studio (just double click on the solution file). You can see the highlighted solution file in the screenshot below:

Installing asp.net orchard cms



Once you're solution / project has been loaded up in visual studio, look for "Orchard.Web" > right click on it and select "Set as Startup Project".



Installing asp.net orchard cms



Now built your project or simply press "F5".

Now you should see the installation (Getting Started) screen in your browser.


Installing asp.net orchard cms


Fill out all the credentials for your website.

What is the name of your site ? (whatever you want to name your website)

Your admin username and password ( which you will use for configuring your website or in other word this user will be the "website owner")

In this example, I am installing Orchard on my local machine so I will select the following option for storing data:

- "Use an existing SQL Server (or SQL Express) database"


Installing asp.net orchard cms




On the other side, create a blank database for this using SQL Server (or SSMS) and let's name it as "Orchard".

Since, we have selected this option "Use an existing SQL Server (or SQL Express) database", we need to provide connection string.

In the connection string I will mention the name of the blank database "Orchard" which I just created so that all the tables and data will be created/stored in this database.

Here is my connection string:
Data Source=.\SQLEXPRESS;Initial Catalog=Orchard;Integrated Security=True;Persist Security Info=False


(If you are installing on a server then you can change it with your server name and add login credentials)

Now press the button "Finish Setup"

Installing asp.net orchard cms


If you followed all the steps correctly then within few seconds you will see your website has been installed successfully. Now, you should be able to see your website in the browser like this:


Installing asp.net orchard cms



To start setting up your website, click on "Dashboard" (at the bottom of your website).

Your admin section should look like this:



Installing asp.net orchard cms


Here you can manage your complete website - You can do a lot of thing like adding new pages, adding blog, managing users, themes, reports etc.

I really hope this helps somebody...

Comments (0)
The Internet Explorer 6 Countdown - Tuesday, July 19, 2011
Microsoft is hoping to shrink the usage of the Internet Explorer 6 (IE6) browser to below one percent so that web developers no longer have to support it when designing or updating websites.

Microsoft have a website specifically for this: http://www.ie6countdown.com/

Are you doing your part to encourage people to upgrade their Internet Explorer version?

Its name was Internet Explorer 6. Now that we’re in 2011, in an era of modern web standards, it’s time to say goodbye.

Source: microsoft
Comments (0)
Microsoft Releases Sneak Preview of Windows 8 - Saturday, June 04, 2011

microsoft windows 8

Microsoft has just unveiled Windows 8 to the world at Digital’s D9 conference. Windows 8 looks more like Windows Phone 7 and features an app management from Windows mobile operating system.

Microsoft also mentioned that there will be two kinds of applications for Windows 8, one that runs in a standard desktop, and the other apps will be based on HTML5 and Javascript.

The new user interface is specifically designed for touch but at the same time it works equally well with a mouse and keyboard.

Microsoft says the new OS will run on laptops, tablets and desktops when it appears.



Microsoft windows 8 includes the main elements like :

• Fast launching of apps from a tile-based Start screen, which replaces the Windows Start menu with a customizable, scalable full-screen view of apps.
• Live tiles with notifications, showing always up-to-date information from your apps.
• Fluid, natural switching between running apps.
• Convenient ability to snap and resize an app to the side of the screen, so you can really multitask using the capabilities of Windows.
• Web-connected and Web-powered apps built using HTML5 and JavaScript that have access to the full power of the PC.
• Fully touch-optimized browsing, with all the power of hardware-accelerated Internet Explorer 10.

Check out the video below:


Source: microsoft, engadget

Comments (2)
Changing the default value of SELECT or EDIT top rows in SQL Server Management Studio 2008 - Wednesday, May 18, 2011
Hello everyone,

Here I am going to show a simple trick to change the default value of SELECT or EDIT top rows in SQL Server Management Studio 2008.

In SQL Server Management Studio 2008, by default, the value set for SELECT and EDIT is 200 / 1000 top rows which makes it a problem if you want to edit and select more rows.

Select any database in the object explorer.

Right click on any database table and you will see the default value of SELECT / EDIT top rows like this:




In order to change these default values, Go to Tools > Options





Now you will get a pop-up window - At the left, select SQL Server Object Explorer > Commands

Now on the right hand side, you will see the default values that you can change according to your requirements

Value for Select Top <n> Audit records command
Value for Edit <n> Rows command
Value for Select Top <n> Rows command

(If you set 0, you will be able to select/edit all rows)




After changing the default value, Click OK

That's it - Now if you select any database in the object explorer and right click on any table, you will be able to select all (or number of top rows that you just saved)

Here's the result !!!!!




Tags: SQL, SSMS 2008
Comments (0)
How to create your first Asp.Net website using Visual Studio - Thursday, April 14, 2011
I have created this video tutorial for all the novice developers who are new to ASP.NET. In this video tutorial I am going to demonstrate "how to create your first asp.net website".



Here is the source code of asp.net website that I created in this video tutorial: Download Source Code
Comments (0)
Symbian Vs Android - Saturday, February 19, 2011
These days I am planning to buy a new phone. I don't wanna go for iPhone or Windows Mobile so I am a bit confused - whether I should buy a Symbian based phone or an Android based phone? I know this kind of discussion can easily generate flames or could be controversial that which one is better.

Symbian: I've used many symbian based phones and I am very comfortable with the symbian OS. In addition to that, I think symbian is in the market since a long time which makes it a stable OS. Symbian supports c++ programming and java.

Android: On the other hand android is quite new and it was launched in 2005 by google. Android is based upon a modified version of the Linux kernel. I have used linux based phones and quite impresses with the OS. Android initially came with android 1.0 and the latest version is android 2.3 (Gingerbread).

Yes with android OS, the users can access thousands of application but at the same time symbian OS offers huge range of 3rd party applications.

The main language used for Symbian programming is J2ME and C++. C++ API provides more lower level device access than J2ME. However, the C++ implementation is quite complex and error-prone. It will require Symbian OS a great effort to deliver something comparable to Android and iPhone.

The main programming language used for Android is Java, with many libraries from J2SE and third party open source projects, such as Apache commons, sqlite, webkit, etc.

I think Symbian OS has its own limitations and has been fully exploited. No more scope left in it now. In few things it falls way behind as compared to other OS likes iphone or android which are much faster.

Comments (1)
1 2 3 Next