4

I am working on creating a WebDAV server in .Net, using IT HIt WebDAV engine.

Here's the issue:

When a URL ends with a dot ('.'), the dot is being truncated from the URL. For example: 'http://webdav.company.com/Company/My Company, Inc.' the raw Context.Request.Path comes over without the dot at the end. Any ideas why this happens and is there a workaround?

I am hosting the solution in IIS 7.5, .NET Framework 4.0

I also have the relaxedUrlToFileSystemMapping property in web.config set to true.

Thanks in advance!

Vlad
  • 41
  • 2
  • 1
    You may want to check out: http://stackoverflow.com/questions/856885/httpwebrequest-to-url-with-dot-at-the-end – Nico Valencia Apr 02 '13 at 23:37
  • @Niko your solution may work with .Net 3.5 and earlier. As soon as Vlad has specified that he is using .Net 4.0 there is no need for hacks. The relaxedUrlToFileSystemMapping property solves this issue in .Net 4.x. – IT Hit WebDAV Apr 02 '13 at 23:46

1 Answers1

0

You may experience this issue with a code generated with IT Hit WebDAV Server Engine Wizards for Visual Studio and the "Store files and metadata in file system" option is selected.

This is a Windows file system limitation, there is no any workaround for this as far as I know. Here is what MSDN says about it:

Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not.

In case you are using database or any other storage you will not experience this issue.

IT Hit WebDAV
  • 5,652
  • 12
  • 61
  • 98