分享

写回答

发帖

[提问] GD 上传图片的问题

GoDaddy GoDaddy 1080 人阅读 | 2 人回复

发表于 2011-2-10 11:36:50 | 显示全部楼层 |阅读模式

C#中的CS代码如下
String destFilePath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "upload";

在本机上测试,上传图片成功,但是放至GD上,就不能上传图片,提示500错误,请教下该怎么修改?

回答|共 2 个

qqoyeah.org

发表于 2011-2-10 12:41:21 | 显示全部楼层

500错误应该是你的web.config的配置问题吧。

lovesytu

发表于 2011-2-13 14:17:09 | 显示全部楼层

不好意思我描述错误,不是报500的,是报如下:
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 <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</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>

请高手指教下
RAKSmart
您需要登录后才可以回帖 登录 | 注册

本版积分规则