Answered by:
Convert WAP to WSP

Question
-
User-696898627 posted
Hello,
I created a web application project WAP but I now realize I should have created it as a web site project WSP.
The reason is that I develop on the same server I deploy to, so therefor I find it easier to deploy and maintain or add future enhancements to the code if there is only one version of the project. I believe this would be the case with a WSP, correct me if I am wrong.
Any guidance and insight would be appreciated.
Thank you all !
Thursday, March 1, 2018 2:36 AM
Answers
-
User753101303 posted
Hi,
I believe you don't have this option as Web Application Projects are now favored over Web Sites. You could do by hand but does it worth. That is you would always do changes directly on the production site ?
Instead you could have your master project at any location you want using https://github.com/, https://www.visualstudio.com/team-services/ or some other similar services and then you'll deploy your update once ready. You'll just have an additional step but more flexibility.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, March 1, 2018 1:39 PM -
User-821857111 posted
The reason is that I develop on the same server I deploy to, so therefor I find it easier to deploy and maintain or add future enhancements to the code if there is only one version of the project. I believe this would be the case with a WSP, correct me if I am wrong.The WSP approach appealed to people who were used to scripting their sites in classic ASP or PHP and only had to FTP an amended code file to the hosting server to effect an update to their site. WAP need to be compiled prior to deployment. You can choose the option to allow the site to be updatable, but this doesn't provide much flexibility - you can only really make minor changes to the aspx files that don't impact on the code behind file. In either event, there only needs to be one version of the project, so I'm not sure what problem you are trying to solve.- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, March 1, 2018 2:36 PM -
User753101303 posted
The problem is that you'll find only some vague guidance such as https://forums.asp.net/t/1374036.aspx?Convert+from+Web+Application+to+Website and on the long run this model is perhaps not that flexible.
If you have VS on the server (???) you could have your project in a folder, use IISExpress to make it work and then publish it once ready ?
For now I don't feel the difference between WAP and WSP is that huge that it's worth the work to move to this less popular model and maybe later have to go back to WAP.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, March 1, 2018 2:51 PM
All replies
-
User-1838255255 posted
Hi ChaChaMan_Ca,
According to your description, about how to convert the WAP to WSP, please check the following tutorial:
Converting a Web Site Project to a Web Application Project:
Converting Visual Studio Website to Web Application Project:
https://www.gurustop.net/blog/2008/08/03/converting-vs-2008-website-to-web-application/
Best Regards,
Eric Du
Thursday, March 1, 2018 6:47 AM -
User-696898627 posted
Hello Eric,
What I am asking is the opposite !....
Thx
Thursday, March 1, 2018 1:23 PM -
User753101303 posted
Hi,
I believe you don't have this option as Web Application Projects are now favored over Web Sites. You could do by hand but does it worth. That is you would always do changes directly on the production site ?
Instead you could have your master project at any location you want using https://github.com/, https://www.visualstudio.com/team-services/ or some other similar services and then you'll deploy your update once ready. You'll just have an additional step but more flexibility.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, March 1, 2018 1:39 PM -
User-696898627 posted
Thank you for your insight Patrice,
I could resign myself to WAP types but I need to keep things simple as I only develop for my own (single) web site on the same machine that is running IIS. There is no need for duplicates of the same project.
Can I not compile and store it in the same project folder. Then I could point to this location with IIS. If ever I needed to make a change, I would just recompile the existing project!?
Any insight would be appreciated.Thursday, March 1, 2018 2:28 PM -
User-821857111 posted
The reason is that I develop on the same server I deploy to, so therefor I find it easier to deploy and maintain or add future enhancements to the code if there is only one version of the project. I believe this would be the case with a WSP, correct me if I am wrong.The WSP approach appealed to people who were used to scripting their sites in classic ASP or PHP and only had to FTP an amended code file to the hosting server to effect an update to their site. WAP need to be compiled prior to deployment. You can choose the option to allow the site to be updatable, but this doesn't provide much flexibility - you can only really make minor changes to the aspx files that don't impact on the code behind file. In either event, there only needs to be one version of the project, so I'm not sure what problem you are trying to solve.- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, March 1, 2018 2:36 PM -
User753101303 posted
The problem is that you'll find only some vague guidance such as https://forums.asp.net/t/1374036.aspx?Convert+from+Web+Application+to+Website and on the long run this model is perhaps not that flexible.
If you have VS on the server (???) you could have your project in a folder, use IISExpress to make it work and then publish it once ready ?
For now I don't feel the difference between WAP and WSP is that huge that it's worth the work to move to this less popular model and maybe later have to go back to WAP.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, March 1, 2018 2:51 PM -
User409696431 posted
"I believe you don't have this option as Web Application Projects are now favored over Web Sites."
There is no automatic option, but it shouldn't be too hard to do by hand. The link provided by PatriceSc covers it. (Mind you, directly editing a site on the server is fraught with potential hazards, like introducing bugs to the live site without testing first.)
If you want to do the conversion, test it on a copy other than the live site.
Thursday, March 1, 2018 9:41 PM