我的网站出现运行时错误 [英] my website is giving runtime error

查看:76
本文介绍了我的网站出现运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生,
我在App_Code文件中添加了一个函数.现在我想将其上传到网络服务器上.
我想知道的是,在将其上传到Web服务器上之前,应该遵循任何流程(例如,编译或其他操作),或者只是将其上传到服务器上.
因为我编辑了App_code文件夹,然后在Web服务器上对其进行了覆盖.从那时起,我的网站出现运行时错误.

任何帮助将不胜感激.

谢谢
Abhishek

解决方案

像在App_code文件夹中简单添加代码这样的过程是什么?
无需特殊步骤.只需将类文件放在App_Code文件夹中.

第一次仅将类添加到根目录时,它应该要求您将其放置在App_Code文件夹中.如果不存在,它将创建一个.如果您没有遇到这种情况,请尝试手动创建文件夹,然后将类文件放在此处. (一旦创建了文件夹,它的颜色就会自动更改为其他颜色,然后变为常规的文件夹颜色.)

只是,如果我们存储任何类文件(如.cs或.vb),ASP.NET就会以特殊方式处理文件-编译器会自动编译它们.现在通过创建App_Code放置类文件将不会做任何事情,因为它是编译时的事情!本文对您来说是一本好书: ASP.NET网站项目中的共享代码文件夹 [^ ]

另外,请查看以下文章: ASP.NET应用程序文件夹入门指南 [ ^ ]


Dear sir,
I have added a single function in App_Code file.Now i want to upload it on webserver.
I want to know is that before uploading it on the web server is there any process which should follow(e.g. compilation or anything else) or simply upload on the server.
Becouse i edited App_code folder and simply overrite it on the web server.from then my website is giving runtime error.

Any help will be highly appreciated.

Thanks
Abhishek

解决方案

what is the procedure for that like simple add code in App_code folder
No special step needed. Just place the class file in the App_Code folder.

When you add just a class to the root for the first time, it should ask you to place it in App_Code folder. If it does not exists, it creates one. In case this has not happened with you then, try creating the folder manually and place the class file there. (Once you create the folder, it''s color would automatically change to some other color then a general folder color.)

It''s just that, if we store any class files (like .cs or .vb), ASP.NET handles files in special ways - compiler compiles them automatically. Putting class file now by creating App_Code will not do anything as its a compile time thing! This article would be a good read for you: Shared Code Folders in ASP.NET Web Site Projects [^]

Also, have a look at this article: Beginner''s Guide to ASP.NET Application Folder[^]


这篇关于我的网站出现运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