1

I would like to use some code written in python (it uses built in modules) in a regular ASP.NET/C# web application. I am a newbie in python and have heard of IronPython and how ASP.NET now allows us to create IronPython apps.

Any thoughts on which way I should proceed? The python code is the on here

DotnetDude
  • 11,617
  • 35
  • 100
  • 158

2 Answers2

3

Some links:

If the above approaches do not suit the problem, it is quite simple to embed the IronPython engine from C#. See http://www.voidspace.org.uk/ironpython/embedding.shtml .

Community
  • 1
  • 1
codeape
  • 97,830
  • 24
  • 159
  • 188
1

You can fill ASP.NET web forms from python or any other programming language. The format of this message should be simply Content-type: application/x-www-form-urlencoded - urlencoding to POST data is done by default by requests package, so you should not add additional urlencode yourself.

To be successful with ASP.NET web forms automation you should know that as always you have to handle cookies properly (using requests session will be enough), but also send back hidden input fields called __VIEWSTATE and __EVENTVALIDATION. You can can find additional information here and check example of working code here.

Omar Einea
  • 2,478
  • 7
  • 23
  • 35