Hi, I'm trying to deploy an ASP MVC 4 web project with Windows azure and when VS2012 finish deploying the project and the browser open
www.restrevs.com I can't see my .css working ..not even my db files displaying in the grid . Before deploy with VS12 I'm already downloaded my publish profile from azure and I did import..... at the final step before to
click 'Publish' when I tryed to see 'Preview' display an error .
Did you ever find a solution for your css problem on azure? I am facing the same problem with my site. On my machine, everything works fine. But after deployed to azure, no styles are being respected. Everythin looks plain. I checked all my css files
on the azure website and can see all of them intact in the folders where they are supposed to be. If you found a solution, please share it with me and it would help me a great deal.
I was facing this problem while deploying the code in Azure websites. it did worked when I deployed build from visualstudio.com and wasn't when I tried to publish the build from visual studio 2013. the main problem was CSS Minification. I totally agree with
1st response to this question. but thought of sharing solution that worked for me, may be it will help you in fixing it.
basically when we deploy through VSO it generates minification files for css, js by kicking in system.web.Optimization, but when we do publish build from VS 2013 we have to take care of the below.
bundling-and-minification 1. make sure the folder structure and your bundler naming convention should be different. something like this.
2. add at the bottom of your bundleconfig definition
publicstaticvoidRegisterBundles(BundleCollection bundles){
bundles.Add(newScriptBundle("~/bundles/jquery").Include("~/Scripts/jquery-{version}.js"));// Code removed for clarity.BundleTable.EnableOptimizations=true;}
3. make sure to add debug false in web.config (when you start local debuging VS2013 will give you a popup saying that you need to make sure to putting it back before deploying into prod. that itself explains much.
<system.web><compilation debug="true"/><!--Lines removed for clarity.--></system.web>
Member
1 Points
6 Posts
azure does not load .css and db
Jul 18, 2013 06:02 PM|RafaReyes|LINK
Hi, I'm trying to deploy an ASP MVC 4 web project with Windows azure and when VS2012 finish deploying the project and the browser open www.restrevs.com I can't see my .css working ..not even my db files displaying in the grid . Before deploy with VS12 I'm already downloaded my publish profile from azure and I did import..... at the final step before to click 'Publish' when I tryed to see 'Preview' display an error .
Some help PLEASE!
deploy ASPMVC
All-Star
120166 Points
27994 Posts
Moderator
MVP
Re: azure does not load .css and db
Jul 18, 2013 10:52 PM|ignatandrei|LINK
SHow css registration script.
deploy ASPMVC
Contributor
3390 Points
1079 Posts
Re: azure does not load .css and db
Jul 19, 2013 12:00 AM|kctt|LINK
www.restrevs.com does not work at all for me. Domain is not registered.
deploy ASPMVC
Member
1 Points
6 Posts
Re: azure does not load .css and db
Jul 19, 2013 12:23 PM|RafaReyes|LINK
here's my _Layout.cshtml
should look like this:
but look like this :
Does not display the rows from the db / does not display the images and does not load the .css file
deploy ASPMVC aspmvcdeploy
Member
1 Points
4 Posts
Re: azure does not load .css and db
Oct 30, 2013 12:12 PM|babupalladium1|LINK
Hi RafaReyes,
Did you ever find a solution for your css problem on azure? I am facing the same problem with my site. On my machine, everything works fine. But after deployed to azure, no styles are being respected. Everythin looks plain. I checked all my css files on the azure website and can see all of them intact in the folders where they are supposed to be. If you found a solution, please share it with me and it would help me a great deal.
Babu.
deploy ASPMVC aspmvcdeploy
All-Star
120166 Points
27994 Posts
Moderator
MVP
Re: azure does not load .css and db
Oct 30, 2013 10:33 PM|ignatandrei|LINK
please replace
with
deploy ASPMVC aspmvcdeploy
Member
4 Points
27 Posts
Re: azure does not load .css and db
Jul 24, 2015 08:59 AM|nagen|LINK
I was facing this problem while deploying the code in Azure websites. it did worked when I deployed build from visualstudio.com and wasn't when I tried to publish the build from visual studio 2013. the main problem was CSS Minification. I totally agree with 1st response to this question. but thought of sharing solution that worked for me, may be it will help you in fixing it.
basically when we deploy through VSO it generates minification files for css, js by kicking in system.web.Optimization, but when we do publish build from VS 2013 we have to take care of the below. bundling-and-minification 1. make sure the folder structure and your bundler naming convention should be different. something like this.
2. add at the bottom of your bundleconfig definition
3. make sure to add debug false in web.config (when you start local debuging VS2013 will give you a popup saying that you need to make sure to putting it back before deploying into prod. that itself explains much.
</div>deploy css HTML ASPMVC azure
None
0 Points
1 Post
Re: azure does not load .css and db
Jun 30, 2017 04:48 PM|DeepakMVC4|LINK
For folks stuck in Asp Net Core:
https://docs.microsoft.com/en-in/aspnet/core/client-side/bundling-and-minification