.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 ‘account’

Error message when you try to start the Search service in SharePoint 2007: “An unhandled exception occurred in the user interface”

Symptoms
When you try to start theSearch service in Microsoft Office SharePoint Server 2007, you receive the following error message:

An unhandled exception occurred in the user interface. Exception Information: OSearch (AccountName) In this error message, AccountName is the account name that is used as the Farm Search Service account.
Resolution
This behavior occurs ifyou do not use the “domain_name\user_name” format when enter an account namein the User name field.This field isnext to Farm Search Service Account on the Configure Office SharePoint Server Search Service Settings on server ServerName page.

An unhandled exception may occur when you try to connect to an Access database from an ASP.NET worker process

Symptoms
An unhandled exception may occur under the following circumstances: An ASP.NET worker process (Aspnet_wp.exe) runs under the default ASPNET account.
-and-
You do not enable impersonation on that application.
-and-
You try to connect to or write to an Access database. Under these circumstances, you may receive one of the following exceptions:

The Microsoft Jet database engine cannot open the file ‘C:\Nwind.mdb’. It is already opened exclusively by another user, or you need permission to view its data.

Operation must use an updateable query.
Resolution
Because of security concerns, the ASP.NET worker process runs under the default ASPNET account. If you do not enable impersonation for an application, all of the threads that run the requests for that application run under the process account.
This problem occurs because the ASPNET account does not have sufficient permissions to connect to or write to an Access database.

AEM does not work when the management server action account is a low-permission account in System Center Operations Manager 2007

Symptoms
When the management server action account is a low-permission account in Microsoft System Center Operations Manager 2007, Agentless Exception Monitoring (AEM) does not work.
Note This problem does not affect client computers that are running the Windows Vista operating system.
Resolution
This problem occurs because AEM does not collect crash data when the management server action account is a low-permission account.

“Access Denied” error message occurs when you impersonate an account in ASP.NET and then call STA COM components

Symptoms
If you impersonate a particular account in your ASP.NET Web Service (.asmx) or in your Web Form (.aspx), and then you call to an Apartment/Single-threaded Component Object Model (COM) component, the process identity (by default, ASPNET account) is used instead of the impersonated account. Therefore, logic errors may occur when you try to access resources from the COM component, or you may receive the following error message:

Access Denied
Resolution
The thread that executes your ASP.NET request is one of the I/O threads or one of the workerThreads in the ASP.NET worker process (aspnet_wp.exe). These threads are all Multi-Threaded Apartment (MTA) threads. If you programmatically impersonate an account in your .aspx or .asmx code, or if you impersonate by using <identity impersonate=”true”> in Web.config or Machine.config, then the impersonation token is held on this MTA thread. If you then make a call into a single-threaded or an apartment-threaded COM component, that component is accessed by an entirely different thread, which is the single thread in its Single-Threaded Apartment (STA). Because this STA thread does not have an impersonation token of its own, and the impersonation token of the MTA thread is not passed to the STA thread, the STA thread then executes under the process identity.