0

I have three MVC web applications namely App1, App2, App3. All three application having same set of users. In App1, I have implemented messaging module, which helps application users to communicate with each other with in the application. I want to integrate messaging module into application App2 & App3, without moving entire code from App1. So then message sent from App1 can be visible from App2.

I have the following component,

  1. Message database
  2. Messaging module with in MVC area

How to integrate messaging module between application?

Cœur
  • 37,241
  • 25
  • 195
  • 267
kannan Eswar
  • 427
  • 2
  • 4
  • 14
  • Use an API to communicate between apps. Given this is a web app, it makes perfect sense to of course use a web API. In other words, call your controller actions in App1 from App2 and App3 – Nick.Mc Jun 09 '17 at 05:58
  • Nick : thanks for your comments. When calling api of App1 from App2, which cause CORS (each application will be different domain) & Security issue. Since this is browser app, if some one know the api link, can able to post message. How this can be restricted? – kannan Eswar Jun 09 '17 at 06:05
  • By using authorisation attributes. But that requires you to use an authorisation provider, which you may not be doing. https://stackoverflow.com/questions/10848086/authorize-attribute-in-asp-net-mvc. I'm not sure how this works with CORS – Nick.Mc Jun 09 '17 at 06:06
  • I have already used authorize attribute. When App1 send request to its own controller, if authorization fails, it will restrict access to that controller action. But in this case request coming from different application hosted in different machine. When App2 calls App1 controller, always authorization will be failed. – kannan Eswar Jun 09 '17 at 06:17

0 Answers0