把CodeBehind属性中的cs文件放到app_code中就行了,ashx不同aspx能放到非asp.net特殊目录下,ashx的后台cs文件需要放到app_code或者编译为dll放到bin目录中~