NET代码未在服务器中运行

NET代码未在服务器中运行

本文介绍了ASP.NET代码未在服务器中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在asp.net中,如果我们在App_code下上传任何代码,则这些代码会自动包含在项目中.我们已经在dotnet/App_Code/BusinessLogic目录下上传了Utility.cs文件.之后,当我们创建该类的对象时,出现错误(http://www.find-villa.com/dotnet/index.aspx).我们无法理解为什么会收到此错误.我们已经使用VS2008进行开发.该代码在我的本地计算机上运行良好,但是当我们在服务器中上传时,出现了此问题.服务器配置是否有问题?
最好的问候,
Santanu

Hi,
In asp.net if we upload any code under App_code, the codes are automatically included in the project. We have uploaded Utility.cs file under dotnet/App_Code/BusinessLogic directory. After that when we create an object of that class, we got an error (http://www.find-villa.com/dotnet/index.aspx). We cannot understand why we get this error. We have used VS2008 for development. The code is running well in my local computer but when we upload in server, we got this problem. Is there any problem in server configuration?
Best Regards,
Santanu

推荐答案

<codeSubDirectories>
   <add directoryName="BusinessLogic"/>
</codeSubDirectories>



问候
Espen Harlinn



Regards
Espen Harlinn


<compilation debug="false">
    <codeSubDirectories>
        <!-- Only your cs files should go into Business folder -->
        <add directoryName="BusinessLogic" />
        <add directoryName="Some other directory for VB" />
    </codeSubDirectories>
</compilation>



最好的问候,

曼弗雷德(Manfred)



Best Regards,

Manfred



这篇关于ASP.NET代码未在服务器中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 18:29