How do I auto sign in to Laravel via an API coming from .net? - asp.net

We have a portal built in asp.net and we need one of the sections to be an embedded frame containing a webapp built in Laravel, however the Laravel webapp has a login and we dont want users having to login twice. So how do I set this up? I understand I need to use this method :
https://laravel.com/docs/5.4/authentication#authenticating-users
The request would be coming from .net and I would parse say the JSON response, but how do I setup laravel to consume that API call? I have never done anything like this before and I dont know where to start. Can someone explain or give me a series of steps? Thank you!

if you have the user id as $id, you can use:
Auth::loginUsingId($id);

Related

How to build a simple HTML Form that sends email on Firebase?

I'm new to Firebase. I just want to build a simple HTML form on Firebase that sends email to me as well as to the user who fills up the form upon submit button click. I do not need any user authentication or database. After that I want this HTML form to be able to embed on my Blogger website, probably using iFrame. So how can I go about doing this?
Based on my understanding, for a HTML form to send email requires server-side coding like ASP.NET and PHP, may I know which language should I use on Firebase? Does Firebase provide such SDK that I can simply write in JavaScript and create a .js file for my form handler?
I already know how to deploy HTML files to my Firebase project using Node.js and get the URL of every file that I deployed, e.g. images, css files etc. Any help would be greatly appreciated, thank you.
With Third Parties (by now)...
After many hours researching about this, the solution seems not to be inside Google at the moment, but using a third party: SendGrid.
Tyson Bailey created a small example and explains this methodology in this blog post.

How to display a web service (SOAP) JSON result in a Drupal View

I'm a Drupal beginner, and I would like to display a web service (SOAP) result (in JSON) in a page.
I would like to display the result in a table (so I think Drupal View would be nice to display it...), but I don't know how to bring the Web Service result to display it into a View.
I am using the module "wsclient" (http://drupal.org/project/wsclient) together with "Rules" to execute a web service method, and I am able to get its result into a message, but that's all I was able to do until now.
I'm new to Drupal. Can someone help me please, to perform this action in the best way?
I am using Drupal 7.
Thank you!
There's a feature request in the wsclient issue queue for views integration: http://drupal.org/node/1215570
EDIT: as pointed out in the comments below, the following does not apply to the original question:
Have you considered using the Services module instead? There is already views integration for it.

parse specific website data and store them in db table

i want to parse a table row(with current name eg.test) from site that requires user/pass and store this in a database table.
Is this possible to be done in asp.net (or asp.net mvc4)?
*i have the username/password
*the site login form is : http://exat.ru/toursearch/
Thanks ,
I think you are talking about web scraping, and ASP.net might not be the best fit for what you are trying. There are a number of web scraping frameworks out there, e.g.
http://scrapy.org/ for python
or
http://spyderwebtech.wordpress.com/2008/08/07/scraping-websites-with-curl/ using CURL
You can have a look at the 'HttpWebRequest' which can get the site data for you. Although you may have to parse it using a custom solution

Crawler for Deep-Web calling ASP.NET page

Introduction
I'm developing a web-crawler and I need get the return of ASP.NET forms.
I know about the difficult to try that, but my crawler can get the return of PHP forms or languages like that. I'm using HtmlAgilityPack and call with POST parameters. That works fine.
Problem
My problem starts when I need crawler ASP.NET Forms, with a lot of hiddens fields and other the information (like __VIEWSTATE or __EVENTARGUMENT) for ASP.NET Kernel.
Question
How Can I put for my crawler send a POST call and receive the correct return with the data base filters? Somebody have information about that? Somebody tried something like that?
Thank's everybody.
I'm waiting for a good response.

Legitamate cross site communication

I am building a website, within a large intranet, that wraps and adds functionality to another site within the same intranet. I do not have access to the other site's source and they do not provide any api's for the functionality they provide. I need to, somehow, have my server-side code go to that site, fill in some forms, then press a submit button.
Is this possible? If so, how can I accomplish this?
Note: I am working in asp.NET if that matters at all.
Not the most efficient, but maybe WatiN can get you started:
http://watin.sourceforge.net/
Just look at the URL the form is supposed to submit to and the method it employs (POST or GET) and then send a request to that URL using the same method and put the field you want as parameters
Your server-side code is basically a web client to the other web site. You will need to write the code to send the HTML form data to the other web site and process the response. I would start with the System.Net.WebClient class. Take a look at System.Net.WebClient.UploadValues. That class/method will enable you to POST the form data to the web site via a NameValueCollection.

Resources