Web Forms :: How To Document The HTTP POST Required To Log The User
May 13, 2010How can I document the HTTP POST required to log the user into my framework from outside page. I only need the HTTP POST required for this purpose.
View 9 RepliesHow can I document the HTTP POST required to log the user into my framework from outside page. I only need the HTTP POST required for this purpose.
View 9 RepliesThis is kind of cross-post; however, can a custom http handler be automated to run either using a timer or a filesystemwatcher to post an xml document to another server (with no human interaction)?
View 2 RepliesThere is a post request coming to my portal and I am fetching IP address from the post request on my portal landing page(INDEX view in MVC) and saving in DB table. below is the code to fetch IP address.
string Device_IP = "";
if (!string.IsNullOrEmpty(Request.ServerVariables["HTTP_VIA"]))
{
// ' using proxy
// ' Return real client IP.
[CODE] ...
It is fetching IP address on my side but on client side when request is made code is not working. same code working fine on other sites.
I'm trying to push data to a form in ASPX, but I dont want to the user to be taken to the post page.
I.e
When a user registers on the site I need to push some data to a form and submit the form without the user being redirected.
RedirectResult is doing a HTTP Get. I want a redirect that does a Http POST
View 2 RepliesWhat wrong with this code?
[Code]....
I would like the numeric values of the enum of Response.StatisCode
I have a remote website and it requires login id and password to enter and i want to enter into that website with httpwebrequest. How it is possible?
View 1 RepliesI need to offer a way for a client to send me XML (list of contacts). I'd like to do this using HTTP post. The page needs to capture that XML and place the data into my database (FirstName, LastName, Address...).
View 1 Replies I populate two dropdownlist in asp.net. Both are assigned to a required field validator.
The codebehind is as below
[Code]....
the designer code is as below
[Code]....
Now what happens is, when i choose a field from the dropdown and once again when i choose the "-- Select--", the validator appears and then disappears.Where am I going wrong?Why doesnt the validator stay?RegardsHema
I have a remote website form which sends variables to a page of my asp website. This is a standard form with http post. How do I access the url which sent the request to the page? Is this an environment variable? Http_referrer?
View 3 RepliesI need to simulate an HTTP POST programatically, i.e., I need to generate a Request with some POST variables and then send it to a page. To clarify, I need to simulate the behaviour of a regular POST, not do the whole thing programatically. So basically I need to fill in a Request in the same way it would be filled if a form POST was happening, and then send the browser to the page that expects the POST.
View 4 RepliesI need to POST to an external HTTPS url from my application. I am looking for a 'robust' way to do this, in code if possible.
I would just like to use error handling etc, rather than just blinding doing the normal post and hoping it works.
Can you do HTTPS POST from some page event using server side code?
Right off the bat, I hit a wall with the default test added by VS 2010. I forget the exact error now, but it was saying that the tests weren't executed... something about the server. Before I sounds too stupid, the "fix" was to remove the web attributes on the test, causing my tests to NOT need to run through the web server. At this point I have a number of simple, but relevant controller tests up and running.
QUESTION #1.Is it commonplace to run unit tests throught the web server. I have a hard time envisioning that taking place on the build server once I port this solution. It feels much quicker and cleaner to run them directly against the code.
QUESTION #2.I have a security helper class that simply checks to see if the authenticated user is a member of the required Active Directory group before allowing them to perform updates in the application.
I wanted to test it, but the helper uses the HttpContext.Current instance.Should I require this test to run through the web server, or should I change it to accept the context as an argument and mock that context for the unit test? I've installed MOQ, but haven't started the learning process with it yet.
Here is the helper class:
[Code]....
I have a page where in there are various entry fields like name, registration number, country, state etc whcih are mandatory. On selection of country in dropdown,the state dropdown is filled and in the phone number boxes the country code is also filled simultaneously.
When I click on Save button it shows the required fields respective messages in the validation summary. When I select the country the state and country code are filled and the validation summary vanishes though I have not entered text in the other mandatory fields. None of the required fields messages are displayed though all fields except Country state and country code are filled.
I populate two dropdownlist in asp.net. Both are assigned to a required field validator.
The codebehind is as below
if (!Page.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("emp");
dt.Columns.Add("ename");
[Code]....
Now what happens is when I choose a field, and then once again go and choose"-- Select--", the validator appears and disappears.
Why doesnt the validator stay? Where am I going wrong?
I am trying to add Canada Post shipping information to my website. Canada Post has this link to a sample site showing what to send. [URL] I have worked with Canada Post support and they have no sample code for C# or Visual Studio. Can some get me started on how to send the above information from a button click event?
View 1 Replieshave a web service that I'm trying to consume from a console app through http post. I receive a 500 exception error from the xmlstring parm being passed to the web service. Add the following to web.config of the web service. Although it is not working in debug in vs 2008 as well.
[Code]....
[Code]....
[Code]....
the host file is setup for the web service as well.
[Code]....
I have a web application. I am using C#. I have existing methods in my API for various things but all only submit and return bool/int/strings.
All of my API methods have the directive System.ServiceModel.OperationContract
All the parameters are of System.Runtime.Serialization.DataMember
I would like to be able to receive a posted file over HTTP. All I've been finding is people attempting to save a HttpPostedFile after submitting it in a form.
EDIT: this will be called from an iPhone application. Not via the browser on the iPhone Basically, I would like to do this: [URL]
I am working on a application which will accept the data in the post request.I will surely implement the data encryption to make sure that communication is secured. But my concern is, any body who knows the URL will be able to send the POST data request to my application, can I restrict the request from once specific IP address/URL.From a Request object can I find out which application/HOSTname/URL has sent this request. I looked at RefererURL but it can be populated and cannot be used. Is there any other field/properly which will tell me about the party who has sent this request.I want to make sure that I process request received from one specific URL/IP and want to ignore all others.
View 5 RepliesI want to do some processing on a attribute before returning the view. If I set the appModel.Markup returned in the HttpPost ActionResult method below to "modified" it still says "original" on the form. Why cant I modify my attribute in a HttpGet ActionResult method?
[HttpGet]
public ActionResult Index()
{
return View(new MyModel
{
Markup = "original"
});
}
[HttpPost]
public ActionResult Index(MyModel appModel)
{
return View(new MyModel
{
Markup = "modified"
});
}
I'm somewhere between a beginner and intermediate asp.net and c# user who is looking to receive a message/variable and then URL decode it. The message is being sent via HTTP post. I'm not sure exactly how to get started, and am looking for a tutorial but haven't been able to find one.
View 4 RepliesIs there a way to force a non-secure form post to be secure? I understand there are ways to automatically resolve an http URL as an https URL but with form posts, is this type of redirection too late? Will the posted data have already gone through the wire as plain text?
View 3 RepliesI am using an Zencoder API to transcode video files. Once the job is completed they will do a HTTP POST with XML or JSON data containing the Job ID and other info to the url we provide.
So if URL is www.abc.com/GetZencoderResponse.aspx or .ashx, how can I read the data they post?
excuse me for the underlines, i thought that would make my query stand out.
All I need is to send a http post request I pulled from fiddler.
I do not want to use HttpWebRequest class. It makes it hard to set up a request, does not allow to change host,
and when it does send it it looks nothing like the request I want. The server is very sensitive and unless I copy the request headers 100% it will return an empty page. Why can't I just type in the headers and send it that way? What would be 5 minutes of
work in php is taking the whole evening in asp.net.
This is what I am trying to send, simple as it gets: ...
I need to allow the outsite users to login to my CMS through HTTP Post method.
My question is:
How shall I respond to the received requests and what I will return?