Sign in to follow this  
Followers 0
James Rose

Perfer method to allow external sites to access info

10 posts in this topic

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

Share this post


Link to post
Share on other sites

JSON, maybe? There are reader/writer classes available for almost any language.

3 people like this

Share this post


Link to post
Share on other sites

Indeed json is good else you can always go with xml though json is way more lightweight.

1 person likes this

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.