This project is read-only.

Orchard.Web.csproj > Project > VisualStudio DevelopmentServerVPath = OrchardLocal. Why?

Topics: Troubleshooting
Aug 2, 2013 at 3:15 AM
Edited Aug 2, 2013 at 3:28 AM
We run into missing Media Library files and broken links to embedded resources when we push our Orchard development database to production.

We think this is because of the Orchard.Web.csproj file entry.
So, we have three questions:
  • What was the design decision for settings these as OrchardLocal?
  • What are the repercussions of just using "/" instead of using "OrchardLocal/"?
  • What, if any, is the other way of maintaining our Media Library files and embedded resources when we push our Orchard development database to production?
Here are some of our ideas:
  • Maybe a T-SQL script to find-replace all instances of "OrchardLocal/" with "/".
  • Maybe make user-content database changes in a local IIS instead of Visual Studio.
Aug 2, 2013 at 6:52 AM
  1. I can't say, but perhaps it's done on purpose to force the developers to correctly handle relative paths.
  2. None.
  3. The easiest way is to change your IIS configuration to use "/" instead of "/OrchardLocal". Alternatively, use Vandelay.Industries RelativeUrlFilter. This will process all relative urls that occur in BodyPart and TextFields in such a way that they are relative to the site's configured base url.
Aug 3, 2013 at 2:20 AM
Edited Aug 3, 2013 at 2:21 AM
Thank you for that. We will use your recommended easiest way. That will means updating the contents of the Orchard.Web.csproj file as follows:

Use this...
...instead of this
We think that will do it.