1

I have an ASP.Net MVC application A. Similarly another team has developed a web application using c# web forms. Now, we want to merge both the applications and deploy it.

The issue is the published Code for ASP.Net MVC have several files such as (Global.asax, and some files in bin folder) which are also present in the other project.

Is there anyway I can overcome this issue?

2

1 Answer 1

1

We had the same issue, and we solved it like this:

One of the things you have to solve is the duplicated global.asax files.

1 - Define one of your projects to be the mandatory. Let's say your mvc project.

2 - On the webforms project, create a reference to your mvc project dll.

3 - Remove the code behind in webforms app and change your global.asax file in your webforms project:

<%@ Application Codebehind="Global.asax.cs" Inherits="Your global class full name" Language="C#" %>

Inherits must have the fullname (namespace+class) from your mvc global.asax class. For instance: Company.App.Application

4 - Make sure you are referencing the same versions of assemblies that are common to the two projects.

5 - Who works with the mvc project must have access to the code of webforms project and vice-versa.

6 - Make sure both projects are referencing the same web.config file.

7 - Then you can publish first project webforms and later project mvc.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.