Newbie Question: ASP.net install?

Discussion in 'ASP.NET / ASP.NET Core' started by Chano, Oct 13, 2009.

  1. Was I suppose to install some thing to make my asp.net server complete?
    The reason I ask is that I am running into some errors with a few things I have been trying to do.

    I had an issue a week or so ago and Bruce said "Looks like you didn't properly install the membership database."..... I dont know what Im suppose to install and what comes with a stock discountasp.net server

    Anyways here is one of those errors below
    _________________________________________________________

    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: CS0246: The type or namespace name 'DirectoryInfo' could not be found (are you missing a using directive or an assembly reference?)

    Source Error:

    Line 22: protected void Page_Load(object sender, System.EventArgs e)
    Line 23: {
    Line 24: DirectoryInfo di = new DirectoryInfo(Server.MapPath("~/AutoIndex"));
    Line 25: foreach (FileInfo fi in di.GetFiles())
    Line 26: {


    Source File: e:\web\XXXXXXXXXXX\htdocs\AutoIndex\AutoIndex.aspx.cs Line: 24


    Show Detailed Compiler Output:

    C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Data.Linq\3.5.0.0__b77a5c561934e089\System.Data.Linq.dll" /R:"C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\658ae1cf\9df9d4d0\App_Web_l767xip1.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.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.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.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /out:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\658ae1cf\9df9d4d0\App_Web_6vg2684r.dll" /debug- /optimize+ /w:4 /nowarn:1659;1699;1701 /warnaserror- "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\658ae1cf\9df9d4d0\App_Web_6vg2684r.0.cs" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\658ae1cf\9df9d4d0\App_Web_6vg2684r.1.cs" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\658ae1cf\9df9d4d0\App_Web_6vg2684r.2.cs"


    Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.1
    for Microsoft (R) .NET Framework version 3.5
    Copyright (C) Microsoft Corporation. All rights reserved.

    e:\web\XXXXXXXXXX\htdocs\AutoIndex\AutoIndex.aspx.cs(24,9): error CS0246: The type or namespace name 'DirectoryInfo' could not be found (are you missing a using directive or an assembly reference?)
    e:\web\XXXXXXXXXXX\htdocs\AutoIndex\AutoIndex.aspx.cs(24,32): error CS0246: The type or namespace name 'DirectoryInfo' could not be found (are you missing a using directive or an assembly reference?)
    e:\web\XXXXXXXXXXXXXX\htdocs\AutoIndex\AutoIndex.aspx.cs(25,18): error CS0246: The type or namespace name 'FileInfo' could not be found (are you missing a using directive or an assembly reference?)
    ______________________________________________________
     
  2. You're either missing a "using" statement in your code behind or a Reference to System.IO, I believe, in your project.
     

Share This Page