Can't find namespace from App_Code, compiling problem?

Discussion in 'ASP.NET 2.0' started by bcsmith, Apr 24, 2008.

  1. I am a newbie to installing applications on the Internet. This is my first time. I have my application in VWD expression 2005 and I used Copy Web to install it on the server. [After enabling the frontpage extensions]. I then Attached the .MDF files to the SQL Server 2005 database.

    I also installed each directory as a web application on the discountasp.net control panel. I don't know what this means, but it sounded right.

    Having done all of this I then tried to use the application (www.briansmith.info/Login.aspx) and got an error about a class in my App_Code directory can not be found. I thought that the first time I used the IIS web server the App_Code would be compiled and be available in the bin directory automatically. Do I have to do something special to access the App_Code code?

    Here is the error I am getting:

    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: CS0234: The type or namespace name 'Equipment' does not exist in the namespace 'PredominantUse.BLL' (are you missing an assembly reference?)

    Source Error:

    Line 188:
    Line 189: //Get the equipment object
    Line 190: PredominantUse.BLL.Equipment equip = PredominantUse.BLL.Equipment.GetEquipmentByID(equipmentId);
    Line 191:
    Line 192: String userFrom = 'PredominantUse';


    Source File: e:\web\briansmithi\htdocs\App_Code\PredominantMail.cs Line: 190


    Compiler Warning Messages:
    Warning: CS1668: Invalid search path 'C:\Program Files\SQLXML 3.0\bin\' specified in 'LIB environment variable' -- 'Access is denied. '
    Source Error:

    [No relevant source lines]


    Warning: CS1668: Invalid search path 'C:\Program Files\SQLXML 4.0\bin\' specified in 'LIB environment variable' -- 'Access is denied. '
    Source Error:

    [No relevant source lines]



    Show Detailed Compiler Output:

    c:\windows\system32\inetsrv> 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe' /t:library /utf8output /R:'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll' /R:'C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll' /R:'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll' /R:'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll' /R:'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll' /R:'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll' /out:'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cd1eef7b\9c3d7f2\App_Code.jpuiqfwb.dll' /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cd1eef7b\9c3d7f2\App_Code.jpuiqfwb.0.cs' 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cd1eef7b\9c3d7f2\App_Code.jpuiqfwb.1.cs' 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cd1eef7b\9c3d7f2\App_Code.jpuiqfwb.2.cs' 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cd1eef7b\9c3d7f2\App_Code.jpuiqfwb.3.cs' 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cd1eef7b\9c3d7f2\App_Code.jpuiqfwb.4.cs' 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cd1eef7b\9c3d7f2\App_Code.jpuiqfwb.5.cs' 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cd1eef7b\9c3d7f2\App_Code.jpuiqfwb.6.cs'


    Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.1433
    for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
    Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

    warning CS1668: Invalid search path 'C:\Program Files\SQLXML 3.0\bin\' specified in 'LIB environment variable' -- 'Access is denied. '
    warning CS1668: Invalid search path 'C:\Program Files\SQLXML 4.0\bin\' specified in 'LIB environment variable' -- 'Access is denied. '
    e:\web\briansmithi\htdocs\App_Code\PredominantMail.cs(190,36): error CS0234: The type or namespace name 'Equipment' does not exist in the namespace 'PredominantUse.BLL' (are you missing an assembly reference?)
    e:\web\briansmithi\htdocs\App_Code\PredominantMail.cs(190,73): error CS0234: The type or namespace name 'Equipment' does not exist in the namespace 'PredominantUse.BLL' (are you missing an assembly reference?)
    e:\web\briansmithi\htdocs\App_Code\PredominantMail.cs(255,36): error CS0234: The type or namespace name 'TaskAssignment' does not exist in the namespace 'PredominantUse.BLL' (are you missing an assembly reference?)
    e:\web\briansmithi\htdocs\App_Code\PredominantMail.cs(255,77): error CS0234: The type or namespace name 'TaskAssignment' does not exist in the namespace 'PredominantUse.BLL' (are you missing an assembly reference?)
     
  2. I am still working on this problem...I have figured out that this wants me to put a reference into the DLL, which I don't know how to do on the IIS machines
    (Locally I know how to do).

    However I have another problem. I figured that I needed to create my application under the '/puse' instead of the '/'. So I have created a web application and re-installed everything.....but now I am getting the following error:

    HTTP Error 403.1 - Forbidden: Execute access is denied.
    Internet Information Services (IIS)

    Which I have read up on and it is saying that IIS needs execute permissions to the directory...which is what I thought setting up the application as a web application did ?//// Any clues on this one would be helpful.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    are you using FrontPage extension to upload? this is a known bug w/ FP. Contact support to have execute permission reconfigured.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. Yes. I will contact support thanks.
     
  5. Thanks a lot. I contacted support and first level did not know what I was talking about. When they kicked it to second level support it was resolved in minutes as second level knew exactly what you were talking about....had you not told me about this I would still be trying to convince first level support that this was a problem. Thanks you very much.
     
  6. Bruce

    Bruce DiscountASP.NET Staff

Share This Page