C# - Logging into this website? - c#

How can I make my C# app log in to a website that requires username/password authentication? The page uses Apache Struts, if it matters.

You need to send data to the web server to simulate a form submission.
There are a few questions that already address this:
Fake a form submission with C# WebClient
How to submit http form using C#
Hopefully now you have a more clear idea of what you are looking for.

Related

Web browser in C# windows application form without using web browser class

I am trying to do C# web browser(navigate, favorites, display, GUI, history, sending the HTTP request, receiving http the response, bulk download) without using web browser class but I can't find anything related to that could anyone please help me with this concept code. I created the design in the C# windows application form.
Downloading files can be done with the WebClient class, but if you want an actual browser and the webbrowser object isn't good enough then I recommend using something like CefSharp.

C# WinForms Application want to use asana API

I am trying to work with the asana API in my C# Windows Application and have several questions I'd like to ask.
When you register your application with asana, it wants to know APP NAME, APP URL, REDIRECT URL. If it's a windows application, what values might I supply for the second two prompts?
When that is entered, you get a client id and a client secret. Is this completely different than the apikey? Is the former for OAuth and the latter for asana, or does asana work in conjunction with OAuth?
Basically I want to take a request like this: https://app.asana.com/api/1.0/tasks//stories?opt_pretty and get back in my application the same json I see when I issue the request in my browser.
You can provide localhost
You should definitely have a look at https://asana.com/developers
Your answer is there https://community.asana.com/t/can-a-windows-application-be-registered/23381 !
Good luck ;)

Open another webpage, logging in through code Asp.Net MVC

I want to be able to login to an external domain webpage through code, and give the resultant page to user.
Tried using HttpWebRequest,
The user agent that makes the request must support JavaScript. The HttpWebRequest doesn’t support JavaScript.
Also found some suggestions about using WebBrowser Control, but that is for Forms apps.
Need some solution for ASP.NET MVC.

Using Google OAuthUtil in a desktop application

I am building a Desktop application that interacts with Google Contacts. I have been trying to authenticate the application using google supplied OAuthUtil, but cant get it to work...
it seems it is only suitable for webapplication because of the callback url you have to provide, I think that because the function OAuthUtil.GetUnauthorizedRequestToken returns void...
I'm not that familiar with C# or I'd try and write some example code. However, looking at their docs you have to open a web browser and detect whatever callback you sent. When you detect the callback you then redirect to the client program.
http://code.google.com/apis/accounts/docs/OAuthForInstalledApps.html
It seems they're working on being able to make a REST request to their servers so that you don't have to have a web browser. http://sites.google.com/site/oauthgoog/UXFedLogin/nobrowser/input-capable-devices
Even for things, without a web browser they're current suggestion is to provide a pin, which you then have the user register on a device with a web browser.
http://sites.google.com/site/oauthgoog/UXFedLogin/nobrowser

File Upload to HTTP server from iPhone application. Server side C# API method

Could someone please tell me/link me to how I could create a method similar to those posted below:
http://www.vimeo.com/api/docs/upload
http://www.flickr.com/services/api/upload.api.html
(I am providing the links as I'm not sure how to articulate this question without them!)
I'm using C# ASP.NET. IIS 6.
I have an existing web server with other public API methods. I do not want the iPhone user to have to open a web browser, and post to an aspx page. I want the iPhone developer to be able to call my method, and have one of the parameters be a handle to the file which gets POSTed.
Thanks in advance for any help.
You'll need to create a WCF Service Application. You can use this as a webservice that can be exposed to your clients. You can create a RESTful service using WCF where clients can POST video's to.
When searching for 'REST, API, WCF' you'll probably find all the resources you are looking for.

Categories