asp.net 上传显示不正常(100分)

R

rc-l

Unregistered / Unconfirmed
GUEST, unregistred user!
本人用webtrix作了一个网站,在本地调试正常,上传后连接数据库时不正常,何故?
提示如下:
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>

 
.net我也刚学,你自已去.net专题网找找看看吧
 
大哥,请允许我借宝地一用,谁能帮我看看这段asp.net上传错在哪啦?
我用的是控件htmlinputfile
Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ServerClick
File1.PostedFile.SaveAs("c:/a.jpg")
End Sub
 

我的错误跟你的一样
至今没有解决
我写了个留言板,上传后错误百出,都没有信心了
 
不会吧,同志们,大哥大们,不会是人情冷暖把,多多帮忙呀,
若真是这样的话,请大家告诉我,有更好的asp.net论坛吗,不要伤我的心呀,我可是听朋友介绍来的呀
 
public void UploadFile(object sender, EventArgs E)
{
if(myFile.PostedFile != null)
{
string fullname = myFile.PostedFile.FileName;
int i = fullname.LastIndexOf("//");
string filename = fullname.Substring(i);

//myFile.PostedFile.SaveAs("c://upload//" + filename);
myFile.PostedFile.SaveAs(Server.MapPath("/upload/" + filename));
}
}
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
854
import
I
I
回复
0
查看
2K
import
I
I
回复
0
查看
2K
import
I
顶部