 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

June 11th, 2012, 02:59 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
CSS not working when deploying
When deploying my website to another server....my stylesheets are not working.
The style sheets work within Visual Studio but when deploying to a server under IIS / win7 they do not.
I have all permissions set correctly ( I believe) where my source code is residing. The default website is pointing to that directory location. When I render the page remotely the web pages are not formatted as is it in my development server.
|
|

June 11th, 2012, 04:53 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Do you have a link to the live site so I can take a look?
Imar
|
|

June 11th, 2012, 05:13 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
unfortunately...my website is internal
I simply used your Try It Out example on page 5 and user the Try It Out steps on pages 707 to 719 to deploy it and run it under a windows 7 server.
here is the view source of the web page deployed on the server...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>
Home Page
</title><link href="Styles/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form method="post" action="default.aspx" id="ctl01">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTY1NDU2MTA1MmRkVC4dkGfjLZPTVWdsRkcQeCrGgZMmVojjZKnoIE2mWr8=" />
</div>
<script src="/WebResource.axd?d=pW4Qr-sXv3KHv0coT1xJ0fsl_E2c8FxhfAvIdD-vIMB4UDBH-Jh3_QGTtDNm4KvksOWddRHsjrMXt7TyGJdYLPfh6TNCXHq-m17RmFgBGZE1&t=634746884515649120" type="text/javascript"></script>
<div class="page">
<div class="header">
<div class="title">
<h1>
My ASP.NET Application
</h1>
</div>
<div class="loginDisplay">
[ <a href="Account/Login.aspx" id="HeadLoginView_HeadLoginStatus">Log In</a> ]
</div>
<div class="clear hideSkiplink">
<a href="#NavigationMenu_SkipLink"><img alt="Skip Navigation Links" src="/WebResource.axd?d=BEvD_lUfSmBXnjCewGJ5VebpEEw_rqI-QdcjeEI2fxU-237v6Dq03cxGMHtJfDL17wzwV5NnebqFhwCtNTY5ZRUjJNAlUMrxFGvr2AZqfQA1&t=634746884515649120" width="0" height="0" style="border-width:0px;" /></a><div class="menu" id="NavigationMenu">
<ul class="level1">
<li><a class="level1" href="Default.aspx">Home</a></li><li><a class="level1" href="About.aspx">About</a></li>
</ul>
</div><a id="NavigationMenu_SkipLink"></a>
</div>
</div>
<div class="main">
<h2>
Welcome to
Driver Safety Version 0!
</h2>
<p>
To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>.
Today's date is 6/11/2012 2:12:37 PM</p>
<p>
You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&clcid=0x409"
title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
</p>
</div>
<div class="clear">
</div>
</div>
<div class="footer">
</div>
<script type='text/javascript'>new Sys.WebForms.Menu({ element: 'NavigationMenu', disappearAfter: 500, orientation: 'horizontal', tabIndex: 0, disabled: false });</script></form>
</body>
</html>
|
|

June 11th, 2012, 05:17 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
the directory structure is the same as you outlined on page 708.....I used the Copy Web Site Option in the vs2010. Configured the default website in IIS to point to the directory structure where the source is located....
|
|

June 11th, 2012, 06:03 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
What happens if you try to access the style sheet in the browser directly? And does that file exist on disk?
Imar
|
|

June 11th, 2012, 06:37 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I got it working by putting "Everyone" with read access for the Release Directory and all it's sub-directories. I had the IIS AppPool\ASP.Net v4.0 read access to the same, but for some reason that was not good enough....any thoughts? Something to do with my network?
|
|

June 12th, 2012, 01:43 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
It looks like you're running in Windows authentication mode. Check out the chapter on security to see how to use Forms Authentication. If you want to keep using Windows authentication, your users need to access to the files on disk because the iis process runs under their account....
Imar
|
|

June 12th, 2012, 03:50 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Imar
It looks like you're running in Windows authentication mode. Check out the chapter on security to see how to use Forms Authentication. If you want to keep using Windows authentication, your users need to access to the files on disk because the iis process runs under their account....
Imar
|
The authentication mode is set to Forms in the web.config.
Is there a setting on the website within IIS for Windows Authentication?
|
|

June 12th, 2012, 04:24 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
No, your web.config should take precedence.
Did you try adding the <location> element?
Imar
|
|
 |
|