Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have deployed a Python in IIS, Application working fine in my local machine.

I am able to retrieve project_id value from below request.form in local machine code but in IIS its not working.
request.form['projectdetails[project_id]'] I am passing values through Json.
When code execute above code in IIS I'm facing exception:- 400 Bad Request: The browser (or proxy) sent a request that this server could not understand. Again, same code is working in my local machine.
I have implemented token based authentication.

What I have tried:

I tried to log str(request.__dir__()) & str(request.__dict__) and compare with my local machine log but its similar and it doesn't display form values in logs for both.
request_form_dict = request.form
for key in request_form_dict:
            logging_config.LogException("create project key logs",str(request_form_dict[key]))

above line also throws exception 
400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
Posted
Updated 6-Aug-23 23:00pm
v2
Comments
Richard Deeming 7-Aug-23 4:56am    
You need to debug the communication between the client and the server to see why the client is sending invalid date in the request.

We can't do that for you.
RAHUL(10217975) 7-Aug-23 5:51am    
I checked in the console.logs, json data has expected values, and it was calling proper request method as well unfornately request.form is empty.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900