Home > Software design >  How do I properly deploy a website from Visual Studio and make this ASP based site function properly
How do I properly deploy a website from Visual Studio and make this ASP based site function properly

Time:07-27

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.

CodePudding user response:

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.

CodePudding user response:

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.

  • Related