Monthly Archives: January 2013 - Page 2

“Object reference not set to instance of object” Most common error

While developing an application developers at beginning mostly get “Object reference not set to instance of object” error. This error only comes if you use any of the server variable without assigning is value/defining the same. If we go with …

Read more »

Accessing Server variable from your aspx[designer] page

If you want to access any server variable from you designer[*.aspx] page. Use Following steps to do so: Create a variable with public nature on your code[*.cs] page on designer page use to show /print the same on page or …

Read more »

Create Web Reference with dynamic nature from web config

When You add a web reference to your ASP.NET website, there is one key automatically gets added in app-settings section of your application’s web Config. To control it further[on production environment], You need to change value of this key only. …

Read more »

Calling a stored procedure from ASP.NET c# website/application

Hello All, To call a stored procedure you need to set CommandType property of SQLCommand to CommandType.StoredProcedure. Following is the sample code for the same:- Any ?’s, Please let me know. Thanks.

Creating SQL connection in ASP.NET C#

If you want to perform database operations from your ASP.NET website/application, Please use below code to connect and perform operations: Please share your queries…if any ?

remove Debug=True while deploying ASP.NET web application to server

Please make sure to remove Debug=True while deploying ASP.NET web application to server, It increases performance of application in a significant manner.

Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module…

This error comes due to one of following reasons: You haven’t installed ASP.NET services on your IIS server. You haven’t  registered your .NET Framework  on your IIS Server. Solution:  To solve the issue try to repair the .net framework 4[whatever …

Read more »

Cannot use a leading .. to exit above the top directory

This error means some where in code your are using path which is targeting above root directory. Example: if you used “../images/img.png” on any Page/form which is on root folder of your website. Solution: Do not use ../xxxxx.xxx  for  pages/Forms …

Read more »

Margin=auto not working in IE[internet explorer]

Today while I was working on designing one page, I faced an issue that margin=auto was not working on my page. FIxes are as following: [Solution]: Add Transitional DocType on the top of your webpage.  <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML …

Read more »

Debugging ASP.NET website from remote/client machine

Please opt following steps to debug An ASP.NET website from a remote/client instance. define/create your breakpoints on the code which you want to debug. go to tools>attachprocess. select process named as w3wp.exe [if there are more than one w3wp.exe processes, …

Read more »