Question

I have an ASP.NET WebApplication (not Website) that was written with C#.

I want to publish and deploy this application for more than 50 sites in my server. I would prefer to make some dlls and put them in GAC of my server so all sites will use dlls from GAC and then I can update all my sites just with replacing some dlls in GAC.

When I publish my application I get a single dll for all .cs files but all .aspx files remain. I want to merge .aspx files to single assembly too.

Is there any way?or any other idea for my case?

Était-ce utile?

La solution

in your web project properties:

package/publish web

check - precompile this application before publishing

advanced - merge all output to a single assembly

Autres conseils

When you go to the publish settings there is an option to 'make site updatable', if you untick that all the cs code will be merged into the app_web.dll.

You will still have all the seperate aspx pages, since those define the entry point into the code. To my knowledge the only way to merge those would be to copy/paste all the seperate aspx pages into the default.aspx, and wrap them in <asp:Panel ID="HomePage" Runat="Server" Visible="False"> and then set the right panel visible in the Page_Load depending on the QueryString. You can use URL rewriting to still get nice URLs.

Depending on how many pages you have, and how big they are in code, I would probably not do this myself. But if you find the result of having 1 page outweighs the rest, it is technically possible.

Another option, maybe, is to just host the application on a subdomain and iframe it where it is needed. This might not be possible due to cross-origin problems, depending on your setup, but it would be a 'cleaner' way to work.

Hope this helped.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top