Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am currently working on a C# ASP.Net 3.5 website I wrote some years ago which consists of a "main" public site, and a sub-site which is our customer management application, using forms-based authentication. The sub-site is set up as a virtual folder in IIS and though it's a subfolder of "main", it functions as a separate web app which handles CRUD access to our customer database and is only accessible by our staff.

The main site currently includes a form for new leads to fill in, which generates an email to our sales staff so they can contact them and convince them to become customers. If that process is successful, the staff manually enter the information from the email into the database.

Not surprisingly, I now have a new requirement to feed the data from the new lead form directly into the database so staff can just check a box for instance to turn the lead into a customer.

My question therefore is how to go about doing this? Possible options I've thought of:

  1. Move the new lead form into the customer database subsite (with authentication turned off).

  2. Add database handling code to the main site. (No, not seriously considering this duplication of effort! :)

  3. Design some mechanism (via REST?) so a webpage outside the customer database subsite can feed data into the customer database

How to organise the code for this situation, preferably with extensibility in mind, and particularly are there any options I haven't thought of?

share|improve this question

2 Answers 2

I didn't get any responses here, but I decided to go for the easiest solution at this stage and simply move the form into the subsite, even though that meant duplicating the main site's navigation to make the form looks as it always has.

share|improve this answer
1  
bad solution, you have now compromised your DMZ. –  jwenting Feb 25 at 15:50

I would think option 3 would be the better option. You would pass the data via a service to insert the data to your database. You should of course check what is calling your service maybe a client side cert, ip address range check, sanity check the data.

Are you using https: ?

share|improve this answer
    
Thanks for the response and apologies for the delayed reaction. Yes, option 3 would probably be the best way to go, with the measures you suggested. But as only forms hosted on the same domain would feed into the database, moving the form was just as easy. But something I will definitely bear in mind if I code something like this again. –  Emma Burrows Aug 8 '13 at 20:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.