views:

100

answers:

2

I have developed a web application in Visual Studio 2008 and want to publish it in to the production server. I see a publish option there.But its producing files with DLL. I dont want to publish only asps files and dll's , Instead i want to use the aspx files and aspx.cs file .This would help other developers to download the code and modify it whenever required od debug it if there is any need.

I tried to remove the Inherits attribute from the Page directive in the aspx page, but next time when i want to add an even for a server side control, Its getting added in the aspx page itself,not the code behind

+2  A: 

If you want to publish both of aspx and .cs file, in order to share with other developer, you can just copy over the whole website, with all the csprojects and slns.

A better way is to setup a source control at your server, and as you checkin your code, compile your code at the server and serve the pages from there. In this way anyone who has access to the machine can just step in and debug, if necessary

Ngu Soon Hui
+2  A: 

A "web application" in Visual Studio is compiled on your local machine, and then uploaded to the server as a DLL and some support files. A "web site" in Visual Studio is organized with code files in the App_Code folder, plus your .aspx and .aspx.cs files. To deploy you copy everything up to the server, and the .NET runtime on the server does the compilation dynamically, when the files are first accessed.

So, to do what you're asking for, it sounds like you should convert your web application to a web site. Then, just zip everything up, copy it to the server, unzip, and you're done.

RickNZ