Write files changes made when opening file through windows explorer in a mapped drive












0















I'm implementing a WebDAV file server using the ITHit WebDave engine, i have the following problem



When i list the files and open one of them i get the ReadAsync method called, i provide the content and the file is opened correctly



However any changes i make to the file can't be saved, i get an error saying




A device attached to the system is not working




I looked at the file system samples and implemented support based on the FileSystemStorage.AspNetCore sample,



From what can understand the WriteAsync method is used when creating new files, should i expect for WriteAsync to also be called for file edits that need to be changed?



Am i wrong in the assumption that DavFile.WriteAsync will be called with a stream for the updated content?



If WriteAsync is not the right location to save updates to a file, could you provide some guidance on the process of saving changes to existing files?



Edited to add:
Now i can see that after i dismiss the first error about the device not working i get the standard save dialog box, if i click save it asks me if i want to overwrite the existing file, after accepting to overwrite then WriteAsync is called and i can update the file contents



I'm not quite sure why it would first tell me there's an error and then still allow me to write the file but only as replacement to the original file



Thanks for your help










share|improve this question





























    0















    I'm implementing a WebDAV file server using the ITHit WebDave engine, i have the following problem



    When i list the files and open one of them i get the ReadAsync method called, i provide the content and the file is opened correctly



    However any changes i make to the file can't be saved, i get an error saying




    A device attached to the system is not working




    I looked at the file system samples and implemented support based on the FileSystemStorage.AspNetCore sample,



    From what can understand the WriteAsync method is used when creating new files, should i expect for WriteAsync to also be called for file edits that need to be changed?



    Am i wrong in the assumption that DavFile.WriteAsync will be called with a stream for the updated content?



    If WriteAsync is not the right location to save updates to a file, could you provide some guidance on the process of saving changes to existing files?



    Edited to add:
    Now i can see that after i dismiss the first error about the device not working i get the standard save dialog box, if i click save it asks me if i want to overwrite the existing file, after accepting to overwrite then WriteAsync is called and i can update the file contents



    I'm not quite sure why it would first tell me there's an error and then still allow me to write the file but only as replacement to the original file



    Thanks for your help










    share|improve this question



























      0












      0








      0








      I'm implementing a WebDAV file server using the ITHit WebDave engine, i have the following problem



      When i list the files and open one of them i get the ReadAsync method called, i provide the content and the file is opened correctly



      However any changes i make to the file can't be saved, i get an error saying




      A device attached to the system is not working




      I looked at the file system samples and implemented support based on the FileSystemStorage.AspNetCore sample,



      From what can understand the WriteAsync method is used when creating new files, should i expect for WriteAsync to also be called for file edits that need to be changed?



      Am i wrong in the assumption that DavFile.WriteAsync will be called with a stream for the updated content?



      If WriteAsync is not the right location to save updates to a file, could you provide some guidance on the process of saving changes to existing files?



      Edited to add:
      Now i can see that after i dismiss the first error about the device not working i get the standard save dialog box, if i click save it asks me if i want to overwrite the existing file, after accepting to overwrite then WriteAsync is called and i can update the file contents



      I'm not quite sure why it would first tell me there's an error and then still allow me to write the file but only as replacement to the original file



      Thanks for your help










      share|improve this question
















      I'm implementing a WebDAV file server using the ITHit WebDave engine, i have the following problem



      When i list the files and open one of them i get the ReadAsync method called, i provide the content and the file is opened correctly



      However any changes i make to the file can't be saved, i get an error saying




      A device attached to the system is not working




      I looked at the file system samples and implemented support based on the FileSystemStorage.AspNetCore sample,



      From what can understand the WriteAsync method is used when creating new files, should i expect for WriteAsync to also be called for file edits that need to be changed?



      Am i wrong in the assumption that DavFile.WriteAsync will be called with a stream for the updated content?



      If WriteAsync is not the right location to save updates to a file, could you provide some guidance on the process of saving changes to existing files?



      Edited to add:
      Now i can see that after i dismiss the first error about the device not working i get the standard save dialog box, if i click save it asks me if i want to overwrite the existing file, after accepting to overwrite then WriteAsync is called and i can update the file contents



      I'm not quite sure why it would first tell me there's an error and then still allow me to write the file but only as replacement to the original file



      Thanks for your help







      ithit-webdav-server






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 20 '18 at 4:14







      Juan Mosqueda

















      asked Nov 20 '18 at 3:26









      Juan MosquedaJuan Mosqueda

      12




      12
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Fixed, i found that there were issues with the ILockAsync implementation, reviewing the FileSystemStorage sample helped fix the issue with locking files before writing or updating properties






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385780%2fwrite-files-changes-made-when-opening-file-through-windows-explorer-in-a-mapped%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Fixed, i found that there were issues with the ILockAsync implementation, reviewing the FileSystemStorage sample helped fix the issue with locking files before writing or updating properties






            share|improve this answer




























              0














              Fixed, i found that there were issues with the ILockAsync implementation, reviewing the FileSystemStorage sample helped fix the issue with locking files before writing or updating properties






              share|improve this answer


























                0












                0








                0







                Fixed, i found that there were issues with the ILockAsync implementation, reviewing the FileSystemStorage sample helped fix the issue with locking files before writing or updating properties






                share|improve this answer













                Fixed, i found that there were issues with the ILockAsync implementation, reviewing the FileSystemStorage sample helped fix the issue with locking files before writing or updating properties







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 21 '18 at 4:15









                Juan MosquedaJuan Mosqueda

                12




                12






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385780%2fwrite-files-changes-made-when-opening-file-through-windows-explorer-in-a-mapped%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to send String Array data to Server using php in android

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                    Is anime1.com a legal site for watching anime?