WEB App crash after 14.2.507.122

StatusIDPriorityType
Closed23197CriticalBug
ProfileReply
Lars PlatzdaschClient

After Update 14.2.507.122 my web app crash with this error:

Same value has already been added.

Type: ArgumentException
Message: Same value has already been added.
Parameter name: value
Data: 1 entries
'ASPIMPERSONATING' ''
Stack trace:

at DevExpress.ExpressApp.DC.DCInterfaceWithUniqueValue`1.CheckParameters(Type interfaceType, T value)
at DevExpress.ExpressApp.DC.EntitiesToGenerateInfo.OnAdd(Type interfaceType, String entityName)
at DevExpress.ExpressApp.DC.DCInterfaceWithUniqueValue`1.AddInternal(Type interfaceType, T value)
at DevExpress.ExpressApp.DC.Xpo.XpoTypeInfoSource.RegisterEntity(String entityName, Type interfaceType)
at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(String name, Type interfaceType)
at Xafari.GeneratedXF.GeneratedXFModule.RegisterDC() in c:\Windows\Temp\2f4bkuol.0.cs:line 20
at Xafari.XF.XafariXFModule.GetDeclaredExportedTypes()
at DevExpress.ExpressApp.ModuleBase.GetExportedTypes()
at DevExpress.ExpressApp.ApplicationModulesManager.CollectDomainComponents()
at DevExpress.ExpressApp.ApplicationModulesManager.Load(ITypesInfo typesInfo, Boolean loadTypesInfo)
at DevExpress.ExpressApp.XafApplication.Setup(String applicationName, IList`1 objectSpaceProviders, ApplicationModulesManager modulesManager, ISecurityStrategyBase security)
at DevExpress.ExpressApp.XafApplication.Setup()
at pnc.dgv.cdb.Web.Global.Session_Start(Object sender, EventArgs e) in c:\projects\pnc.dgv.cdb.Web\Global.asax.cs:line 62
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)
InnerException is null

next Question:

Why the Xafari.FX use a Output in Windows\temp\ Folder? ( at Xafari.GeneratedXF.GeneratedXFModule.RegisterDC() in c:\Windows\Temp\szpktufs.0.cs:line 20 )

a restart of the Server will get the App online. A normal Restart of IIS ( iisrest ) will not work.

Replies

UserDescriptionPosted On
Sasha (Xafari Support)Client

Hello Lars,

 

To start I can advise you to remove the contents of the following folders:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

C:\Users\USER_NAME\AppData\Local\Temp\

C:\Windows\Temp\

 

Please, inform us of your results.

 

Thanks, Sasha.

Lars Platzdasch

Hi Sasha,

i get new Details: After the TimeOut raise in WebApp we see additional Errors from your XF Moduls.

at Xafari.GeneratedXF.GeneratedXFModule.RegisterDC() in c:\Windows\Temp\r5izhhis.0.cs:line 20
at Xafari.XF.XafariXFModule.GetDeclaredExportedTypes()

here is the full error Stack:
--------------------------------------------------------------------------------
The error occurred:

Type: ArgumentException
Message: Same value has already been added.
Parameter name: value
Data: 1 entries
'ASPIMPERSONATING' ''
Stack trace:

at DevExpress.ExpressApp.DC.DCInterfaceWithUniqueValue`1.CheckParameters(Type interfaceType, T value)
at DevExpress.ExpressApp.DC.EntitiesToGenerateInfo.OnAdd(Type interfaceType, String entityName)
at DevExpress.ExpressApp.DC.DCInterfaceWithUniqueValue`1.AddInternal(Type interfaceType, T value)
at DevExpress.ExpressApp.DC.Xpo.XpoTypeInfoSource.RegisterEntity(String entityName, Type interfaceType)
at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(String name, Type interfaceType)
at Xafari.GeneratedXF.GeneratedXFModule.RegisterDC() in c:\Windows\Temp\r5izhhis.0.cs:line 20
at Xafari.XF.XafariXFModule.GetDeclaredExportedTypes()
at DevExpress.ExpressApp.ModuleBase.GetExportedTypes()
at DevExpress.ExpressApp.ApplicationModulesManager.CollectDomainComponents()
at DevExpress.ExpressApp.ApplicationModulesManager.Load(ITypesInfo typesInfo, Boolean loadTypesInfo)
at DevExpress.ExpressApp.XafApplication.Setup(String applicationName, IList`1 objectSpaceProviders, ApplicationModulesManager modulesManager, ISecurityStrategyBase security)
at DevExpress.ExpressApp.XafApplication.Setup()
at pnc.dgv.cdb.Web.Global.Session_Start(Object sender, EventArgs e) in c:\projects\pnc\pnc.dgv.cdb.tfs\CDB_14.2\pnc.dgv.cdb.Web\Global.asax.cs:line 62
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)
InnerException is null

