ASP在IIS 7蟒蛇是给HTTP / 1.1 500服务器错误 [英] Asp in python in IIS 7 is giving HTTP/1.1 500 Server Error

查看:176
本文介绍了ASP在IIS 7蟒蛇是给HTTP / 1.1 500服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Windows 7和IIS 7不是管理员,但作为用户。我已经安装了ASP模块和CGI模块IIS 7应用开发功能。我简单的传统的ASP页面被工作是:

I am using Windows 7 and IIS 7 not as administrator but as a user. I have installed asp module and cgi module in IIS 7 in application development feature. My simple classic asp page is working which is :

<%response.write("Hello World")%>

我在Python CGI是工作是:

My cgi in python is working which is :

print "Content-Type: text/plain;charset=utf-8"
print "Hello World!"

但是,当我使用ASP页面内Python脚本它显示HTTP / 1.1 500服务器错误
在code我用的是:

But when I am using python script inside asp page it is showing HTTP/1.1 500 server error The code I am using is :

<%@Language=Python%>

<%
x="Hello"
response.write(x)
%>

我已搜查了净4天,但没有得到任何运气。
我启用了匿名身份验证,在验证,未注册和注册ASP的pyscript.py,与IUSR提供蟒蛇,并给IUSR完全控制,启用启用32位应用程序为True剪掉的工作。

I have searched the net for 4 days but didnt get any luck. I enabled "Anonymous Authentication" in Authentication ,Unregistered and registered the pyscript.py for ASP, Provided python with IUSR and gave IUSR full control,Enabled "Enable-32 Bit Application" to True didnt worked.

推荐答案

我终于找到了解决的办法。

Finally I found the solution to it.

要执行的步骤


  1. 注册的Python与ASP:

  1. Register Python with ASP:


  • 开启命令提示符

  • {python_installation_dir} \\ LIB \\站点包\\ win32comext \\ axscript \\客户端

  • 运行蟒蛇pyscript.py

  • Open Command Prompt
  • Go to {python_installation_dir}\Lib\site-packages\win32comext\axscript\client
  • Run python pyscript.py

启用IIS7 32位应用程序

Enable 32-bit application for IIS7


  • 转到 IIS7

  • 右键点击您的网站的应用程序池

  • 选择高级设置

  • 常规,将启用32位应用程序

  • Go to IIS7
  • Right click on your site's application pool
  • Select Advanced Settings
  • Under General, set Enable 32-Bit Application to True

添加 IIS_IUSRS IUSR 用户以您的虚拟目录:

Add IIS_IUSRS, IUSR or USERS to your virtual directory:


  • 右键点击目录

  • 点击修改权限

  • 选择安全标签。

  • 给予该帐户至少读权限。

这篇关于ASP在IIS 7蟒蛇是给HTTP / 1.1 500服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