Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The process cannot access the file '...-map.xml' because it is being used by another process. #176

Open
v-karbovnichy opened this issue Feb 24, 2020 · 2 comments
Labels

Comments

@v-karbovnichy
Copy link

v-karbovnichy commented Feb 24, 2020

We have an unhandled exception related to ClientDependency in Event Log with contents below (customer-sensitive info replaced with XXXXX):

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: XX/XX/2019 4:51:00 AM 
Event time (UTC): XX/XX/2019 12:51:00 PM 
Event ID: a20ceb40869545a5b8a3ac681f667cd8 
Event sequence: 2 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1/ROOT-19-132205421859848229 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: \\XXXXXXXX\XXXXXXXX\XXXXXXXX\ 
    Machine name: XXXXXXXXXX 
 
Process information: 
    Process ID: 26096 
    Process name: w3wp.exe 
    Account name: DNN\XXXXXXXX 
 
Exception information: 
    Exception type: IOException 
    Exception message: The process cannot access the file '\\XXXXXXXX\XXXXXXXX\XXXXXXXX\App_Data\ClientDependency\XXXXXXXXXX-dcb8c4d45b85b4652d662adf4dbd8a44-map.xml' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper.Initialize(HttpContextBase http)
   at ClientDependency.Core.Config.ClientDependencySettings.LoadDefaultFileMapConfig(ClientDependencySection section, HttpContextBase http)
   at ClientDependency.Core.Config.ClientDependencySettings.LoadProviders(HttpContextBase http)
   at ClientDependency.Core.Config.ClientDependencySettings.get_Instance()
   at ClientDependency.Core.Module.ClientDependencyModule.LoadFilterTypes()
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

 
 
Request information: 
    Request URL: http://XXXXXXXX.evoqondemand.com/ 
    Request path: / 
    User host address: XX.XX.XX.XX 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: DNN\XXXXXXXX 
 
Thread information: 
    Thread ID: 314 
    Thread account name: DNN\XXXXXXXX 
    Is impersonating: False 
    Stack trace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper.Initialize(HttpContextBase http)
   at ClientDependency.Core.Config.ClientDependencySettings.LoadDefaultFileMapConfig(ClientDependencySection section, HttpContextBase http)
   at ClientDependency.Core.Config.ClientDependencySettings.LoadProviders(HttpContextBase http)
   at ClientDependency.Core.Config.ClientDependencySettings.get_Instance()
   at ClientDependency.Core.Module.ClientDependencyModule.LoadFilterTypes()
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
 
 
Custom event details: 

Application is DNN (Evoq, actually), hosted by 1 IIS machine, site contents are on DFS share.
There were no second machine with such name started, or any other activities performed (like deployment). Just a normal day.
We cannot reproduce.

Can you advise what can be the issue?
How can we mitigate it?

@v-karbovnichy
Copy link
Author

v-karbovnichy commented Feb 24, 2020

Can be related to #94 (see last comment there), but we didn't have 2 IIS running.

Customer set of plugins on the site mandates us to serve its contents only on 1 IIS, because in 2IIS+LB configuration those IISes start to conflict with each other, and one of them sooner or later experience a series of app pool crashes leading to site stop.

@Shazwazza
Copy link
Owner

AFAIK DNN have their own custom build of CDF, or at least they did a long while back. They haven't contributed back to this project so I'm unsure how they have this implemented.

I can only suggest that the issue may be something to do with the DFS share, perhaps at that moment it was unavailable or there was a network issue. If there are no other processes writing to the file at the same time then that's my only guess. The file name is named with the machine name + appdomainappid which the only way can overlap is if you have a 2nd IIS that is a clone of the 1st one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants