Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950
This is the forum to discuss the Wrox book ASP.NET MVC Website Programming Problem Design Solution by Nicholas Berardi, Al Katawazi, and Marco Bellinaso; ISBN: 9780470410950
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 16th, 2009, 01:59 PM
add add is offline
Registered User
 
Join Date: Jul 2009
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
Default Opening website using Local IIS

Visual Studio 2008 Pro
SQL Server 2008 Developer Edition
MVC 1.0
Vista and IIS 7.0

Using the above, I have tried to open the final code released with the book as a website using the Local IIS option. The website seems to work but its design appears in IE8 as plain text with no images, as if the style sheets have not been applied to the website.

I can run the application as a project file with no problems but for testing purposes I wanted to run it using Local IIS on the same machine I develop on.

Has anyone else had problems with this?
Thanks in advance.
  #2 (permalink)  
Old July 16th, 2009, 02:03 PM
nberardi's Avatar
Wrox Author
 
Join Date: Aug 2008
Location: Phoenixville, PA, USA
Posts: 102
Thanks: 1
Thanked 16 Times in 16 Posts
Send a message via AIM to nberardi
Default

If you put this in a subdirectory on your IIS you need to make sure it is the root.

Such as if you have

http://localhost/TheBeerHouse

This is wrong, you need to create a separate site, like

http://localhost

or

http://localhost:1891
__________________
Check out my blog at: http://www.coderjournal.com
The Following User Says Thank You to nberardi For This Useful Post:
add (July 16th, 2009)
  #3 (permalink)  
Old July 17th, 2009, 08:36 AM
add add is offline
Registered User
 
Join Date: Jul 2009
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Why is this different to other websites? Is this due to IIS 7.0 or the way the site was designed?
  #4 (permalink)  
Old July 17th, 2009, 08:47 AM
nberardi's Avatar
Wrox Author
 
Join Date: Aug 2008
Location: Phoenixville, PA, USA
Posts: 102
Thanks: 1
Thanked 16 Times in 16 Posts
Send a message via AIM to nberardi
Default

It's not different than most websites. Most websites cannot be moved from a root to a sub folder without incurring some display problems. This includes PHP, ASP.NET, Ruby, etc.

This is because absolute paths were used for the resources in the header and footer for CSS, images, and JS. For example most of the resources look look like this:

http://www.yourdomain.com/Content/scripts/global.js

when you moved everything to a sub folder those paths didn't change to reflect your sub folder.

The difference that I think you mean is why do ASP.NET Webforms allow me to do this. That is because WebForms manage the paths of the resources for you, and adjust those accordingly.
__________________
Check out my blog at: http://www.coderjournal.com
The Following User Says Thank You to nberardi For This Useful Post:
add (July 17th, 2009)
  #5 (permalink)  
Old October 28th, 2009, 07:45 PM
Registered User
 
Join Date: Oct 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Nick,

First off, great book.

This post helped me understand why I can't run the app from a subfolder. However, I'm unclear on how else to run this on localhost. If I use the Web properties tab and create a virtual directory, it will run there, but it requires a subfolder name in order to create the V/D.

Why am I trying to get it to work on localhost? My ultimate goal is to use the Web Deployment tool in IIS Manager per this link, and the way I've got that working is if it's already set up on localhost.

Hope you can help. Thanks!
  #6 (permalink)  
Old October 29th, 2009, 03:00 PM
Registered User
 
Join Date: Oct 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I answered my own question. Rather than running on localhost in the way I described, I simply needed to Publish to there. noob mistake.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a local file from a hosted link FishBoy Classic ASP Professional 1 November 27th, 2007 11:08 AM
Unknown Error "-1" when opening new website MzMoody BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 November 10th, 2006 01:08 PM
Local WroxUnited on IIS - Unrecognized config B_Rad BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 November 20th, 2005 08:18 AM
Local Workstation IIS ank2go Crystal Reports 1 January 7th, 2005 06:08 PM



All times are GMT -4. The time now is 09:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.