From the 2023.1 install guide.
“For your application server, your IIS Application Pool has its .NET CLR version set to No Managed Code.
The application server then works with IIS using an in-process hosting model. You can only host one
application within a Kinetic 2022 application pool.”
It looks like his IIS pool is setup as No Managed Code. Doesn’t show how many apps are in that pool, but unless Ken s doing really weird stuff it will only be 1.
Your error is coming from application, not IIS itself. Probably IIS restart just clears the app pool cache and the problem is not reproduced until another time.
You better look at the full error stack in the error message and in the server event viewer, they will give you more information about what is wrong.
And yes, 2023 app pool should run with No Managed Code
Here is the error. Has something to do with dynamic query. I’ll post the code in a bit.
Resetting the app pool “fixes” this.
## System Information ##
==================
AppServer Connection: https://KINETIC.embedtek.local/Kinetic2023_1
Form Name: ShellMenuForm
Customization Name:
Menu ID:
Software Version: 4.2.300.8
============
Application Error
Exception caught in: mscorlib
## Error Detail ##
============
##!Message:##! Exception has been thrown by the target of an invocation.
##!Inner Exception Message:##! This is a duplicate entry of an existing record
##!Program:##! CommonLanguageRuntimeLibrary
##!Method:##! InvokeMethod
## Client Stack Trace ##
==================
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Ice.Lib.Customization.CustomScriptMethodInvoker.InvokeScriptMethod(MethodInfo scriptMethod, Object[] parameters)
at Ice.Lib.Customization.CustomScriptMethodInvoker.InvokeInitializeCustomCodeIfExists()
at Ice.Lib.Customization.CustomScriptManager.TryActionShowExceptionBoxOrLogVerificationErrorIfException(Action action, String exceptionBoxTitle)
## Inner Exception ##
===============
This is a duplicate entry of an existing record
## ##
at Ice.Cloud.ProxyBase`1.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer)
at Ice.Cloud.ProxyBase`1.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Cloud.ProxyBase`1.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Proxy.BO.DynamicQueryImpl.Execute(DynamicQueryDataSet queryDS, QueryExecutionDataSet executionParams)
at Ice.Adapters.DynamicQueryAdapter.ExecuteDashboardParameterized(DynamicQueryDataSet ds, QueryExecutionDataSet executionDs)
at Script.GetUDCodes(String CodeType)
at Script.InitializeCustomCode()
Update the code to the following based on a forum search. No errors, and we didn’t need to restart the pool.
That is the trick.
private DataView GetUDCodes(string CodeType)
{
#region Create the QueryExecutionDataSet and set the parameters for the query
using (DynamicQueryAdapter dqaUserCodes = new DynamicQueryAdapter(oTrans))
{
dqaUserCodes.BOConnect();
var queryExecutionDataSet = new QueryExecutionDataSet();
queryExecutionDataSet.ExecutionParameter.AddExecutionParameterRow("CodeTypeID", CodeType, "x(50)", false, Guid.Empty, "A");
dqaUserCodes.ExecuteByID("GetUserCodes", queryExecutionDataSet);
return new DataView(dqaUserCodes.QueryResults.Tables["Results"]);
}
#endregion
}
I was about to suggest using a “using”. In your original code you were not disposing anything. My guess is you were getting a duplicate for of the Execution Params.