We have an ASP.Net Web Forms application in which we have different folders for Data Access layer objects, Business logic layer objects and presentation layer objects (web forms). We have also implemented Provider model for Sql server. The entire application today is a unified dll file, with the web forms.
We have to now deliver a separate web application which will be accessed as an extranet to this application. We are thinking of implementing it as a presentation layer application with calls to web services (for additional security) rather than connecting to the database directly. We are faced with the following considerations:
Is there a way to use (re-use) the business logic already implemented in the application without copying the source code in a web service component? This would make maintenance more easy since fixing the business logic and data access logic in the application will automatically be effected in the extranet application.
We are using forms authentication today. Is there a way for the extranet application to also use the same user, membership, roles and profile for the extranet, so all users can be administered from the existing application? Will this authentication be treated as a web service?
Another approach would be of course to expose the web service from the very same application that hosts your existing presentation layer.
context.User
from within the web service code just as you do it in your web app code. Years ago I've blogged on how to share forms authentication between a web app and a desktop/web service app.
http://www.wiktorzychla.com/2008/02/clickonce-webservice-and-shared-forms.html
Some time later, I've updated the topic with another entry on how to do the same for WCF
http://www.wiktorzychla.com/2010/04/aspnet-forms-authentication-sharing-for.html
This should give you the required background.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.