Results 1 to 2 of 2

Thread: Error when I am hosting my ASP.NET sites

  1. #1
    Bress1969 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.0
    Join Date
    May 2015
    Posts
    2
    Reputation
    0

    Error when I am hosting my ASP.NET sites

    My ASP.NET site coded in C# is running fine on my local system but when I uploaded the files on the httpdocs folder through plesk control panel. I have a shared accounts at HostForLIFE.eu and I got the following error:

    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 'mydomain' could not be found (are you missing a using directive or an assembly reference?)

    Source Error:


    Line 1: <%@ Application Language="C#" %>
    Line 2: <%@ Import Namespace="mydomain" %>
    Line 3: <%@ Import Namespace="System.Web.Optimization" %>
    Line 4: <%@ Import Namespace="System.Web.Routing" %>

    Source File: g:\PleskVhosts\mydomain.com\httpdocs\mydomain\Glob al.asax Line: 2

    Show Detailed Compiler Output:


    C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc .exe" /t:library /utf8output /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core .dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System .Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll " /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.WebPages.Deployment\v4.0_2.0.0.0__31bf3856a d364e35\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Micr osoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Micros oft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\Sys tem.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System .EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a \System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\m scorlib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\S ystem.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35 \System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.D rawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\Sys tem.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35 \System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\ System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Activities\v4.0_4.0.0.0__31bf3856ad364e35\Syste m.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.d ll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856a d364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Runtime.Serialization\v4.0_4.0.0.0__b77a5c56193 4e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System .Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.d ll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\Sy stem.IdentityModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c5619 34e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856a d364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System. Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\Sy stem.Configuration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31 bf3856ad364e35\System.ComponentModel.DataAnnotatio ns.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856a d364e35\System.ServiceModel.Activities.dll" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319 \Temporary ASP.NET Files\root\ba70df64\8ad7fdd9\App_global.asax.8gpjf mvi.dll" /debug- /optimize+ /w:4 /nowarn:1659;1699;1701;612;618 /warnaserror- "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Tem porary ASP.NET Files\root\ba70df64\8ad7fdd9\App_global.asax.8gpjf mvi.0.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Tem porary ASP.NET Files\root\ba70df64\8ad7fdd9\App_global.asax.8gpjf mvi.1.cs"


    Microsoft (R) Visual C# Compiler version 4.0.30319.17929

    for Microsoft (R) .NET Framework 4.5
    Copyright (C) Microsoft Corporation. All rights reserved.

    g:\PleskVhosts\mydomain.com\httpdocs\mydomain\Glob al.asax(2,11): error CS0246: The type or namespace name 'mydomain' could not be found (are you missing a using directive or an assembly reference?)
    g:\PleskVhosts\mydomain.com\httpdocs\mydomain\Glob al.asax(3,22): error CS0234: The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
    g:\PleskVhosts\mydomain.com\httpdocs\mydomain\Web. config(24,21): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

    ________________________________________
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18056

  2. #2
    Star is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.5
    Join Date
    May 2015
    Posts
    1
    Reputation
    0
    Hi Bress,

    It seems that you havent deployed your files properly to the server. Please kindly follow this steps and hope it will help you:

    1. Open your project via Visual Studio tool
    2. On the Solution Explorer window, right click your project and select "Publish Website"
    3. Please publish your website to your local folder, such as C:\Project
    4. You will see all the files and subfolders on C:\Project, however, you will not see any code-behind files
    5. Please upload whatever you see on C:\Project to the server via FTP


    Please note that if your website does not even work on your local PC, it will never ever work on the server. This is why it is important to ensure that your site works on your local PC first
    Also, please kindly add a customError tag on your web.config so that you can view the error message directly (if in case there is an error). This can be something like:


    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
    <error statusCode="403" redirect="NoAccess.htm" />
    <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •