1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How To Solve Server Error 'CS0246' at .aspx page?

Discussion in 'C#' started by Zion Amal Rafeeq, Mar 10, 2016.

  1. #1
    The application is running successfully at the Local Host Server. But when we run it on the web server, the error is showing up.

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

    Source Error:

    Line 20: public partial class addnewproduct : System.Web.UI.Page
    Line 21: {
    Line 22: MySqlConnection con = new MySqlConnection(ConfigurationManager.ConnectionStrings["cnog"].ConnectionString);
    Line 23: string img_photo = "-1";
    Line 24: string img_front = "-1";

    Source File: d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\addnewproduct.aspx.cs Line: 22
    SEMrush

    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\System.Web.DataVisualization\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DataVisualization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.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\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.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_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Web.Entity.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Design\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.dll" /D:DEBUG /debug+ /optimize- /win32res:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\mpnekw3u.res" /w:4 /nowarn:1659;1699;1701;612;618 /warnaserror- "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.11.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.12.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.14.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.9.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.5.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.6.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.4.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.3.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.2.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.7.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.1.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.8.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.0.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.13.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e9f0ddc1\afb186bc\App_Web_mpnekw3u.10.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.

    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\buzfizlogin.aspx.cs(7,7): error CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Register.aspx.cs(7,7): error CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Register.aspx.cs(13,7): error CS0246: The type or namespace name 'CodeCarvings' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Register.aspx.cs(16,7): error CS0246: The type or namespace name 'CloudinaryDotNet' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Register.aspx.cs(17,7): error CS0246: The type or namespace name 'CloudinaryDotNet' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\login.aspx.cs(7,7): error CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\addnewproduct.aspx.cs(8,7): error CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\addnewproduct.aspx.cs(17,7): error CS0246: The type or namespace name 'CloudinaryDotNet' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\addnewproduct.aspx.cs(18,7): error CS0246: The type or namespace name 'CloudinaryDotNet' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Vendorsignup.aspx.cs(7,7): error CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Vendorsignup.aspx.cs(14,7): error CS0246: The type or namespace name 'CodeCarvings' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Vendorsignup.aspx.cs(17,7): error CS0246: The type or namespace name 'CloudinaryDotNet' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Vendorsignup.aspx.cs(18,7): error CS0246: The type or namespace name 'CloudinaryDotNet' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Verify_Vendor_Account.aspx.cs(7,7): error CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\kvvesregistration.aspx.cs(7,7): error CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\kvvesregistration.aspx.cs(16,7): error CS0246: The type or namespace name 'CloudinaryDotNet' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\kvvesregistration.aspx.cs(17,7): error CS0246: The type or namespace name 'CloudinaryDotNet' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\buzfizlogin.aspx.cs(14,5): error CS0246: The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Register.aspx.cs(25,5): error CS0246: The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\login.aspx.cs(12,5): error CS0246: The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\addnewproduct.aspx.cs(22,5): error CS0246: The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Vendorsignup.aspx.cs(21,5): error CS0246: The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\Verify_Vendor_Account.aspx.cs(13,5): error CS0246: The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?)
    d:\inetpub\vhosts\buzfiz.com\asp.buzfiz.com\Krishna\kvvesregistration.aspx.cs(21,5): error CS0246: The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?)
     
    Zion Amal Rafeeq, Mar 10, 2016 IP
    SEMrush
  2. strike2867

    strike2867 Greenhorn

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    My guess is MySqlConnection is defined in a dll that's not on the production box. The other option is the web.config are registering different namespaces.
     
    strike2867, Mar 10, 2016 IP