Hi,
In that scenario (ASP.NET.MVC) as external application (and also I am assume its hosted outside of the SharePoint Server),You can consume the SharePoint REST API services.
Not to rely on the soap based services(.asmx).
And also you are free by choosing your own app pool for your web application not to align or force to change anything to use the SharePoint Web Services.
Could you please confirm your ASP.NET MVC application authentication details ? So you will get more precise information on this topics.
Thanks for your prompt response. The SharePoint environment is configured for Multi Tenancy and Forms Based Claims Authentication. Every tenant has separate membership DB. Hence the user is authenticated using a custom membership provider. The ASP.Net MVC based site will not do any authentication, rather, it will simply pass the credentials (during first login) to the SharePoint site and will have to get the user authenticated with a token. For every subsequent request, it will have to use this token and we need to explicitly re-validate the token, w/o password (this is another mystery, since SecurityToken class is neither serializable, so that it can be sent to the ASP.Net MVC site nor able to be revalidated, since revalidation requires getting claims back from the token and security token class is not having this property. Anyway, these are different stories and much more confusing. I have created different posts for these questions). Hope it clarifies.
Also, if I use CSOM, how can I publish content types, have event receivers and so on?
Hi,
Token validation / serialization / expire / alive and re validation will be managed by the SharePoint Client assemblies.
What I suspect, if you choose to work on the MVC application thats not hosted in SharePoint Server, then why you are looking into SharePoint related stuffs like "Event Receiver, Content Type Publishing, TimerJob".
Put it this way,You are creating an application interface (your case) just to consume the SharePoint data and modifying based on the user context.
Nothing to do with use of or Manage the SharePoint sites using CSOM.
There is "Remote Event Receiver" but it will not fit to your requirement, as its focused on "ASP.NET MVC" hosted in SharePoint and used "Provider Hosted App".
The content or data is going to live inside SharePoint and will have to be managed inside SharePoint. Hence these are inevitable. It's a business requirement. Also, as far as I understand, token generation cannot be done in CSOM, especially so in my case, since there is no concept of apps involved.
Hi,
Please not to come conclusion.
In SharePoint perspective, your MVC application is just Client or Remote Web that consumes the data from the SharePoint.
To deal with it, Please have a look at this link and its contents.
https://msdn.microsoft.com/en-us/library/fp179912.aspx
If you need more flexibility in terms of Token Management ,You must convert your ASP.NET MVC application to SharePoint Provider hosted app.
Next, I tried little on my end, I am able to use the Office 365 ( Analogue to remote web or client application) webservice on MVC application.
Try your luck too.
Ok,
The conclusion is a client applications including standalone MVC.NET can interact with SharePoint through any of the legacy authentication providers and also compatible with OAuth and S2S authorisation model.
From your notes, You are expectation scope is wider than this stand alone MVC.NET application.
To leverage the full benefits and all the features (excluding administrative tasks) using client application of the SharePoint, you must to convert your MVC application to Provider hosted app.
otherwise, just use your MVC application as client application within its boundaries.