Click here to Skip to main content
15,346,923 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
(Complete ASP.NET MVC beginner alert!)

I have created a default ASP.NET application in Visual Studio 2019. When I deploy it (which by default deploys as Release), I notice that <system.web><compilation/> does not have a value for the debug attribute, which I am guessing means this defaults to false?

When I do a Debug deploy, I get...

<system.web>
<compilation debug="true"/>
</system.web>

...which means I lose all the styling applied to the pages and they render using the default browser styles.

I am guessing that this is because the setting turns of the bundling and minimisation?

It feels to me like I need to have finer control over this. I imagine that having debug set to false turns off a lot more than just bundling and minification? For example, is it possible to see what I see in my local IIS on the remote site and still see detailed ASP.NET errors?

I guess more generally I am just trying to get a handle on the best way of being able to debug code on the remote (development) IIS server.

What I have tried:

I've tried deploying as Debug and Release and done a comparison of the two deployed versions. The only difference between them is this one setting in Web.config.
Posted
Comments
F-ES Sitecore 22-Jan-21 8:16am
   
The debug setting so should have no effect on your running site, especially not styles etc. It's more likely you're not referencing static resources correctly so their src urls are wrong, causing them not to load.
Patrick Skelton 23-Jan-21 2:25am
   
Thanks for the information. The project is the out-of-the-box Microsoft site, so don’t really know where to start with fixing that.
bbirajdar 27-Jan-21 9:11am
   
Make sure your Bundle.Config.cs has the minimised versions of the stylesheets that you have added to the website. And yes, you can set the customErrors section in web.config to view the errors on deployed website
Patrick Skelton 29-Jan-21 2:51am
   
Thanks for the reply. I'm not sure what you mean when you say to make sure BundleConfig.cs *has* the minimised versions of CSS. I'm still new to this whole MVC thing (last did Web.Forms) so things like bundling and routing are all still new to me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900