Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • tla 35 posts 71 karma points
    Jul 28, 2009 @ 08:47
    tla
    -1

    Write protected files

    Reposting the bug here.

     

    In a project where we're using SourceSafe as source controll, I'm having difficulties adding a package:

    Umbraco version is 4.0.2.1

    SourceSafe as source controll.

     

    For those of you who dont know it, SourceSafe maintain a checkin/checkout behaviour using writeprotection on files on the localhost. Checking out a file removes the write protection on localhost, but at the same time prevents others from doing the same. Checking in will reenable the lock as well as adding your changes to the file so that others can access your changes.

     

    While in my search for a RSS-enabled news module, I found www.cpalm.dk/.../umbraco-rss-package.aspx.

    I haven't found anything else and the package repository didn't hold anything neither.

     

    One thing I did see, however, when looking at the package tab in the developers section is the following 'error' message displayed in red at the top of the screen:

    There is a problem with read/write access to a specific file or folder:
    Access to the path 'C:\umbracodir\data\packages\installed\installedPackages.config' is denied.

     

    Thinking that its sourcesafe, I remove the writeprotection on the file, reload the developers section tree and click on a package node, but get the following error:

    Server Error in '/' Application.

    Cannot write to a closed TextWriter.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ObjectDisposedException: Cannot write to a closed TextWriter.

    Source Error:

    An unhandled exception was generated during the execution of
    the current web request. Information regarding the origin and location
    of the exception can be identified using the exception stack trace
    below.


    Stack Trace:

    [ObjectDisposedException: Cannot write to a closed TextWriter.]
       
    System.IO.__Error.WriterClosed() +57
       
    System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) +7471752
       
    System.IO.StreamWriter.Flush() +11
       umbraco
    .cms.businesslogic.packager.Settings.HasFileAccess(Exception& exp) +434
       umbraco
    .presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e) +46
       
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       
    System.Web.UI.Control.OnLoad(EventArgs e) +99
       umbraco
    .BasePages.BasePage.OnLoad(EventArgs e) +15
       
    System.Web.UI.Control.LoadRecursive() +50
       
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

     

    Thank you Umbraco! That really made sense!

     

    So I reenable write protection and try to upload the package (I can use the different options that way). Package is installed, but its not visible in the tree after reloading nodes. So I try to install it again, but get the error message that its already in the DB. I'm asuming that this is because of the files already being placed in folders (I just uploaded the .zip file).

  • Per Ploug 865 posts 3491 karma points MVP admin
    Jul 28, 2009 @ 09:16
    Per Ploug
    -1

    Hi

    Please only post your question in one forum, or it will be moved or deleted. 

    The error is caused by the code actually trying to check if the package config files are write protected or not, seems there are certain cases where that fails. 

    Instead of using the RSS module, you can just as easy use XSLT, and RSS template is included , which you can use when creating a new xslt file. All you need to do is change a couple of parameters and you should be able to pull out your news as an rss feed.

     

  • tla 35 posts 71 karma points
    Jul 28, 2009 @ 10:16
    tla
    0

    Your missing the point completely.

     

    I made this post here in the bug forum due to the following: If the config file is write protected, I get an error notification that the file is write protected - much like if you try to save xslt with errors. However, if I remove the write protection on the file in question, I get the sweet .net error page displayed.

    That is the bug.

    That is why I'm posting this here.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 28, 2009 @ 10:28
    Peter Dijksterhuis
    100

    Perhaphs it's not obvious, but this part of the forum is for bugs regarding our.umbraco (this forum itself). Not for bugs with umbraco in general. For that, CodePlex is the place to post bugs.

    Since this is not related to our.umbraco it doesn't really belong here.

    Peter

  • tla 35 posts 71 karma points
    Jul 28, 2009 @ 10:34
    tla
    0

    Good thing I'm not feeling stupid now! :)

     

    Thanks for the reply Peter :)

  • srdjanpoznic 3 posts 23 karma points
    Oct 16, 2010 @ 13:14
    srdjanpoznic
    0

    I had the same problem when I wanted to install a local package on Umbraco (Umbraco version 4.0.4.2)

    I solved it by removing "Read only" (actually I did this by check outing whole \packages folder since my solution was under source control, but you can do it from file system, as well) from both files:

    data\packages\created\createdPackages.config and

    data\packages\installed\installedPackages.config

    Both files must be writable in order to install new package ;)

     

    Good luck ;)

Please Sign in or register to post replies

Write your reply to:

Draft