| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 597 人关注过本帖
标题:到底怎么回事啊?急啊
取消只看楼主 加入收藏
lietou
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-4-30
收藏
 问题点数:0 回复次数:0 
到底怎么回事啊?急啊

在往数据库中上传图片时出现这种情况,到底咋办啊

Server Error in '/WebApplication3' Application.

将截断字符串或二进制数据。
语句已终止。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 将截断字符串或二进制数据。
语句已终止。

Source Error:

Line 84: 			myCommand.Parameters["@imgdata"].Value = FileData;
Line 85: 
Line 86: 			int iout = myCommand.ExecuteNonQuery();
Line 87: 
Line 88: 			conn.Close();

Source File: c:\inetpub\wwwroot\webapplication3\webform3.aspx.cs Line: 86

Stack Trace:
在往wwwroot里上传图片和创建文件时时又出现这种情况,哎,各位高手多多赐教,小弟不胜感激不禁啊

Server Error in '/newsPublish' Application.

Access to the path 'C:\Inetpub\wwwroot\newsPublish\pic\Snap1.gif' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\Inetpub\wwwroot\newsPublish\pic\Snap1.gif' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

Line 102:					string fileName=filePath.Substring(filePath.LastIndexOf(@"\") + 1);
Line 103:					string savePath=Server.MapPath("./pic").ToString() + "/" + fileName;
Line 104:					this.filePicture.PostedFile.SaveAs(savePath);
Line 105:
Line 106:					strIns="insert into news(title,content,auth,img,typeID) values('" + this.txtTitle.Text + "','" + this.txtContent.Text

Source File: c:\inetpub\wwwroot\newspublish\addnews.aspx.cs Line: 104

搜索更多相关主题的帖子: exception 数据库 execution occurred request 
2006-05-30 18:39
快速回复:到底怎么回事啊?急啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018983 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved