Website deployment - pathing issues

Posted by Community Admin on 05-Aug-2018 13:31

Website deployment - pathing issues

All Replies

Posted by Community Admin on 04-Apr-2011 00:00

Hi,

I've followed the guide here to deploy my sitefinity site to a live web server:

Deplyment guide

However, when browsing the site the pathing to the css and images seems incorrect and the page displayed is unstyled and has no images.

No code has been changed since deployment and the site builds and serves correctly on the dev machine.

Dev machine is Win 7, IIS 7, destination web server is Win2003 and IIS6, however I've tested a deplyment to a Win7 machine too and the same thing happens.

I'm stumped as to whats going on, any ideas?

Thanks

Posted by Community Admin on 04-Apr-2011 00:00

Hello RichW,

Thank you for contacting us.

Could you use FireBug and observe the request /response to the css? What is the status code you get?

Have you set up the wildcard application maps in IIS ?

Regards,
Victor Velev
the Telerik team


Posted by Community Admin on 04-Apr-2011 00:00

Hi Victor,

Using Firebug when hovering over the non existent images I get the response 'Failed to load given URL'.

When viewing source and clicking on the stylesheet link in the markup it takes me to a 500.19 internal server error.

I haven't set up any wildcard maps. What would I map? Note that this is going on a server running IIS 6.

Thanks

Posted by Community Admin on 04-Apr-2011 00:00

Hi RichW,

Could you please check the following tutorials on how to set up Sitefinity on IIS and especially to Wildcard Mapping:

How to setup Sitefinity on IIS 6:

www.sitefinity.com/.../installing_sitefinity_4_on_iis_6.aspx

Because 500 error is general error for server error it is hard to determine where could be the problem. This is probably caused by the configuration of your IIS. Have you experienced this problem when creating a new blank project? Can you verify your IIS is set correctly according to this article.

All the best,
Victor Velev
the Telerik team

 
 

Posted by Community Admin on 04-Apr-2011 00:00

Hi Victor,

Thanks for your response, however I think my point has been missed. I have installed Sitefinity correctly on my dev machine (Win7, IIS7.5) and have the site built and ready to deploy. The pages serve and the css/images resolve correctly as in image 1 (attached).

I'm testing the deployment on the same machine (it will be released to the live server once this issue has been resolved). I have simply copied the files from the Telerik projects folder within the program files directory into a directory in my wwwroot directory (following the guide here - http://www.sitefinity.com/documentation/installation-and-administration-guide/deploying-sitefinity/deploy-projects-to-private-virtual-server.aspx. I have then set up a website (with a .NET 4.0 app pool) and pointed it to the foler in the wwwroot containing the Sitefinity website. I then see the result as per image 2 which seems to be a result of the website not resolving the css paths and image paths.

The css and images are pathed as follows:

/[PROJECT-NAME]/Sitefinity/WebsiteTemplates/[THEME-NAME]/App_Themes/Default1/Images/logo.png
/[PROJECT-NAME]/Sitefinity/WebsiteTemplates/[THEME-NAME]/App_Themes/Default1/Styles/main.css

Posted by Community Admin on 05-Apr-2011 00:00

Anyone? This is a very annoying issue!

Posted by Community Admin on 05-Apr-2011 00:00

Well I think I've found the issue - it seems to be that when running via the Sitefinity Project Manager it runs on the url localhost:55282/<Project-Name> but when running under a normal IIS site it runs as http://sitename. therefore the pathing to the css needs the project name removed so the path that was

/[PROJECT-NAME]/Sitefinity/WebsiteTemplates/[THEME-NAME]/App_Themes/Default1/Styles/main.css

becomes

/Sitefinity/WebsiteTemplates/[THEME-NAME]/App_Themes/Default1/Styles/main.css

I'm yet to test this on IIS 6 but am stumped as to why the change is needed when deploying. It seems a bit silly as you need to rebuild the site again on the host as I've got images pathed in custom .net controls.

Any ideas as this isn't a good solution and I'm doubting whether this will work on IIS6.

Thanks

Posted by Community Admin on 05-Apr-2011 00:00

Hi RichW,

Have you tried to register all stylesheets in a folder called Global. This folder should be created in your theme. With respect to your current folders. Also please check if there are any restrictions ( img, css ) in IIS for the subpages.

Best wishes,
Victor Velev
the Telerik team


Posted by Community Admin on 05-Apr-2011 00:00

Thanks Victor,

i've actually created a second theme and applied it, removed the old one, created a new site in IIS and tested the permissions and then tested the website migration and it now appears correctly, so thanks for your suggestions it eventually led me down the right ally.

Posted by Community Admin on 25-Jul-2011 00:00

Hi,

Is there a way to create a new project for development without including <ProjectName> in the url?

At the moment my url resolves to: localhost:14514/.../etc

With a view to going live, I'd like it to just be:

localhost:14514/.../etc

Many thanks,
Pat

Posted by Community Admin on 25-Jul-2011 00:00

Hi Pat,

If you use the ProjectManager to host your website, the project name will be used to generate proper links. You can use IIS to serve your website and the project name will not be present in the address field. Please follow our documentation when setting your project using IIS.

Best wishes,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 27-Jul-2011 00:00

Hi Victor,

Thanks a lot, this worked well.

To confirm, after setting up IIS I run the project directly from Visual Studio, not the project manager. And it resolves without the project name in the path.

Thanks again,
Pat

Posted by Community Admin on 24-Sep-2012 00:00

Hi RichW,

Thanks for sharing this.

Posted by Community Admin on 24-Sep-2012 00:00

Hi RichW,

Thanks for sharing this.

Posted by Community Admin on 09-Jan-2014 00:00

I am trying to figure out why i will randomly get the 500 code (error). I am getting the error when i click on the "pages" tab. This will happen one day and then an hour later it is fine or it will happen all day and then the next day it is fine. 

Posted by Community Admin on 13-Jan-2014 00:00

Hi Tony,

Could you provide more information about this issue? What version of Sitefinity are you using? Can you give some details about your hosting environment (operating system, database)? Do you remember what are the exact steps that lead to this problem? Is it possible to share any error details from your Error log file located in ~\App_Data\Sitefinity\Logs?

Regards,
Petya
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed