I’m trying to create a upload center application using Asp.Net MVC 4. I want to have a url like this : http://site.com/user/{username}/{path} and path is like this/dir1/subdir2/file.txt and I return it(or edit it or etc)
but I don’t know how can I allow to have / character in url? because Mvc throws a security exception. can anybody Help me?
The directories aren’t physical. I keep all files in one directory and save their’s properties in DataBase
The feature you are looking for is called “wildcard routing” (see duplicate File path as MVC route argument for more info).