0

I am developing a "platform", I have an MVC site that will hold all the main data, as well as our generic API, uses Microsoft authentication to create an account, then our employee MVC will add the data to the database that will allow the user to start consuming our API. I have a custom API for one of our customers, using a different MVC (just handles the API). I will have other custom APIs as well. I also am working on an employee MVC that uses active directory as its authentication. I am able to add this all to IIS using ports, but I am wondering if I am going about this all wrong. My ultimate goal was to have multiple projects, so if I need to make changes to any one project, it would not affect another project. Now I am thinking of trying to ditch the port method and instead set up the MVCs to have postfixes.

example.com(Main MVC with Microsoft Authentication)
example.com/api/{key}/{token} (Main MVC using Attribute Routing)
example.com/employee (MVC with AD Login)
example.com/custom/api/{additionStaticDefiner}/{key}/{token} 

This additional definer would be something like the company name put in the initial route template:

config.Routes.MapHttpRoute(
            name: "DefaultApi",
            routeTemplate: "custom/api/BobsBurger/{controller}/{id}",
            defaults: new { id = RouteParameter.Optional }
        );

The main two questions, am I splitting these up to much, (they are all in the same solution, and I have shared library applications to not duplicate coding), and is it possible to do this without the dynamic code areas running into each other? I tried once and had some issues and am not sure where to start, I will figure it out, but if someone has experience in this and suggestions I am all ears.

2
  • Is this NetCore MVC? If so, then a reverse proxy would be quite useful.to solve your needs, and you would simply run each NetCore app on it's own port. Commented Jan 10, 2019 at 19:41
  • No, currently it is standard ASP.NET MVC (7.2), I am going to eventually create .Net core just waiting on a stable version of 3. I guess I should also say that I have control of the server, and the IIS but our parent companies do the routing from our netscaller and they are a pain to get anything going. Commented Jan 10, 2019 at 21:30

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.