parse specific website data and store them in db table - asp.net

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

Related

How do I auto sign in to Laravel via an API coming from .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);

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.

Login to asp.net site from another app, then receive filestream

I have an ASP.NET application with pages that use reportviewer. Can someone give me a hint on how to approach the following requirement:
I want to get the report as PDF file from the page, without user interaction. I know I can render the report to a filestream, but since there's no user opening it in a browser, I need to collect the filestream from another application that might run during the night.
There might be other approaches, like a webservice for example that could return the filestream to me, but this would also mean, I have to modify the setup of the datasources that the report receives it's data from. There are a lot of controls on the page, for supplying filter parameters. By using the page life cycle I can use what's already there.
I thought about wget, but haven't tried it yet, and I'm not sure how complicated logging in will be with cookies. I do have full control over the asp.net application though, so if I can modify something there to make it easier, I'd do it.
You can use the "WebClient" in .net application to get the response from the site.
Please refer the below link:
http://msdn.microsoft.com/en-us/library/system.net.webclient(v=vs.80).aspx

Create Google compliant dynamic XML sitemap

I want to create a dynamic (fetching data from the database) XML sitemap which I can submit to Google webmaster tools.
Surprisingly, I couldn't find any recent controls/code online to do this. The most recent code I found was this http://weblogs.asp.net/bleroy/archive/2005/12/02/432188.aspx which is for ASP.Net 2.0. I don't mind using this, but I suspect it's outdated.
Can somebody please point me in the direction of code which accomplishes this?
A couple of options include:
The ASP.Net SiteMap infrastructure. It allows you to write a custom sitemap provider like this one, which uses Micosoft Access, to generate a sitemap.
You can also find a very simple sitemap generator project on this site.
Another option (and fun learning experience) is to write your own by just looking at the sitemap protocol, and using Linq To SQL along with Linq To Xml to generate the format. Here is an example uses Linq To SQL and Linq To XML to generate XML.
Finally, Google also accepts RSS/Atom feeds, so you could generate one of those instead. If you go this route then you can make use of the SyndicationFeed class. There are also a couple open source options available.
Actually i just done it recently using LinqToXMl
How to generate xsi:schemalocation attribute correctly when generating a dynamic sitemap.xml with LINQ to XML?
Actually the string that is returned by that code is written directly to the Response object. I use a .ashx HttpHandler to deliver the content as XML and using Routing to serve it under the name of sitemap.xml. Also you should put it on your robots.txt file

I want to make a asp.net website in blogger..is it possible.what are the alternate ways?

I have been thinking of creating a website with asp.net.
Is it possible to develop asp.net sites in blogger? Wat i have seen is write something in plaintext or html and it wil be posted...but i want to write asp.net code using sql server in bloggger.
thx
There are a number of blog engines for asp.net. http://www.dotnetblogengine.net/ is one that I've heard is easy to use.
You can't write an asp.net application in blogger because blogger is a free service offered by Google, hosted on their own servers.
I'd assume you're referring to the way of inputting text. If that's the case, check out Textile.NET. This will simplify textual input and allow you to store values in the database which don't include any html.

Resources