Quantcast
Channel: WCF, ASMX and other Web Services
Viewing all articles
Browse latest Browse all 555

System.Web.HttpException The type 'WebService.WebService' is ambiguous: it could come from assembly A or B

$
0
0

The type 'WebService.WebService' is ambiguous: it could come from assembly 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\be16cd76\fad287b\App_Code.rwr4wlid.DLL' or from assembly 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\be16cd76\fad287b\App_WebReferences.2_hrkewk.DLL'. Please specify the assembly explicitly in the type name.

I have the same error message when I run the WebService.asmx local except that it points to an asp.net temp folder.

There are two sites, each having a WebService, each has their own port no.

The live sites are on a shared server.

The WebService.asmx file looks the same on each site:

<%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService.WebService" %>

The WebService.cs class is also the same, here are the first few lines:

namespace WebService
{
    /// <summary>
    /// Web Service Namespace="http://developer.intuit.com/"
    /// Web Service Name="WebService"
    /// Web Service Description="Sample WebService in ASP.NET to 
    /// demonstrate QuickBooks WebConnector"
    /// </summary>
    [WebService(
         Namespace = "http://developer.intuit.com/",
         Name = "WebService",
         Description = "Sample WebService in ASP.NET to demonstrate " +"QuickBooks WebConnector")]

    // Important Note: 	
    // You should keep the namespace as http://developer.intuit.com/ for all web 
    // services that communicates with QuickBooks Web Connector. 


    public class WebService : System.Web.Services.WebService
    {
        #region GlobalVariables
        System.Diagnostics.EventLog evLog = new System.Diagnostics.EventLog();
        public int count = 0;
        public ArrayList req = new ArrayList();
        public static int theprovider = -1;

        #endregion

        #region Constructor
        public WebService()
        {
            //CODEGEN: This call is required by the ASP.NET 
            //Web Services Designer
            InitializeComponent();
            // Initializing EventLog for logging
            initEvLog();
        }
        #endregion

        #region AutoGeneratedMethods
        //Required by the Web Services Designer 
        private IContainer components = null;

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing && components != null)
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #endregion


        #region WebMethods

The error message says "Please specify the assembly explicitly in the type name."

No clue what this means. Where and how? 


Viewing all articles
Browse latest Browse all 555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>