Friday, April 24, 2009

Can't debug on IE

Error : I forget about the error messages. If I'm not mistaken, the error message was just as common. As far as I remember, it sounds like this :

Unable to Start Debugging on the Web Server... user is not a member of "debugger users"


Solution : Run Internet Explorer (it should be more or less the same in other browsers), choose menu Tools -> Internet Options -> Security tab -> Choose Local Internet -> click Sites button -> click Advanced -> add http://localhost to the zone, then ok.
Share:

ASP.NET State Service

Error :
Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the
value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Param
eters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.


This is also one of the mostly retrieved errors. This error occurs when using StateServer mode for the sessionState in web.config, yet the ASP.NET State Service is not started.
I met this error when I first made a web application. After I get the solution, I ask a little about about StateServer sessionState mode to a senior.

When making an application with login page, u can consider using StateServer for the sessionState mode, because when u use this mode, u don't have to login again and again, just have to refresh the web page, because the session is still kept on server. Yet, when deploying the application, should omit it, or change it to InProc mode. I used only these 2 modes. Never use the SQLServer mode.

e.g.
<sessionState mode="StateServer" stateconnectionstring="tcpip=127.0.0.1:42424" sqlconnectionstring="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="200000" />



Solution:
Start the ASP.NET State Service on Services. Go to control panel -> Administrative Tools -> Services, or simply press window + Run, then type services.msc. Choose ASP.NET State Service, right-click, then Start the service. To start it automatically, choose startup type : Automatic.
Share:

Crystal Report error while deploying

Error : Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its
dependencies. The system cannot find the file specified.


Solution : Install crystal report runtime available in Visual Studio CD, on the server.
Share:

Error on connection string

Error : An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


Solution : Check if the connection string is properly defined.
Share:

Error on event validation

Error :
Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.


Solution : If there is a part of the code where repeater is used, DO NOT bind data on pageload (ispostback) section.
Share:

Also cannot debug application

Error : Error while trying to run project: unable to start debugging on the web server. the project is not configured to be debugged.


This is the most widely retrieved error while developing web applications... Hahaha... And the solutions may vary greatly. This solution works in my case.

Solution : re-register aspnet to IIS. Go to start menu -> Programs -> Microsoft Visual Studio xxxx -> Visual Studio Tools -> Visual Studio xxxx Command Prompt -> type aspnet_regiis -r.

I was using 3 version of VS.Net, i.e. version 2003, 2005, and 2008. This maybe the reason of this error in some way.
Share:

Cannot debug application

Error : Cannot start service from the command line or a debugger. A Windows Service must first be installed (using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START command.


Solution : Check the start-up project. Make sure the start-up project is the web application, not a class library project.
Share:

Error while building on release mode

Error : "LC.exe" exited with code -1073741701

I was building a pre-compiled web in release mode (using WebDeployment program). As known, compiling in release mode always retrieves undiscovered errors -.-"""


Solution : Exclude licenses.licx file from project, then rebuild again.

There was a time when I faced the same problem, after my computer was attacked by a virus that caused the executable files became corrupted. In this case, just ask for a copy of LC.exe file from a friend and place it on the folder where LC.exe is located on the computer.
Share:

Parser Error

Error :
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'Web.MasterPages.GeneralTemplate'.

Source Error:
Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="GeneralTemplate.Master.cs"
Line 2: Inherits="Web.MasterPages.GeneralTemplate" %>
Line 3: Source File: /Web/MasterPages/GeneralTemplate.Master

Version Information: Microsoft .NET Framework Version:2.0.50727.3053;

ASP.NET Version:2.0.50727.3053


Solution : Yet another weird error, I deleted the bin folder on the web application, then rebuilt the solution, and it just worked!
Share:

Ambiguous match found

Error :
Server Error in '/Web' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Ambiguous match found.

Source Error:

Line 1: <%@ Control Language="c#" AutoEventWireup="false"
Codebehind="GeneralTemplate.ascx.cs" Inherits="Web.Service.MasterPages.GeneralTemplate"

TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
Line 2: <%@ Register TagPrefix="uc1" TagName="MainMenu" Src="../UserControls/MainMenu.ascx" %>
Line 3: <%@ Register TagPrefix="Web" Namespace="Web.Web.Controls" Assembly="BLMS.BackEnd.Web.Controls" %>

Source File: /Web/MasterPages/GeneralTemplate.ascx Line: 1


This is actually a weird error, I've faced a lot of problems while deploying and debugging web application developed under asp.net, and these errors are sometimes not quite relevant to the error messages, so have to figure it out by myself. Phew...

Solution : Made a new web directory on IIS outside the default website, for the web application. And it worked like charm!! -.-"""
Share:

Error when using ajax component

Error : The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
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: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

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.


Solution : Put all the tags on the body, not on the head.
Share:

You may be intersted in

Related Posts

Updating Table Containing Xml Column via LinkedServer

If you are trying to update a table containing XML column via Linked Server in SQL Server, and you are not able to, you are not alone. There...

About Me

My photo
Is an ordinary man, with a little knowledge to share and high dreams to achieve. I'd be glad if I can help others, 'coz the only thing for the triumph of evil is for a good man to do nothing.

About Blog

You can find a lot of debugging and deploying problems while developing applications in .NET and Visual Basic here. There are also some querying tips in SQL and typical source codes which might be useful shared here.

Popular Posts

Blogroll

Followers

Leave a Message