0

I need your advice regarding exposing data from a web application A to be consumed by a web application B, both applications being ASP.NET WebForms application.

First thought I have in mind is to build a REST WCF webservice within web application A.

Is this the best option? What other options do I have with .NET 4.0? Is Web API a better alternative? If yes, why?

Later edit: I want to have call a method that receives 2 parameters and returns a class with 2 properties. In the future, I might need to add some similar methods.

Later edit 2: The input parameters are sensitive, it there a way to send it someway so nobody can see them using a http proxy tool.

3
  • what do you want to do exactly? give some example for 'exposing' and 'consuming' maybe you're looking for a simple web service? Commented Feb 9, 2014 at 16:05
  • @Visionstar: I've updated the initial post. Did I answer to your question? Commented Feb 9, 2014 at 16:09
  • If the data is sensitive then you have 2 options: server-side (client side has no access/visibility) or encryption if client is involved in any way. Depending on what you mean by "sensitive", signing (instead of encrypting) is also an option. Commented Feb 9, 2014 at 18:10

1 Answer 1

1

How about trying to implement a Webservice/webmethod?

I didnt exactly understand the purpose of transfering that data, but you can implement a webservice which passes a json-string

here is a example/tutorial of implementing web-methods:http://www.tutorialspoint.com/asp.net/asp.net_web_services.htm

also check out those two links: WebMethod return values in JSON format How do I make my aspx web method return the list as a JSON object?

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for your response. As far I know, for a webservice, you need to have a proxy, or in other words, the application B should know implementation details about application A. Am I wrong?
You just have to know, that there is the webservice, which you can access via URL, that's all you need. If you want 2 different Applications to communicate with each other, then you will need something like this.
I see in your sample that a proxy should be created before consuming that web method...
Try this one: c-sharpcorner.com/UploadFile/1d42da/web-service-basics I think that is what you need

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.