Website project type to Web application project type NO ONE-CLICK SOLUTION POSSIBLE [modified]
-
Is it possible to convert a Website project type to a Web application project type without starting over from scratch with a new solution? If so, how? SOLUTION: There is apparently no one-click tool available to perform this conversion. So I just bit the bullet and sat down and created a new solution and built it up from scratch until it was a Web application project equivalent to my original Website project. It took me about four hours with no "gotchas" to solve that I might have run into had I adopted one of the partial solutions that are out there and actually referenced in one of the answers to my question. I performed the conversion in the following steps, basically moving from the lowest level to the highest level, compiling at each step. This minimized compile errors due to undefined objects, although I couldn't entirely eliminate them because sometimes low level objects referenced high level objects (I know: bad design; but it isn't too egregious, and I had very few of these). 1. Created a new solution of type, Web application project. 2. I ported the .Web project first, which contains my WCF Web service. 3. Then I ported my utility classes in my Silverlight project. 4. I had my pages divided into categories that were more or less in a hierarchy, and I ported the lowest categories in the hierarchy first, and worked my way up. I had very few unresolved symbols doing it this way. 5. Finally, the few compile errors I had got resolved when I ported my MainPage, the last object to port. Along the way of course I had to add a few references, but compile errors quickly notified me when I had to do this. The new solution now works exactly like the original. Why did I do this in the first place? I did it because the Website project type requires you to put your .Web project source code up on your Website! This has things like my connection string (with password!) right out there in plain site for anybody to see, as well as proprietary algorithms generating and validating license keys. Oh, I know: there's a precompilation tool called aspnet_compiler.exe that will compile this code for you and after that you can obfuscate it, but in Googling about it, it looks as if you have to jump through hoops to get it to work for you. There are also better approaches than putting your source code in a folder (App_Code) off the root of your Website, like putting it into a protected subdomain, but I'm really green at all this Web development stuff and I just want to get something out there
-
Is it possible to convert a Website project type to a Web application project type without starting over from scratch with a new solution? If so, how? SOLUTION: There is apparently no one-click tool available to perform this conversion. So I just bit the bullet and sat down and created a new solution and built it up from scratch until it was a Web application project equivalent to my original Website project. It took me about four hours with no "gotchas" to solve that I might have run into had I adopted one of the partial solutions that are out there and actually referenced in one of the answers to my question. I performed the conversion in the following steps, basically moving from the lowest level to the highest level, compiling at each step. This minimized compile errors due to undefined objects, although I couldn't entirely eliminate them because sometimes low level objects referenced high level objects (I know: bad design; but it isn't too egregious, and I had very few of these). 1. Created a new solution of type, Web application project. 2. I ported the .Web project first, which contains my WCF Web service. 3. Then I ported my utility classes in my Silverlight project. 4. I had my pages divided into categories that were more or less in a hierarchy, and I ported the lowest categories in the hierarchy first, and worked my way up. I had very few unresolved symbols doing it this way. 5. Finally, the few compile errors I had got resolved when I ported my MainPage, the last object to port. Along the way of course I had to add a few references, but compile errors quickly notified me when I had to do this. The new solution now works exactly like the original. Why did I do this in the first place? I did it because the Website project type requires you to put your .Web project source code up on your Website! This has things like my connection string (with password!) right out there in plain site for anybody to see, as well as proprietary algorithms generating and validating license keys. Oh, I know: there's a precompilation tool called aspnet_compiler.exe that will compile this code for you and after that you can obfuscate it, but in Googling about it, it looks as if you have to jump through hoops to get it to work for you. There are also better approaches than putting your source code in a folder (App_Code) off the root of your Website, like putting it into a protected subdomain, but I'm really green at all this Web development stuff and I just want to get something out there
fjparisIII wrote:
Is it possible to convert a Website project type to a Web application project type without starting over from scratch with a new solution? If so, how?
Yes. Walkthrough: Converting a Web Site Project to a Web Application Project in Visual Studio 2005 [^] and Upgrading VS 2005 Web Site Projects to be VS 2005 Web Application Projects[^] If you are using VS 2008, have a look : Converting VS 2008 Website to Web Application[^] Hope this will help :)
Cheers ! Abhijit Jana | MVP Web Site : abhijitjana.net | Follow Me @ twitter Read my Latest Article :Mastering Debugging in VS 2010
-
fjparisIII wrote:
Is it possible to convert a Website project type to a Web application project type without starting over from scratch with a new solution? If so, how?
Yes. Walkthrough: Converting a Web Site Project to a Web Application Project in Visual Studio 2005 [^] and Upgrading VS 2005 Web Site Projects to be VS 2005 Web Application Projects[^] If you are using VS 2008, have a look : Converting VS 2008 Website to Web Application[^] Hope this will help :)
Cheers ! Abhijit Jana | MVP Web Site : abhijitjana.net | Follow Me @ twitter Read my Latest Article :Mastering Debugging in VS 2010
Thanks for the links. I haven't had time to look at them yet, but they look exactly like what I need. BTW, I'm using VS2010.
-
fjparisIII wrote:
Is it possible to convert a Website project type to a Web application project type without starting over from scratch with a new solution? If so, how?
Yes. Walkthrough: Converting a Web Site Project to a Web Application Project in Visual Studio 2005 [^] and Upgrading VS 2005 Web Site Projects to be VS 2005 Web Application Projects[^] If you are using VS 2008, have a look : Converting VS 2008 Website to Web Application[^] Hope this will help :)
Cheers ! Abhijit Jana | MVP Web Site : abhijitjana.net | Follow Me @ twitter Read my Latest Article :Mastering Debugging in VS 2010
For the record, I took a look at your first two links and they are for instructions if you're running VS2005, and one of them was for running a beta version of it! The menu system completely changed with VS2008, so maybe your third reference will be easier to follow. But even the first two links describe a brute force way of converting, basically starting over from scratch. Well, I looked at the VS2008 link and it also is a brute force method. There apparently is no auto-conversion software to do this. I'm going to start over from scratch and completely rebuild my application from the ground up.