Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Jan 2012
    Posts
    10
    cPanel/Enkompass Access Level

    Root Administrator

    Unhappy mscorlib Exception: Cannot access a closed file.

    I am getting the following error:

    Code:
    Error occured while processing the requested page
    Application: System Administrator Interface (SAI/RI)
    Module:
    Method:
    Message:
    Date: 1/1/0001 12:00:00 AM (UT)
    Source: mscorlib
    
    Page Details
    Referer: http://123.456.789.111:2086/Pages/Win1...ndleError.aspx
    
    User Details
    User Name: Admin
    IP Address: 123.456.789.222
    
    Exception Details
    .Source: mscorlib
    .Message: Cannot access a closed file.
    .Inner Messages:
    
    .Stack Trace:
    at System.IO.FileStream.Flush() at System.Diagnostics.TextWriterTraceListener.Flush() at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message) at cPanel.Web.Logging.Logger.LogMessage(TraceEventType severity, String codeArea, String className, EntryType type, String message) at cPanel.Web.Logging.Logger.LogMessage(TraceEventType severity, String codeArea, String className, String message, Exception ex) at cPanel.Web.Logging.LogItem.LogItemToFile(ILogItemMessageTemplate logTemplate) at cPanel.Web.Applications.SAI.SaiPage.IsAccountAlive() at cPanel.Web.Applications.SAI.SaiPage.InitializeCulture()
    << Back to Home Page
    Please note, yesterday I was getting Enkompass deactivated due to license expiry even though my license is valid until the end of this year. Today, that license error is gone and I can at least log in as the admin. The left hand panel after log in shows all the links and on the right hand panel, I get the above error.

    I am facing problem with my server for the last three days and will really appreciate any help. My server was running fine up until December 2011.

    Thanks in advance for all help.
    Last edited by NewLion; 01-21-2012 at 10:58 AM.

  2. #2
    Member
    Join Date
    Jan 2012
    Posts
    10
    cPanel/Enkompass Access Level

    Root Administrator

    Unhappy Re: mscorlib Exception: Cannot access a closed file.

    Not fixed yet... Really hoping someone can help me out.

    Also, I noticed Date: 1/1/0001 12:00:00 AM (UT) on line 6. This is odd. My server date, time and timezone are set properly. Wonder why Enkompass error is not displaying the correct date and time.
    Last edited by NewLion; 01-21-2012 at 11:11 AM.

  3. #3
    Member
    Join Date
    Jan 2012
    Posts
    10
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: mscorlib Exception: Cannot access a closed file.

    I want to add, when I tried logging on through the WSO interface, I got the following error:

    Code:
    An Error Occurred While Processing The Requested Page.
    
    Application: Website Owner Interface (WSO) 
    Module: 
    Method: 
    Message:
    Date: 1/1/0001 12:00:00 AM (UT) 
    Source: mscorlib 
    
    Page Details
    
    Referrer: http://123.456.789.111:2082/frontend/login/login.aspx?ReturnUrl=/default.aspx
    
    User Details
    
    User Name: prcbd
    IP Address: 123.456.789.222
    Exception Details
    
    .Source: mscorlib 
    .Message: Cannot access a closed file. 
    .Inner Messages: 
    
    .Stack Trace: 
    at System.IO.FileStream.Flush() at System.Diagnostics.TextWriterTraceListener.Flush() at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message) at cPanel.Web.Logging.Logger.LogMessage(TraceEventType severity, String codeArea, String className, EntryType type, String message) at cPanel.Web.Logging.Logger.LogMessage(TraceEventType severity, String codeArea, String className, String message, Exception ex) at cPanel.Web.Logging.LogItem.LogItemToFile(ILogItemMessageTemplate logTemplate) at cPanel.Web.Applications.WSOI.WSOPage.IsAccountAlive() at cPanel.Web.Applications.WSOI.WSOPage.InitializeCulture()
    Any help will be much appreciated.

  4. #4
    cPanel Staff cPanelSalinas's Avatar
    Join Date
    Feb 2009
    Posts
    355

    Default Re: mscorlib Exception: Cannot access a closed file.

    What version of Enkompass are you running?

  5. #5
    cPanel Staff cPanelSalinas's Avatar
    Join Date
    Feb 2009
    Posts
    355

    Default Re: mscorlib Exception: Cannot access a closed file.

    Restart the Enkompass services to see if that error goes away.

  6. #6
    Member
    Join Date
    Jan 2012
    Posts
    10
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb Re: mscorlib Exception: Cannot access a closed file.

    I solved all these errors. The way I did it is by re-installing Enkompass -- basically overwriting my previous installation. From my experience, I have few points for anyone facing similar problem and the Enkompass development team:

    1. IMPORTANT: Most definitely back up all user data and / or accounts.

    2. I noticed Enkompass picked up all existing accounts and I could log in. However, all the sites were gone from IIS! Enkompass development team should consider re-creating the sites on IIS, maybe through a separate link tool from the admin site, etc. I found out, if you "Modify" the IP of each site, a new IIS site is created on the new IP server. Tedious process, but better than having to re-create all the accounts one-by-one.

    3. If anyone has a better suggestion to re-create the sites on IIS, I would like to know for future reference.

    Thanks.

  7. #7
    Member scar45's Avatar
    Join Date
    Jul 2011
    Location
    Canada
    Posts
    41
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: mscorlib Exception: Cannot access a closed file.

    I've seen this "Cannot access a closed file." error message before (and may even have posted about it in these forums), however I mainly experienced it after creating a MySQL Database (and subsequently adding a user + giving them privs).

    I also noticed it when attempting to "Create" a new hosting account via WHMCS where it threw the same "Cannot access a closed file." message. It's quite annoying and will hopefully be addressed (obviously sounds like some kind of file lock by an IIS/Enkompass process?)

    In the meantime though, as Salinas suggested, restarting the Enkompass services ALWAYS works to alleviate that message. I haven't had it quite as bad as you NewLion, in that my license has always been 'valid' and I have always been able to log into SAI/WSOI. Regardless, I would try restarting Enkompass services first before reinstalling if it does happen to you again.

    I'm sure the devs have plenty on their plate before a final release, but I think that there are still a few issues out there that are critical. This one happens quite frequently and prevents new users from creating websites, etc., until an admin can login and restart Enkompass services. Coupled with the other MySQL Access Host problem, hopefully we'll get some stability in these core features before it goes final.

    Heck, a customer who actually paid ~$650 for a license (myself) a few months before it was announced that Enkompass would be free kinda deserves it don't you think?

  8. #8
    cPanel Staff cPanelSalinas's Avatar
    Join Date
    Feb 2009
    Posts
    355

    Default Re: mscorlib Exception: Cannot access a closed file.

    There was an issue with log files locking, but that was fixed a couple of versions ago. That's the reason I asked what version NewLion was running.

  9. #9
    Member
    Join Date
    Jan 2012
    Posts
    10
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: mscorlib Exception: Cannot access a closed file.

    Thanks scar45 for the inputs. I will restart Enkompass service next time I face (hopefully not ) similar problem.

    cPanelSalinas - thanks for helping out. I'm using Enkompass™ Version 2.4.0.48.6259.15676.

Similar Threads & Tags
Similar threads

  1. exception Tweak Settings
    By fehmifnd in forum E-mail Discussions
    Replies: 2
    Last Post: 05-12-2010, 07:22 AM
  2. Critical Exception in CPanel
    By jhajeer in forum New User Questions
    Replies: 1
    Last Post: 01-29-2010, 10:43 AM
  3. Modsec Exception Rule
    By Solokron in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 03-13-2007, 06:23 PM
  4. Mod_security exception
    By _xandih in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-20-2006, 03:08 PM
  5. [Unknown exception] in /
    By cosmin in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-05-2006, 03:06 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube