• 0

Perfer method to allow external sites to access info


Question

I am in the process of creating an app that will allow external sites some access to our app.   Think process similar to a Twitter feed where Your site can have a small piece of data that is live from our site.

 

I have been working on a C# Web Service, but I am having issues with getting access to that info with JavaScript so I thought I would ask this question to see if there is a better path/pattern.

 

Thanks kindly

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Have you tried looking at Microsofts WebAPI solution, very similar set-up to MVC, it returns json by default which neatly ties up into javascript endpoints (& converts back into nicely structured objects if you so wish at the C# end).

Link to comment
Share on other sites

  • 0

Thanks for the info everyone.  I have been trying some things, without success (but that's a different horror story)  I thought it would be valuable to ask this generic to see if there was another pattern that I didn't know.

 

Thanks again and have a fun day

Link to comment
Share on other sites

  • 0

Have you tried looking at Microsofts WebAPI solution, very similar set-up to MVC, it returns json by default which neatly ties up into javascript endpoints (& converts back into nicely structured objects if you so wish at the C# end).

 

That was why I suggested JSON... It's supported in the base class library both under Win32 and WinRT :)

Link to comment
Share on other sites

  • 0

That was why I suggested JSON... It's supported in the base class library both under Win32 and WinRT :)

 

The problen with WebAPI is that it seems to be .NET 4.5, and my site provider only has 4.0.   I'm looking into a JSON proxy solution.

 

Funny thing is, what I need to do is very simple; pass in a string and get back a url.  Who'd think something so simple would be so difficult?

Link to comment
Share on other sites

  • 0

You could always use JSON .NET... It's open-source so you should be able to compile it for almost any version. It's also relatively simple to write parsers for it since it only has a two structures and a few data types.

Link to comment
Share on other sites

  • 0

The problen with WebAPI is that it seems to be .NET 4.5, and my site provider only has 4.0.   I'm looking into a JSON proxy solution.

 

Funny thing is, what I need to do is very simple; pass in a string and get back a url.  Who'd think something so simple would be so difficult?

 

I'm using it on a server that only has .Net4.0 & it's by far the most simple solution for passing our back-end data to our AngularJS front-end (& vice versa).

Link to comment
Share on other sites

  • 0

You could always use JSON .NET... It's open-source so you should be able to compile it for almost any version. It's also relatively simple to write parsers for it since it only has a two structures and a few data types.

 

Thanks for the info

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.