webservise asp.net mvc2 response - asp.net-mvc-2

I've been racking my brain for a couple of days now on how to approach a new requirement.
I have two websites. The first one lets the user fill out an application. The second website is an internal website use to manage the users applications. I need to develop a "web service" that sends the application data from website 1 to website 2. I have never done a web service before and I'm a bit confused on where to start. I've been reading various examples online but they all seem to be just a starting point for building a webservice... no specific examples.
So for posting the data website 1, what would my controller method look like? What would and example of that look like? Is there some form of redirect in the method that points to website 2?
Thanks ahead of time for your assistance. :)

Related

Azure Communication Services Web Calling in MVC

All of the examples for ACS are using Nodejs and VS Code... and thats fine if you're building a new app, and if you have some kind of background with React. I do not... and I'm willing to bet most web devs maintaining and builing MVC apps don't.
I'm not so daft that I can't get a Nodejs app working, I can get the web calling hero sample to run without any issues...
However, I think for MVC we probably should be looking at this solution
https://github.com/Azure/communication-ui-library/tree/main/samples/StaticHtmlComposites
and I can't get it going... Not only that... but even if I did get it running how would one implement into an existing MVC app...
Has anyone successfully implemented ACS web calling/video into an existing MVC app, and how did you do it? ...the internet is currently a barren wasteland when it comes to this topic.
ANSWER as of 7/7/2021
Step 1: Follow all of the steps from here
https://github.com/Azure/communication-ui-library/tree/main/samples/StaticHtmlComposites
Step 2: Take the newly created/bundled callComposite.js file and add it to your existing or new MVC web project. I added mine to wwwroot/js...
Step 3: Create a view (however you choose to do that...) and copy the html and javascript from the index page in the project I linked to above. (if you don't care about chat you can remove all the related js). You'll need to replace the callComposite.js script link with the newly added one.
Step 4: You need a controller that will generate the token and userId.
I created a web api controller so that a new token and userId was generated essentially when the page was loaded. NOTE: make sure you're using async javascript OR just put the callAdapter code block in a timeout (mine is 2 seconds with a loading screen) Secondary Note: I got all of the code from the Web Calling Hero Sample out of the calling/controllers/UserTokenController.cs
Final step: say a small prayer, cross your fingers, grab a rabbits foot and rub it. then run it and it could/might/probably/possibly work the first time... but probably not. you'll need to adjust for your own set up.
For you future people. Please post an updated solution. This is literally the only resource for Azure Communication Services Web Calling on MVC on the internet (as of the time of this posting). Be a hero, tell us a better, easier way.

How to Send data to iPhone/Android from C# Web Service

I am trying to develop a cross platform app that uses a C# WCF web service. I have searched the web extensively but can't find anyone who has asked this question or posted a "how to" for this type of work flow.
For purposes of the question, let's focus on iPhone <--> Web Service interactions.
My app needs to do the following workflow:
iPhone#1 sends data to web service.
Web service pulls data from iPhone#2.
Web service does some calculations based on data from iPhone#1 and iPhone#2.
Web service sends results to iPhone#1 and iPhone#2.
iPhone#1 and iPhone#2 display results to users.
Steps 1, 3, and 5 are easy but how can I perform #2 and #4 above (requesting data from phone and sending data to phone)?
I don't necessarily need code samples, just a push in the right direction. Any help is much appreciated.
Thanks,
JVC
I was able to figure this out a while back and figured I would mention the solution in case anyone else runs across this.
In the most general sense, situations like this require the use of push notifications since they can be used to display a push notification on the device, or to send data packages to the phone for use in the app.
I ended up using Google's Cloud Messaging Service. It was very easy to implement and works like a champ.
Here is a link to the site with all of the proper documentation and guides: https://developers.google.com/cloud-messaging/

Connect existing Drupal page with PhoneGap iOS App

Case:
I have an existing page based on Drupal and going to develop a phoneGap iOS App. That means I just need the information of the existing page and want to fill these data in the new app.
My Question is now, do somebody know weather there is a work around or work flow to do so resp. how can I connect the existing page with another page or in my case phoneGap to get just the data? I'm new with Drupal and phoneGap so maybe you have some pages with information, tutorials or some help how to do this.
Thanks in advance yves
Drupal offers a module called "Services" which will allow you to get data or services from your website. You may need to create your own methods on that module to get the information you want to retrieve.
As for the iOS side, you can retrieve the data via XML-RPC, Rest or whatever communication protocol you choose at the server side, or go all the way with drupal-ios.
https://github.com/workhabitinc/drupal-ios-sdk/
You should start looking for the Services module and play with it. You will have an embedded console on that module to test the methods.
Once you're finish with that, take a look at drupal-ios or go deep with your own implementation via XML-RPC or whatever.

Webform to MVC Migration

I have a customer who runs an event ticket sales site. The site uses several APIs that interface with ticket sales companies. Users view ticket/seat availability for a specific event in the form of a Google Map that plots seat availaiblity on the venue image for the event.
The site was written using ASP.NET 3.5 and deployed to the customer's server without source code. Some changes were made by a previous developer by de-compiliing the existing DLL and making subsequent changes. Thus, the original source code is not usable and not available.
My customer is interested in URL routing as an enhancment and use of "friendly" URLs instead of the long query string for each event.
What are some good benefits of using ASP.NET MVC2 for the redevelopment of the site? Besides URL Routing, what other improvements can we site in a non-technical way?
Thanks much for your help!!
http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx
Key Point In My Opinion:
It will enable you to easily maintain separation of concerns in your applications, as well as facilitate clean testing and TDD.
Hi you can read all in this article http://weblogs.asp.net/shijuvarghese/archive/2008/07/09/asp-net-mvc-vs-asp-net-web-form.aspx

VB app to web service

I know very little about web service but I assumed it would be the solution I was looking for. Basically I made an application in VB that I want to be ubiquitous for a lack of a better word. I need it to receive requests from multiple users and respond all at once. I was told "technically if you write a webservice you can provide as many results back to users as are connected."
Maybe there is another solution for me that will give me the results I want.
Here is an example of what I'm trying to do.
Lets say I make an application in VB that does math.
I now make a website. My website allows for a person to input 1 + 1
they click submit and my website then connects to my VB application running on my server
listening for a request. It accepts the request from my website, and then it solves the math problem and returns the answer back to the website "1 + 1 = 2"
That is only an example of the type of thing I need. My problem is that I can't have multiple people visiting my website all connecting to that same application running on my server so somehow I need the application to be where it can be accessed by multiple users. I was told a web service would be the answer but if there is another solution I'd like to know.
If the only solution is a web service, then how can I manage to either convert the VB app to a web service? Can I have to convert the app to asp.net or some other language? Is there an easier option?
Without knowing more about what you're actually doing, I might suggest that building an ASP.NET project around your existing VB code might be a good approach. It's going to be awkward to build any kind of "web service" around an existing (presumably GUI) application, so rebuilding your code inside ASP.NET would be the way to go.
How about doing it the push notification way.
http://channel9.msdn.com/posts/Windows-Phone-7-Push-Notification-QuickApp--Web-Service-With-Azure-Publishing-Instructions
You can inform users of your application via a push notification