I am getting error: 8000401a while logging to Tridion [closed] - tridion

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am getting the following error, while logging in to Tridion. Could you please help me.
Error: Retrieving the COM class factory for component with CLSID {9926D1CF-F158-418F-A9A2-B653B497D982} failed due to the following error:
8000401a The server process could not be started because the configured identity is incorrect.
Check the username and password. (Exception from HRESULT: 0x8000401A).
System.Runtime.InteropServices.COMException (0x8000401A): Retrieving the COM class factory for component with CLSID {9926D1CF-F158-418F-A9A2-B653B497D982} failed due to the following error:
8000401a The server process could not be started because the configured identity is incorrect.
Check the username and password. (Exception from HRESULT: 0x8000401A).
at Tridion.Web.UI.Models.TCM54.TDSEWrapper.get_TDSE()
at Tridion.Web.UI.Models.TCM54.TcmAuthorizationModule.context_AuthorizeRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

May be your system user(MTSuser by default) got locked.
Could you please check the Identity properties of the Tridion Content Manager COM+ application and try again to login with this user.

The identity of the user running the Tridion Content Manager COM+ application is correct. Check if the user exists and the password is correct.

Try restarting the COM service on CMS Server or reboot the CMS Server(which will automatically restart the service).
Thanks

Related

Stop launch of web app from `ServletContextListener` method `contextInitialized` [duplicate]

This question already has answers here:
How can I make a ServletContextListener stop the Java EE application?
(2 answers)
Closed 6 years ago.
I have implemented a ServletContextListener in a Java Servlet web app via the #WebListener annotation. In my contextInitialized method I do some set-up work and verify that expected resources are available.
If I determine in that contextInitialized method that something is wrong, how do I stop the web app from continuing onwards with executing servlets? Those servlets should not execute if the environment is not suitable (such as no database available).
How to gracefully handle a faulty environment for a servlets-based web app?
No, it appears that the ServletContextListener interface was not designed with the intent to be able to prevent the launch of a web app.
As this Answer states, the Servlet spec says a ServletContextListener may somehow disable access to the web app when an Exception is encountered. That word may means optional, not required. Nor does the spec define exactly what stopping access to the web app means.
Apparently the implemented behavior in various web containers varies widely. Some do nothing, some log it and move on, some prevent the web app from being deployed.
My experience with Tomcat 8.0.33… Putting throw new RuntimeException ( "bogus stop servlet " ); in the contextInitialized method prevents the app from being deployed. The console during deployment in the IDE report reports “FAIL - Deployed application at context path / but context failed to start”. Unfortunately neither that console nor none of the logs capture the report of the actual Exception. So if you throw more than one Exception from one or more listeners, debugging will not be obvious.
As mentioned elsewhere in Stack Overflow, the most reliable solution is probably to have your ServletContextListener mark success or failure with a flag variable stored in the servlet session. Then have your servlet code retrieve and examine that flag. Your servlet code would then determine the appropriate course of action. Your web app would be deployed, but your own servlet(s) could choose to do nothing and send back some HTTP error code.
Similar questions:
Abort java webapp on startup
How can I make a ServletContextListener stop the Java EE application?
Prefered way to handle Java exceptions in ServletContextListener
Prevent Java EE application start on WebSphere on exception
ServletContextListener execution order
Stop Servlet context from initializing in init method
Side note: When adding or editing your ServletContextListener you may need to do a 'clean-and-build' operation on your project. Your IDE’s hot-swap or deploy-while-developing feature may not pickup on a new or changed listener. Trace your code or do some logging to verify.

Tracking recurring error that is occuring in the Session_Start method

I am getting a recurring error occuring in the Session_Start method in the Global.asax.cs file (ASP.NET, C#, .NET Framework 4). The error seems to be happening on the following line
if (!OnlineVisitorsUtility.Visitors.ContainsKey(currentContext.Session.SessionID))
which basically checks to see if this sessionId is in the current list of SessionIds.
The error is
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at TestSystem.WebSite.Global.Session_Start(Object sender, EventArgs e) Global.asax.cs:line 142
at System.Web.SessionState.SessionStateModule.CompleteAcquireState()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
There is no user logged against the error (because this is thrown before anybody logs in). But no user has reported errors attempting to log in, the only reason we see this is because it is showing up in the error logs.
The error occurs every minute or so for a few days, then stops for a few days before re-surfacing.
We record the remote host ip for each error, and it is different for each instance of the error I have looked at. I initially thought it was some sort of automated job kicking this off, but when I track the location IP address I have found it originating in places we have users, places we don't and a private (i'm guessing internal) IP address.
We cannot replicate this error on our internal test and QA systems. I am looking for help in two areas, first, anyone have any idea what could be causing this, and second, if not, what information could I log that would shed some light on what's causing this?
Thanks,
Neil
EDIT
The dictionary in the error trace above is a dictionary that stores a SessionId and a WebsiteVisitor class.
public static Dictionary<string, WebsiteVisitor> Visitors = new Dictionary<string, WebsiteVisitor>();
We only add to this after checking the ContainsKey if statement above. The whole statement is below
lock (visitorsLock)
{
if (!OnlineVisitorsUtility.Visitors.ContainsKey(currentContext.Session.SessionID))
{
OnlineVisitorsUtility.Visitors.Add(currentContext.Session.SessionID, new WebsiteVisitor(currentContext));
}
}
Sounds like you have a synchronization problem with your Visitors dictionary. The Dictionary collection is not thread-safe so read/write access needs to be controlled. I see your using a locking object to resolve this issue, however, the problem with that approach is IIS doesn't guarantee that each request will be running under the same AppDomain instance or even the same worker process.
Instead of cross thread locking you need to look at cross process locking, I would suggest using a Mutex.
Update
Actually #RichardDeeming made a very good point - the Visitors object won't be shared across multiple processes/AppDomain so it can't be a synchronisation problem in that respect, however, the Dictionary is getting corrupt somehow. I would recommend switching to using a ConcurrentDictionary and let the framework take care of the synchronisation for you.
Generally, static property in web apps aren't a good idea as they can't be shared across multiple AppDomains and you can end up running into mysterious issues like this.

Live ASP.Net Web Application Giving NullReferenceException

I have a web application that is working great while running form VS, but once it's published trying to navigate to the site throws a NullRefernceException. Here is the stack trace:
[NullReferenceException: Object reference not set to an instance of an object.]
DAL.VendorRepDAL.GetRepsInfo(List`1 fields) in C:\Users\mfoster\Desktop\EventPlanner\DAL\DAL.vb:649
EventPlanner.DealEntry.LoadData() in C:\Users\mfoster\Desktop\EventPlanner\EventPlanner\deals.aspx.vb:31
System.Web.UI.Control.LoadRecursive() +70
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3063
I think the problem may have something to do with the fact that file paths in the stack trace are referencing my hard drive for some reason. If that's the case I'm not how to fix it.
Thanks For any help.
Sherlock Holmes might deduce that since this error comes from a class named DAL, either:
Your live application does not have a valid database connection string, or
The database your live application is connecting to does not have the tables and/or rows and/or data that it expects.
The rest of us, however, might need to see a bit more code, such as the GetRepsInfo method that seems to be throwing.
Common causes and fixes for NullReferenceException can be found here: What is a NullReferenceException, and how do I fix it?

Which Asp.net exceptions can do what?

If I write this code
protected void Page_Load(object sender, EventArgs e)
{
Page_Load(sender, e);
}
I get the an Error (endless recursion):
and the w3wp.exe process is terminated from task manager.
Fine...
however if i do:
throw new ApplicationException(); //or SystemException();
it appears in just a regular exception page. ( w3wp.exe is still up).
questions :
what kind of exceptions causing the w3wp.exe to shutdown ?
what kind of exceptions causing the Application Pool to shutdown ?
p.s.
according to what ive just written , please think about the following scenario :
i can write a web page , host my site in a farm of sites , and i can terminate the whole w3wp.exe process by creating recursion ..... ( also others will have trouble)...
Can you please answer my questions ?
thanks.
This is most likely the famous StackoverflowException. It's caused by an infinite loop since you're calling the method Page_Load again and again.
From MSDN:
In prior versions of the .NET Framework, your application could catch
a StackOverflowException object (for example, to recover from
unbounded recursion). However, that practice is currently discouraged
because significant additional code is required to reliably catch a
stack overflow exception and continue program execution.
Starting with the .NET Framework version 2.0, a StackOverflowException
object cannot be caught by a try-catch block and the corresponding
process is terminated by default. Consequently, users are advised to
write their code to detect and prevent a stack overflow. For example,
if your application depends on recursion, use a counter or a state
condition to terminate the recursive loop. Note that an application
that hosts the common language runtime (CLR) can specify that the CLR
unload the application domain where the stack overflow exception
occurs and let the corresponding process continue. For more
information, see ICLRPolicyManager Interface and Hosting Overview.
You may want to have a look at this answer:
https://stackoverflow.com/a/4802309/284240
The reason for the exception is memory overflow. There are many ways how an application can cause this, there is no point to guess specific scenarios. I imaging good hosting providers should be protected from misbehaving applications.
to add to the answers which alrdy are available. u cant bring down the whole process because every website in a server runs in a seperate AppDomain. so if ur code misbehaves only ur appdomain wud be killed.

Previously working webservice stopped working

All of a sudden we started to get this error in our webapplication.
It's weird because it has been working for months and months and noone has ever touched the code.
Does anyone have any idea why this error could occur all of a sudden?
Server Error in '/' Application.
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Runtime.InteropServices.COMException (0x8007203A): The server is not operational.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
at System.DirectoryServices.DirectorySearcher.FindOne()
at AuthTools.GetUserMemberShip(String login) in D:\IIS\WWW_reports_WebServices\App_Code\AuthTools.vb:line 35
You are using some unmanaged COM object from your managed code. Could it be that this object changed? I.e. it's not your application, it's the unmanaged library you are using. I might be wrong, but that's all I can think of when looking at the stack trace.
Heh, it's a bit embarrassing but our webservice queries our active directory to find user groups, and due to a missconfiguration where a group had a member it was also a member of, our application ended up in an endless loop.
The .Net Framework BCL uses a lot of wrapper objects around legacy COM code to interact with ActiveDirectory and other LDAP sources. This can be caused by changed settings at the AD server, or there are issues with connection management to AD (are you properly closing your connections, for example.)
I would start investigating from the server-end and determine issues from there. The diagnostics/error-messages within the .Net Framework classes, because they bubble up through COM, aren't that helpful.

Resources