asp.netページでサーバーに画像をアップロードしています。コードは次のとおりです..
コード:
protected void Button2_Click1(object sender, EventArgs e)
{
//resimyolu = "~/r/" + FileUpload1.FileName;
FileUpload1.SaveAs(Server.MapPath("~/r/a.png"));
FileUpload1.SaveAs("d:/upresim/a.png");
Image1.ImageUrl = "~/r/a.png";
}
「r」フォルダーはプロジェクトの画像フォルダーです。実行時に「r」フォルダーに画像を追加すると、ローカル IIS で正常に動作しますが、プロジェクトを公開してサーバー (リモート サーバー) でホストするとWeb ページはブラウザーで開いていますが、button2 をクリックしてクライアント イメージ (クライアント ユーザーが自分のコンピューターから選択したもの) をプロジェクトに追加すると、以下のようなエラーが表示されます。
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".