My CSS settings from my ASP.Net Core 1.1 project won't appear after publishing to Azure. - css

I'm developing a very simple website in ASP.Net Core 1.1, and all of the changes that I had made to the CSS settings are loaded correctly when I run the site in IIS Express. So I decided I needed a hosting environment so that I can show my client the site, and purchased an Azure account. Now, after publishing the site to Azure, the site looks like this. It's apparent that the CSS styles are not loading and I cannot figure out why.
I've tried the suggestions from here, and here and haven't had any success. Deleting the _.min.css files hasn't helped and my project doesn't even have a BundleConfig.cs file so I'm not sure where to put the BundleTable.EnableOptimizations code. Any help would be appreciated.
P.S.: The Azure hosting was primarily for me to send the link to my client for him to see the site and also for a few other test purposes. It will not be the production environment. Is this an issue specific to Azure? If so, then is it safe to say that I won't have this issue with another web host?

So, I was told that Azure and IISE were referencing two different things. Sure enough, Azure was pulling from site.min.css while IISE was pulling from site.css. After searching for the reason behind this I stumbled upon this article on bundling and Minification, and followed the instructions starting at “using bundling and minification in a project.
After the build, I redeployed to Azure and the site worked fine. Azure is still pulling from site.min.css, so I’m still not sure whether or not that’s part of the problem. But the bundling extension seemed to fix everything up.

Related

How do I properly deploy a website from Visual Studio and make this ASP based site function properly?

I'm sure there's something simple I'm missing.
I'm attempting to help a buddy move his ASP site from one host to another to avoid some questionable billing practices. I usually work with PHP-based sites (Wordpress etc.) and, unfortunately, have no experience with VS or ASP.
He's temporarily moving to Godaddy on their Plesk offering temporarily until he can work out something else. He provided me with all of the files contained within his ftp (containing his site's default.asp file, header, footer etc.) as well as an archive.xml, parameters.xml, and a systemsinfo.xml file. No .snl file or anything like that.
The files did not come with a web.config file. The error I keep getting, after uploading the FTP files is "HTTP Error 502.5 - Process Failure". From my understanding, it's often related to the web.config file. And from what I understand, you can have one generated by deploying the site through VS. Problem is, I'm at a loss as to what the proper actions to deploy this project.
Plesk provides a .publish settings file, I'm just at a loss as to how to properly open this file in VS to then have it create a "web.config" file and proceed to have it publish to the hosting. Part of this is I'm unsure how to properly open a project like this in Visual Composer to then proceed with the process of setting a web.config file and going forward with the deploying.
Not knowing exactly how to open this project without an .snl file or anything, I tried creating a new project and dropping in the other files to try and set up the process that way with no luck. Considering that Plesk provides a deploy file with that information, I'm assuming if I can properly open the project, working locally, I can then go through the deploy process. I'm just at a loss as to how I can properly setup a new project with someone else project files without an .snl file or otherwise.
Any guidance that you provide would be awesome.
Thank you.
Well, if you missing basic files required to operate the site such as web.config, then you don't have the site or files required, right?
Either FTP down the existing site, or you go to the source code and VS project, and re-compile the code, and re-publish. In fact, I suggest publishing to a local simple file folder.
Even publishing to a local file folder is a good start. Now, just copy that local folder that you published from the source code project, and that published folder should work on the new site. But, really, missing files like web.config? Rather fundamental that you have ALL files of that existing published site, or you have to go back to source code project in VS and re-publish.
since that site has vb.net or c# code? Then it also not clear if the original site was a
asp.net web site
or
asp.net web site application.
Rather critical you determine the above. The reason is that for a asp.net web site application, then at publish time, all code is complied at publish time, source code is stripped out, and then you have a working site.
If this is a web site (not web site application), then all source code is in fact published to the web site, and IIS is now responsible for compiling the .net code.
but, gooly, without a web config file, you simple don't have the files for that site to work - NOT even close!!!
but, as noted, if you have the original source code and VS project, then I would of course use the source code project for the publish. As noted, you can publish via FTP, and several other ways - but I in most cases use folder/file publish to a local folder, and then that is FTP up to the site.
You also don't mention if a database is involved. But, the connection strings to the database will FOR SURE change on the new site - and that boatload of required information will of course be in the web config file.
So, what road will much depend on if you going to download the exiting site, or your going back to the original source code and Visual Studio project.
So, first step - which will take about 10 seconds of your time is to determine if this is a asp.net web site, or a asp.net web site application.
If the existing published site has the c# (or vb.net) source code, then this was/is a web site.
If the existing published site does NOT have the source code, then of course this was a asp.net web site application - and Visual Studio is responsible for compiling the code BEFORE publish.
I guess this really comes down to if you have the source code and the original project used to build the site in VS or not?
I mean, if you have the source code (not compiled) of that site and have the full project in VS, then that's your best starting point. And if that site was published asp.net web site (application), then FTP and downloading the site WILL NOT get you a working asp.net project in VS.
This is much like saying you have a some .exe program, but don't have the source code and project used to build that .exe.
Same goes for asp.net. but, as I stated, often the web site as opposed to web site application model is used, and in that case, then you would get and have the source code files by a simple FTP download. But, you don't even have the web.config file - and that makes no sense at all, since that going to exist in the current site if you download, and it would exist in the original VS project used to create that site in the first place. During a publish, we often have an additional config file that has the local database connections, and during publish, they are transformed into the correct database connections for the published site. But then again, you not even noted or mentioned if a database is involved here.
I mean, if I was handed a LAMP project (Linux, Apache, MySQL, PHP), and had to publish that site? gooly, I not worked with LAMP, but I'm sure it would be a week, or more for me to figure that out, since I'm not familiar with LAMP, and how such sites are laid out, let alone how the configuration of such a site works. Big job if the whole system, programming language and framework is something you never used before.
I know that Godaddy use Plesk control panel too. But you need to make sure that Godaddy has support .NET Core. You may refer to this post https://dotnetblog.asphostportal.com/how-to-fix-error-502-5-process-failure-asp-net-core/. I believe it will solve your issue.

