Comments (5)
The current implementation of the disk-store doesn't check if the service has the permission to remove the file. If the file cannot be deleted (either due to permission or another condition), you'll get an internal server error. You could change the DiskStoreCollection.DeleteItemAsync
method and catch the specific exception that is thrown when you don't have permissions. In that case, you could return DavStatusCode.Forbidden
instead.
from nwebdav.
thx for the fast answer!
i tried your suggestion with no luck.
In your DisktoreCollection i added
_return Task.FromResult(DavStatusCode.Forbidden);
in the first line of DeleteItemSync. I never get an forbidden dialog.
Could you confirm that?
from nwebdav.
it seems that this is a known problem?
from nwebdav.
The WebDAV redirector has been improved in Windows 10, but I am not sure if it does interpret result-code Forbidden
correctly in the current version. But it would be a good idea to have the server return the proper result-code for other clients.
from nwebdav.
I have updated the NWebDAV source, so it returns HTTP status Forbidden if the user hasn't permission to delete/move the file. Unfortunately, the Windows WebDAV client doesn't do anything with it. But it seems a bit cleaner than returning InternalServerError.
from nwebdav.
Related Issues (20)
- Is it possible for multiple users to edit the same file and save using this webdav library? HOT 5
- how send web api token (jwt) ? HOT 1
- Content-Type header not set on Asp .Net.
- [WPS Office] Download fails HOT 3
- Word does not open .docx files
- Running HttpListener under mono does not recognise Basic Authentication HOT 1
- Problem with move request for non-existing source HOT 6
- [COPY] No error generated when destination file name is too long. HOT 4
- False upload progress percentage HOT 1
- need documents HOT 1
- Use DI instead of static HOT 3
- Upgrade .Net5 & Further Improvements HOT 4
- Async LockManager HOT 4
- https://datatracker.ietf.org/doc/html/rfc4918 instead of https://datatracker.ietf.org/doc/html/rfc2518 HOT 3
- Project vs nuget license, why there is difference HOT 3
- State of the project HOT 2
- Maximum size of attributes HOT 4
- Content methods need HttpContextAccessor. HOT 1
- Is this use of System.Xml.Linq.XDocument.Load() secure? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nwebdav.