Forum Moderators: open

Message Too Old, No Replies

Site migration won't work

         

andrewsmd

8:34 pm on Jun 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have this website working as is on a server now. I am in the process of moving this to a new server. I set everything up and then just changed my hosts file to point to my new server. The site comes up, but all of the image links are broken and the css files act like they don't exist. What I don't understand, is that the site comes up, it just can't find any of the images or css files, even though they are there on the server. I have never set up a site completely from scratch in IIS 7, is there something I have missed? Thanks,

DWarp9

10:05 pm on Jun 7, 2010 (gmt 0)

10+ Year Member



It seems like a problem with your references.
Remember, if you let .net resolve them for you, it will include the app name in the URL unless the site is the default website (ie. src="~/images/picture.png" in the website "test" becomes "/test/images/picture.png").
Inversely, if you specify the path yourself, remember to include the app name in the URL if doing it manually.

Well, that's all guessing, if you could provide more details on how you reference the missing files and how you've setup your site(s), it would be easier to help. ;)

andrewsmd

10:17 pm on Jun 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It wasn't a reference problem, that was my first guess. However since the site was example.com on both servers, that shouldn't have been a problem anyways. I did make sure the hosts file on the server was set to the ip of itself and not pointing to the original server, since the original server handles all of our DNS, that didn't fix the problem. Here is how I fixed it though. You have to go into server manager then right click on web server and add role services. Under common http features there is a feature called static content. This allows for the processing of html pages, images, css etc. Enable that and it should work. Our MCSE, MCSA, and MCTS certified engineers didn't even know this one!

bwnbwn

8:16 pm on Jun 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



well andrewsmd you did good thanks for the post with the fix.