Steps to deploy .NetCore 2.1 application to web server. missing steps

I have built a web app in VS2019 that is a .netcore 2.1 application. It builds and runs fine locally in debug and release mode.
I have bought space from a hosting site on there server and have a registered a domain, they stated that they can run .netcore apps.
I have deployed the web app to the servers file server, I have used Visual studios publish functionality and used filezilla, my site is in its httpdocs folder which is where there sample html index file was before I deleted them, now in this It has the webroot folder and the dll's here.
When I look up the website online it shows a 500 error.
I have never set up this type of thing before, am I missing steps, Is there something that I have missed.
Just to note, I have looked up other similar questions regarding this but havent helped.
Assuming you are trying to host this inside IIS, you need the followings to be installed on the server. You can download the same from here.. Please make sure you choose the correct hosting bundle for your application.
Once that is installed, make sure to open IIS and create an apppool. Make sure you select No Managed code.
Then you can add the web site, and assign the above apppool to the website.
Hope this helps. Happy coding <3

Old Asp.Net Web Site Project - No Project file?

So I have an Asp.Net website that i'm responsible for. I'm having a build issue, that as far as I can tell, may be either MacAfee or some other random cause.
But thinking back, I want to say the problem started when I added a "Test.aspx" form to the site, did some testing, then removed the Test.aspx form from the site.
I'm using TFS 2010 as my source control as well. Which I don't know if it applies or not.
My question is, is there some hidden location where all files to be included in publishing a website is maintained?
Is there a Project file for a Web Site app and if so where is it?
I've built the site using MSBUILD and notice some metaprj project file in the output but I can't seem to find any such file.
Web Site apps aren't meant to be built into a dll file. There is a conversion wizard to make it a web project but it doesn't always work well. My advice would be to continue to work with it as a Web Site app. The code files are compiled at at runtime on first use. You can run from Visual Studio or setup a site in IIS. Nothing is hidden in a Web Site app and there is no project file. So, you shouldn't have a build issue because you shouldn't be building. Try to run the app as is and if you get an error let us know what the specific message is.

Do Azure web sites need to have ASP.NET features?

I created a pretty bare bones web site, with no ASP.NET features, and have published it as an azure web site (http://usamaporama.azurewebsites.net)
Unfortunately, even after hours, all I get from that site, although it appears to be running and published with no errors, is a page that says, "This web site has been successfully created. There's nothing here yet, but ...."
Could it be that Azure is expecting something fancier than my site, and is confused by a package that only contains a couple of references in the HTML to CDNs and a single js file, as well as a single CSS file?
Does it require that a site/app require/reference ASP.NET and/or MVC-specific features, or what?
My site runs fine in local IIS from Visual Studio 2013.
UPDATE
An article outlining it can be read here: http://www.codeproject.com/Articles/690045/How-to-Display-and-Hide-Marker-Groups-in-Google-Ma or the source downloaded here: http://www.codeproject.com/KB/ajax/690045/USAMapORama_Standalone.zip
Don't forget to set the default document..
http://xamlgeek.net/2010/11/19/start-page-in-azure/

Accessing remote Umbraco website from Visual Studio

I'm about to deploy a site where some functionality is omitted to get the website launched as soon as possible. This means that after the site has been deployed to a live server, some development still needs be done.
I have mainly been used to working on local projects, and have just been playing around with opening the site as a FTP project in VS2012.
This seems to be the way to go, but unfortunately, IntelliSense doesnn't play nice (not all namespaces are recognized) and when re-building the project, it seems as the whole Umbraco project is recompiled (which creates an enormous overhead). And I have not found a way of excluding Umbraco specific folders from the project.
Another thing is that the project is recognized as a WebForms project and not MVC4, for which I would also like a fix :)
Any suggestions on how to carry on from here? Suggestions and best practices is very welcome!

Resources