How to catch a security exception within Remoting.Config(...)
-
Hello, well, i have been checking this over and over again, but i am still unable to catch this exception: System.Security.Principal.IdentityNotMappedException. This exception is thrown when i use an incorrect authorizedGroup attribute within my application config. Surely it's right that i get an exception when i specify a group that doesn't exist but at least i should be able to catch it, shouldnt i?
try { RemotingConfiguration.Configure(".\\MyApp.exe.config", false); } catch (Exception) {} app.config <channels> <channel ref="ipc" portName="MyAppPort" authorizedGroup="IIS_WPG"> <serverProviders> <
However i assume that i can't catch this excpetion because RemotingConfiguration is running in another (application?)context. Furthermore my application is doing fine. The only thing that bothers me is that cannot catch this exception when a nonexistent group is specified. If someone has an idea how to catch this exception, then please let me know. I would really really appreciate it. best regards Tobias :-D
-
Hello, well, i have been checking this over and over again, but i am still unable to catch this exception: System.Security.Principal.IdentityNotMappedException. This exception is thrown when i use an incorrect authorizedGroup attribute within my application config. Surely it's right that i get an exception when i specify a group that doesn't exist but at least i should be able to catch it, shouldnt i?
try { RemotingConfiguration.Configure(".\\MyApp.exe.config", false); } catch (Exception) {} app.config <channels> <channel ref="ipc" portName="MyAppPort" authorizedGroup="IIS_WPG"> <serverProviders> <
However i assume that i can't catch this excpetion because RemotingConfiguration is running in another (application?)context. Furthermore my application is doing fine. The only thing that bothers me is that cannot catch this exception when a nonexistent group is specified. If someone has an idea how to catch this exception, then please let me know. I would really really appreciate it. best regards Tobias :-D
That could reveal where the buck stops so to speak. A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
-
That could reveal where the buck stops so to speak. A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
hi, Hmm, i did this a thousand times but it doesn't point specifically to my application! Obviously RemotingConfiguration.Configure is running in a different thread but how to catch the exception in it? e voila: Unbehandelte Ausnahme: System.Security.Principal.IdentityNotMappedException: Man che oder alle Identitätsverweise konnten nicht übersetzt werden. bei System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) bei System.Security.Principal.NTAccount.Translate(Type targetType) bei System.Runtime.Remoting.Channels.Ipc.IpcServerChannel.Listen() bei System.Threading.ThreadHelper.ThreadStart_Context(Object state) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ThreadHelper.ThreadStart() Further, this exception says that the system was unable to resolve the specified account. However i am fully aware of that and did intenionally use a wrong group. I just want to know how to catch this security exception that is raised by the CLR. regards Tobias
-
hi, Hmm, i did this a thousand times but it doesn't point specifically to my application! Obviously RemotingConfiguration.Configure is running in a different thread but how to catch the exception in it? e voila: Unbehandelte Ausnahme: System.Security.Principal.IdentityNotMappedException: Man che oder alle Identitätsverweise konnten nicht übersetzt werden. bei System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) bei System.Security.Principal.NTAccount.Translate(Type targetType) bei System.Runtime.Remoting.Channels.Ipc.IpcServerChannel.Listen() bei System.Threading.ThreadHelper.ThreadStart_Context(Object state) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ThreadHelper.ThreadStart() Further, this exception says that the system was unable to resolve the specified account. However i am fully aware of that and did intenionally use a wrong group. I just want to know how to catch this security exception that is raised by the CLR. regards Tobias
I don't know if that is it or not < A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
-
I don't know if that is it or not < A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
Ennis Ray Lynch, Jr. wrote:
I don't know if that is it or not <
Nope, that is quite alright. As i said, there is nothing wrong neihter with the program nor with its configuration. I just need to know how i could catch a security exception that is raised during the remoting configuration. I mean my entire application works perfect, unless i specify a group that doesn't exist. It is quite logic that the remoting configuration fails when i specify a nonexistent group but why is it impossible to catch this security exception? Anyway, thanks for your efforts. Tobias