Showing posts with label ASP.net technical solution. Show all posts
Showing posts with label ASP.net technical solution. Show all posts

13 September, 2012

HTTP Error 404.3

Did you find the error “HTTP Error 404.3” ? Yes, I found the error at the time of deploying my ASP.NET web application to IIS 7. I found the following error (screen shot).






To solve the error follow the following steps:
Step 1: Go to Control Panel -> Programs and Features -> Turn Windows Features on or off
Step 2: Mark the features as like following image.
Step 3: Click OK and reset IIS.
 
 

03 September, 2012

Visual Studio 2005 debugger does not work in IE 8!

Do you face debugger problem of Visual studio 2005 in IE 8?  Yes, I faced problem. Few days, Debugger of Visual studio 2005 was not working in IE8 in my pc.

This is because IE 8 has a feature called Loosely-Coupled Internet Explorer (LCIE) which results in IE running across multiple processes. Older version of VS debugger get confuse by this and cannot figure out how to attach to the correct process. To overcome this issue, you have to disable the process growth feature of LCIE.

To do this, just do the following steps:
1.      Run –> Regedit
2.      HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
3.      Add a dword under this key called TabProcGrowth
4.      Set TabProcGrowth to 0.
 If you run into the same problem on Vista or newer, you will also need to turn off protected mode.

Or you can do the following from visual studio IDE
1. Debug --> Attach to Process.
2. select iexplorer.exe and click attach
 It tends to be either the aspnet_wp.exe (IIS 6.0, XP) or one of the W3WP.exe processe

23 January, 2012

Error: Sys.WebForms.PageRequestManagerTimeoutException The server request timed out


Few days ago I found an error when tried to export about 500 reports to pdf.  The error is Sys.WebForms.PageRequestManagerTimeoutException The server request timed out. This is not found as exception. It is found on run time as javascript error.  I was working on Ajax Control tool kit 3.5. It is occurred because export operation of 500 reports to pdf were relatively long time than default
AsyncPostBackTimeOut.
How to solve this problem?
AsyncPostBackTimeOut is a property of ScriptManager of Ajax. You can change time out length. To solve this problem I have increased the time out of AsyncPostBackTimeOut property.

For example, for exporting 100 pdf I need 20 minutes. So, I will use maximum time out limit 20 minutes which is exactly 1200 seconds. My code is like below.

<asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeOut="1200" >
asp:ScriptManager> 

**The default value of the AsyncPostBackTimeOut property is 90 seconds.
For long time running method (Suppose a method will run for more than 90 seconds), you should use web service by setting timeout (number of seconds) of that web method by Javascript.

Error: This application was precompiled with personalization turned off


Some days ago I have deployed one of my asp.net applications in Windows 2003 server. After deploying I could not browse any pages. I was getting the following errors – 

This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported.
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.Web.HttpException: This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported.

I did not include Source Error and Stack Trace here. So, what is the solution of the problem?
Yea! I have solved the problem by adding  the following snippet in web config.
               
It works fine.
If you find same problem, try to solve the problem this way.

08 January, 2012

ERROR: 'HTTP/1.0 503 Service Unavailable'

Some days ago, I fall in a problem. I could not create an ASP.net project. An error occurred when I press ok button in New project.

ERROR:
"The Web server reported the following error when attempting to create or
open the Web project located at the following URL:
'http://localhost/MyProjectMahedee'. 'HTTP/1.0 503 Service Unavailable'
."

After a long time after googling, I came to a result. The result is – Just check Bypass Proxy server for local address in Internet Options in conection tab in LAN Settings.

03 December, 2011

Could not access network location %SystemDrive%\inetpub\wwwroot\”

I have found the message - Could not access network location %SystemDrive%\inetpub\wwwroot\” - When I was trying to install Infragistic NetAdvantage on Windows 7. To solve the problem do the followings.

1. Type "regedit" in the Run From Start Menu dialog box to open the "Registry Editor".
2. Find the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\PathWWWRoot
3. Change the value of this registry key from "%SystemDrive%\inetpub\wwwroot" or " \inetpub\wwwroot\" to "C:\inetpub\wwwroot". If your default website in IIS is instead stored in a different location, set the value of this registry key to that path instead.


Then install your software.

30 September, 2011

Object reference not set to an instance of an object.

Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:


                                                     < compiler language="C#;Csharp"                 extension=".cs"                  type="Microsoft.CSharp.CSharpCodeProvider,system, Version=1.0.5000.0,  Culture=neutral, PublicKeyToken=b77a5c561934e089" />                    ""                                                                                                                                  





Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.] 
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +168
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +175
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +175
System.Web.UI.Page.UnloadRecursive(Boolean dispose) +23
System.Web.UI.Page.ProcessRequestCleanup() +43
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253
System.Web.UI.Page.ProcessRequest() +78
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.post_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

25 February, 2011

Solution disappears in solution explorer : Visual Studio 2010

I installed visual studio 2010 in my pc. I created a blank solution. When ever I add a project to the solution the original i.e root solution is disappear. This means that as soon as you add a project to a blank solution, the solution disappears and you are unable to add another project. I spent a lot of time to solve the problem. It is very easy.

To do this, goto tools->options->Projects and Solution and check the "Always show solution" option.