.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘exception stack trace’

BUG: You may receive a “COMException (0×80010105): The server threw an exception” error message in Visual Studio .NET 2003

Symptoms
In Microsoft Visual Studio .NET 2003, if you automate your application to run out-of-process, you may receive a COM exception error message that is similar to the following from the Devenv.exe out-of-processcomponent:

Unhandled Exception: System.ApplicationException: Failed —> System.Runtime.Int
eropServices.COMException (0×80010105): The server threw an exception.at EnvDTE._Solution.Open(String FileName)at DTEAutomation.Class1.Main(String[] args) in c:\vs7play\enterprisetemplate\dteautomation\class1.cs:line 45
— End of inner exception stack trace —at DTEAutomation.Class1.Main(String[] args) in c:\vs7play\enterprisetemplate\dteautomation\class1.cs:line 80
Resolution
This problem occurs because a cached pointer to the selected data is not valid.Then,the Enterprise Template Project is opened.

BUG: IWAM Account Is Not Granted the Impersonate Privilege for ASP.NET 1.1 on a Windows 2000 Domain Controller with SP4

Symptoms
When you install ASP.NET 1.1 on a computer running on a Windows 2000 Server domain controller with Service Pack 4 (SP4) installed, the IWAM account is not granted impersonate user rights for ASP.NET 1.1. When you request an ASP.NET 1.1 page, you may receive the following error message:

Server Error in ‘/iwamtest’ Application.
Access is denied.
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.ApplicationException: Access is denied.
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
[ApplicationException: Access is denied. ]

System.Security.Principal.WindowsIdentity._ResolveIdentity(IntPtr userToken) +0 System.Security.Principal.WindowsIdentity.get_Name() +71 System.Web.Configuration.AuthorizationConfigRule.IsUserAllowed(IPrincipal user, String verb) +100 System.Web.Configuration.AuthorizationConfig.IsUserAllowed(IPrincipal user, String verb) +81 System.Web.Security.UrlAuthorizationModule.OnEnter(Object source, EventArgs eventArgs) +178 System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87
Resolution
You may experience the behavior when the user account that you use to run the program does not have the Impersonate a client after authentication user right(the SeImpersonatePrivilege function). When you upgrade Windows 2000 Server Domain Controller to SP4, the user account (IWAM) is not grantedSeImpersonatePrivilege, and then programs that use impersonation may not work correctly.