locked
Technology : ASP.Net RRS feed

  • Question

  •  

    Hi guys plz look at here ....

     

     

     

    When I Put My Class1.VB file in :   ./ App_Code/Class1.VB

    I found error given below at the time of Hosting in IIS

    Server Error in '/' Application.


    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: BC30002: Type 'Class1' is not defined.

    Source Error:

     

     

    Line 5:  Partial Class HomePage

    Line 6:      Inherits System.Web.UI.Page

    Line 7:      Public obj As New Class1

    Line 8:      Public cn As New SqlConnection

    Line 9:      Public cmd As New SqlCommand


    Source File: c:\inetpub\wwwroot\14-4-08_safal\HomePage.aspx.vb    Line: 7


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

    Saturday, May 3, 2008 8:28 AM

Answers

  • This kinda error happens when your local IIS settings are not the same as your deploy-IIS settings. If you were running this under the built in ASP.NET Development Server in Visual Studio, well, it tends to be a lot more leniant.

     

    "I found error given below at the time of Hosting in IIS"

     

    I am assuming everything worked fine whilist you were developing in VS. So, the obvious solution would be that you didn't upload some files properly. Make sure to copy any .dll in your /bin folder.

     

    I used to get these weird errors with the "App_Code" folder when I deploy for some reason. The source files do not get compiled and I loose all references to them. I ended up solving it by just keeping the source files in a non-ASP.NETish directory. However, that might just be something specific to my problem.

     

    Another problem might be that you were selectively uploading changed files. Maybe you missed some file. For example, maybe you added the referenced assemblies to web.config in your local folders but didn't apply changes to your deploy folders.

     

    Saturday, May 10, 2008 5:58 PM