Python asp.net作为前端时如何创建flask web服务

Python asp.net作为前端时如何创建flask web服务,python,asp.net,web-services,flask,cmd,Python,Asp.net,Web Services,Flask,Cmd,我使用asp.net构建了一个web应用程序。并使用命令提示符process-System.Diagnostics.process创建了一个web服务。通常,我会从用户那里获取值,然后将其传递给服务器的cmd提示符,这将使用给定值作为python脚本参数来运行python脚本 由于它是通过cmd-System.Diagnostics.process运行的,因此初始化和运行脚本需要更多的时间 所以我决定使用Flask框架,我尝试了一些html文件,效果很好,但是使用asp.net作为前端。它没有按

我使用asp.net构建了一个web应用程序。并使用命令提示符process-
System.Diagnostics.process
创建了一个web服务。通常,我会从用户那里获取值,然后将其传递给服务器的cmd提示符,这将使用给定值作为python脚本参数来运行python脚本

由于它是通过cmd-
System.Diagnostics.process运行的,因此初始化和运行脚本需要更多的时间

所以我决定使用Flask框架,我尝试了一些html文件,效果很好,但是使用asp.net作为前端。它没有按预期工作

我的蟒蛇文字:

from flask import Flask, redirect, url_for, request, render_template
app = Flask(__name__)

@app.route('/success/<name>')
def success(name):
   return "<h1>'welcome %s' </h1>"% name

@app.route('/Login.aspx',methods = ['POST', 'GET'])
def login():
   if request.method == 'POST':
      user = request.form['nm']
      return redirect(url_for('success',name = user))
   else:
      user = request.args.get('nm')
      return redirect(url_for('success',name = user))
@app.route("/index/<name>")
def index(name):
   return render_template('hello.html',name=name)

@app.route('/hello/<int:score>')
def hello_name(score):
   return render_template('marks.html', marks = score)


if __name__ == '__main__':
   app.run(debug = True)
从flask导入flask、重定向、url、请求、呈现模板
app=烧瓶(名称)
@app.route(“/success/”)
def成功(姓名):
返回“'welcome%s'”%name
@app.route('/Login.aspx',methods=['POST','GET'])
def login():
如果request.method==“POST”:
用户=请求。表单['nm']
返回重定向(url_表示('success',name=user))
其他:
user=request.args.get('nm')
返回重定向(url_表示('success',name=user))
@应用程序路径(“/index/”)
def索引(名称):
返回呈现模板('hello.html',name=name)
@app.route(“/hello/”)
def hello_姓名(分数):
返回渲染模板('marks.html',marks=score)
如果uuuu name uuuuuu='\uuuuuuu main\uuuuuuu':
app.run(debug=True)
我还尝试在
app.run(debug=True,port=62500)中更改到visual studio端口。
我收到
OSError:[WinError 10013]试图以禁止的方式访问套接字
den的访问权限
请提供帮助

或建议我使用任何其他方式创建web服务,以便从asp.net网页在服务器中运行python脚本