公司叫我改一个网站页面,服务器上全部是编译后的文件,没有.cs文件了 ,公司给我的源程序不是最新的,本机根本编译通不过,我没办法整站发布后传上去
我的做法是把要改的页面修改后把aspx和cs文件一起传上去(本机测试是没有问题的)放到服务器后就报错Server Error in '/' Application.
--------------------------------------------------------------------------------Runtime Error 
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
< !-- Web.Config Configuration File -- >< configuration >
< system.web >
< customErrors mode="Off"/ >< /configuration >
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's < customErrors > configuration tag to point to a custom error page URL.
< !-- Web.Config Configuration File -- >< configuration >
< system.web >
< customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm" / >
< /system.web >
< / configuration >请问怎么解决

解决方案 »

  1.   

    你先把web.config按下面的修改一下,看具体是什么错误啊< customErrors mode="Off"/ > 
      

  2.   

    错误提示是说webconfig自定义错误与当前默认错误提示冲突你试着将webconfig 中的 customErrors改成off< configuration >
    < system.web >
    < customErrors mode="Off"/ >< /configuration >  如果你要改成on的话,请定义自己的错误提示页面< configuration >
    < system.web >
    < customErrors mode="RemoteOnly" defaultRedirect="你自己错误提示页面的完整路径和文件名" / >
    < /system.web >
    < / configuration >
      

  3.   

    问题已经解决 方法是服务器安装 Framework 2.0估计是1.1不支持文件编译后 修改某个文件只把修改的文件aspx和cs文件上传就会报错 具体提示什么信息忘了2.0支持这种做法,不过不提倡这样做,这也是在实在没有办法的情况下的解决方法