Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Explorer error messages?

I'm wondering where Windows Explorer gets it's error messages from. My situation is quite specific, in that I'm using a custom WebDAV implementation, but the question I think could apply more broadly (any mapped drive).

So let's say I've got a mapped drive to my WebDAV share. I open the mapped drive window in Windows Explorer and from there I try and create a new folder. Now in my custom WebDAV implementation, I'm looking for the MKCOL WebDAV verb which creates folders, and in this case, I want to prevent the folder from being created. So I'm returning a 400 (Bad Request) back as the HTTP response.

The problem is, now matter how I handle this, Windows Explorer will pop up an error message that says:

File Too Large. The file '<%1 NULL:NameDest>' is too large for the destination file system.

What file is too large when the request is attempting to create a folder?

What I'm trying to figure out is where Windows Explorer got that? I can see all the details of how I'm handling the response using Fiddler (for example I can return custom exception details in the 400 response), so how does it connect my 400 to the message I'm getting above? Is there any way I can format the HTTP Response so that Windows Explorer will take the details I provide and use them in the error message?

like image 569
lhan Avatar asked Jan 24 '26 20:01

lhan


1 Answers

Explorer treats ERROR_INVALID_PARAMETER as "file too large" since that's how some file systems report that error condition.

like image 188
Raymond Chen Avatar answered Jan 27 '26 20:01

Raymond Chen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!