Problems after trying to deploy Orchard (connection reset & wrong media path)

Topics: Administration, Core, General, Troubleshooting
Jul 3, 2014 at 1:01 PM
So we have tried deploying Orchard to our IIS but ran into some very annoying problems.

The easy one is that all images on pages, blogposts, etc. now show a broken link, because in the page source they show src="/OrchardLocal/Media/..." and after deploying the link SHOULD read src="[base_url]/Media/...". Is there an easy way to change all the image urls or do I have to do this all by hand?? (And why doesn't it use the format baseurl/Media in the first place?
(Right now we're trying to deploy from local development to a development server, after that we will deploy from there to the actual live server, so changing it al by hand all over again then isn't really feasable...)

The second problem is far more severe: The pages don't show up for some users/browsers, for others users have to hit reaload after every page request before the page displays...
This is very very weird. There seems to be a connection reset?

Opera 22.0 gives the following message:
This webpage is not available

The connection to newprovisioweb was interrupted.
Check your internet connection.

Check any cables and reboot any routers, modems, or other network devices you may be using.
Allow Opera to access the network in your firewall or antivirus settings.

If it is already listed as a program allowed to access the network, try removing it from the list and adding it again.
If you use a proxy server...

Check your proxy settings or contact your network administrator to make sure the proxy server is working. If you don't believe you should be using a proxy server: Go to the Opera menu > Settings > Change proxy settings... > LAN Settings and deselect "Use a proxy server for your LAN".
Hitting refresh then loads the page. I have to do this for EVERY page.

Chrome shows:
This webpage is not available

Reload  Less
The connection to newprovisioweb was interrupted.
Check your Internet connection
Check any cables and reboot any routers, modems, or other network devices you may be using.
Allow Chrome to access the network in your firewall or antivirus settings.
If it is already listed as a program allowed to access the network, try removing it from the list and adding it again.
If you use a proxy server...
Check your proxy settings or contact your network administrator to make sure the proxy server is working. If you don't believe you should be using a proxy server: Go to the Chrome menu > Settings > Show advanced settings... > Change proxy settings... > LAN Settings and deselect "Use a proxy server for your LAN".
Error code: ERR_CONNECTION_RESET
We tested this on 3 machines and there were only 2 cases where a page loaded on the first try.

IE 11 acts the same way.

Firefox is the only browser that acts a bit different. The url is http://betaweb/orchard/ but firefox changes it to www.betaweb.com/orchard/ which of course doesn't exists. I had luck to somehow force firefox to load the correct url and then it would load all pages just fine. My colleagues did not manage to do that.

Has anybody else experienced this connection reset error and can help?

Thank you for your time
Jul 4, 2014 at 9:14 AM
I have solved the connection reset problem. It seems to have been caused by the cache module. Deactivating the cache module solved the problem.

The problem with the wrong image src urls still persists though. Can anybody help? I guess it might be solveable by some sql commands (that I'm not too experienced with)?
Jul 8, 2014 at 3:52 AM
Did you try on an other IIS server? Do you have any other website running on that server?

Are you using a SQL Server or the built-in database?

With these informations, I might be able to help you a little more.
Jul 28, 2014 at 5:42 PM
Edited Jul 28, 2014 at 5:43 PM
Are your images actually showing up in the Media gallery to begin with? I believe the baseurl is implied in the image src, so if you're running on localhost, and the absolute url would be localhost123:Media/Default/FolderName/ImageName, the src should just be Media/Default... I'm having a similar issue with broken images, but mine are appearing as broken links in the media gallery when I try to upload them. I think it may be my firewall blocking the images generated on the site.
If you want to test the image path, you could run something like this in one of your .js files.
var src = $('img');
            src.each(function () {
                var source = $(this).attr("src");
                $(this).attr("src", source.replace("/Media", "/[BaseUrl]/Media"));
            });
or whatever you want to replace in the src. Not the best permanent fix, but it'll do in a pinch.