--------------------------------------------------------------------------------

Question:

Why u use the the Windows\Temp Folder instead of C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files ?

the ASP Folder will be auto cleanup during Start of a ASP net App.. the WIndows\Temp folder not.

Pls fix this asap.

Lars Platzdasch

Hi Sasha,

any news or updates on this?

Lars Platzdasch

Hello Sasha,
any news or update on this issue?
Regards Lars

Sasha (Xafari Support)Client

Hello Lars,

 

I apologize for this late response.

 

This problem can be caused by several reasons. We will verify all solutions independently.

If we wouldn't find a solution – we will list all of the reasons tomorrow, so you could check them yourself.

 

Regards, Sasha.

Sasha (Xafari Support)Client

Hi Lars,

 

Generation of files in the folder c:\Windows\Temp doesn't entail the occurrence of this exception.

Dll will be generated in a different folder in the following versions Xafari Framework.

 

But I can't give a definite answer about the origin the exception from Stack trac.

Please send us the contents of the file c:\Windows\Temp\r5izhhis.0.cs to explore this exception.

 

Thanks, Sasha.

Sasha (Xafari Support)Client

Hi,

 

If you don't want to use the Windows\Temp Folder,
you can override next method at your WebApplication:

protected override string GetDcAssemblyFilePath()
{
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "AppData\\Local\\Temp\\Xafari", this.ApplicationName, Path.GetRandomFileName());
}

 

Please, inform us of your results.

Regards, Sasha.

Lars Platzdasch

Dear Sasha,

after i update last XAFARI Version 14.2.607.127 i get a new / old Problem in WEB.APP

this occourse everytime on the same WebServer our WebAPP is installed twice. once a PROD ( different DB )
and once as Test .

Question: WHY your Xafari.XF.EntityGenerator.GetXFAssembly()
USE Windows\Temp Folder

instead of ASP.Net temporary C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Folder ? Here the Files live in different Folders for each WebAPPRoot?

I hope for a FAST Fix

Regards Lars

================================================================================
The error occurred:

Type: FileLoadException
Message: Die Datei oder Assembly "file:///C:\Windows\TEMP\2fhip113.dll" oder eine Abhängigkeit davon wurde nicht gefunden. Zugriff verweigert
Data: 1 entries
'ASPIMPERSONATING' ''
Stack trace:

bei System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
bei System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
bei Xafari.XF.EntityGenerator.GetXFAssembly()
bei Xafari.EntityFactory.GetEntitiesModuleType(XafApplication application)
bei Xafari.XF.XafariXFModule.GetDeclaredExportedTypes()
bei DevExpress.ExpressApp.ModuleBase.GetExportedTypes()
bei DevExpress.ExpressApp.ApplicationModulesManager.CollectDomainComponents()
bei DevExpress.ExpressApp.ApplicationModulesManager.Load(ITypesInfo typesInfo, Boolean loadTypesInfo)
bei DevExpress.ExpressApp.XafApplication.Setup(String applicationName, IList`1 objectSpaceProviders, ApplicationModulesManager modulesManager, ISecurityStrategyBase security)
bei DevExpress.ExpressApp.XafApplication.Setup()
bei pnc.dgv.cdb.Web.Global.Session_Start(Object sender, EventArgs e)
bei System.Web.SessionState.SessionStateModule.CompleteAcquireState()
bei System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
bei System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
bei System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
InnerException is null

--------------------------------------------------------------------------------
Loaded assemblies
Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null, Location=InMemory Module

Lars Platzdasch

i have try to do this in web.application.dll

protected override string GetDcAssemblyFilePath()
{
return Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), Path.GetRandomFileName());
}

to push all XF temp Assembly in the WebAPP Specific folder.

i let you know if this wiell solve my problem.. in 2 h, i know more.

Sasha (Xafari Support)Client

Hi Lars,

 

This issue resolved in Xafari v14.2.x07.143, where Xafari.XF uses …\Users\User_Name\AppData\Local\Temp\Xafari folder.

 

For local solution to your problem (if you use Xafari version under v14.2.x07.143), you have to:
1)

    override next method at your WebApplication:
protected override string GetDcAssemblyFilePath()
{
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "AppData\\Local\\Temp\\Xafari", this.ApplicationName, Path.GetRandomFileName());
}

or
if you want to push all generated assembly to WebApp local folder
2)

    use code as below
protected override string GetDcAssemblyFilePath()
{
 return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "GeneratedAssembly", XafApplication.DcAssemblyFileName);
}
    Additionally actions:
    if you use impersonate=true you have to create windows user group with modify permission on GeneratedAssembly folder
    and have to add all users (so IUSR) in this group. If you use impersonate=false you have to set modify permission
    on GeneratedAssembly folder for user which used in AppPool.

 

I hope you find this information helpful.

Regards, Sasha.

× This ticket is closed.

Write US