Web Services - Having An Ambiguous Type Error When Calling A WebMethod On .NET Web Application?
Mar 2, 2011
The message sent to browser is as follows:
The type My.API.Class is ambiguous: it could come from assembly '[on Temporary ASP.NET Files]' or from assembly '[on bin folder]'
The problem occurs when debugging a Web App, speciically when making a request to a WebMethod of a WebService.The project compiles just right. It generates My.Website.dll on bin folder and if I publish the Web Application. It works fine.The asmx file is on the root of the application. The CodeBehind file is on App_Code and its marked to be compiled to generate My.Website.dll.The way this person exposes its problem is somehow similar but I get starting to be lost when he talks about a proxy class and shared dlls I don't use.
I am integrating third party Web Page Management CMS solution into my web application. I am getting the following error when I try to recompile:
Parser Error Message: The type 'oboutSolutions.ManageWebsite' is ambiguous: it could come from assembly 'C:VS2010 ProjectsTestCMSCMSinoboutSolutions.DLL' or from assembly 'C:VS2010 ProjectsTestCMSCMSinCMS.DLL'. Please specify the assembly explicitly in the type name.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageWebsite.aspx.cs" Inherits="oboutSolutions.ManageWebsite" %> Line 2: <%@ Register TagPrefix="obout" Namespace="OboutInc.Editor" Assembly="obout_Editor" %> Line 3: <%@ Register TagPrefix="obout" Namespace="Obout.Interface" Assembly="obout_Interface" %>
I have a page which submits a form in my local system but in my production system when i click my submit button it just freezes with the error in my web developer toolbar saying Error: Sys.WebForms.PageRequestManagerServerErrorException: When calling stored procedures and 'Use Procedure Bodies' is false, all parameters must have their type explicitly set.
I have the following problem;My console app is running on the server and all I want to do is control it over ASP.NET Web Service.
I added new ASP.NET Web Service project to my Solution where my main console app and added reference to it.The problem is every time WebMethod calls function from console app, i get the nullreferenceexception. Even if I try to use static classes or singletons; every object is null, although my console app is running absolutely correctly.
and I am calling the webmethod by javascript like this [Code]....
The result is, I get the error function running and I get "undefined error" alert.Am I calling the procedure correctly? I put a breakpoint on the webmethod and it.
i wrote a webmethod on webservice. it will do adding product to shoppingbasket. But it doesn't work. i used a class and its method in this webservice method. error is about it. my code are below:
I am in a page that inherits this master page. Upon a checkbox being unchecekd, I want to show a message to the user that if they save it, they can't re-check the checkbox without some admin action.
I've been given feedback that I can't just use an alert('message'); in javascript because they want the consistent look of these messages.
Next, I tried to make an ajax call via PageMethods (as that's what everything else in this codebase uses) to show a message. My problem lies in this method being static.
[WebMethod] public static void ShowSuperImportantMessage() { if(!checkboxICareAbout.Checked) ((IFooMaster)Master).ShowFancyMessagePopupTheBusinessCantLiveWithout("If you uncheck that thing, you can't recheck it."); }
Since ShowSuperImportantMessage() is static, I can't access Master from within. The method on the master page looks more or less like this:
public void ShowFancyMessagePopupTheBusinessCantLiveWithout(string message) { lblGenericMessage.Text = message; btnGenericMessageOK.Focus(); upGenericMessage.Update(); mpeGenericMessage.Show(); } mpeGenericMessage is an ajaxtoolkit:ModalPopupExtender.
upGenericMessage is an update panel.The other 2 are obvious.
Can I do some jQuery kung-fu to show that stuff? I tried, but the solution complained that the controls I tried to refer to by ClientID didn't resolve since they were on the Master page.
quick edit: Before anyone tells me the architecture is a problem, or I shouldn't have put such a thing on a master page, or w/e...
I know the situation is not ideal, but I this is inherited code, and I can't drop it all and rewrite half of their web stack.
Right now it reports the following error: "Cannot locate the resource". I figure that I am specifying the url incorrectly. This javascript is in an external file located in the same directory as Default.aspx .
I understand how to use jQuery to make an AJAX call to a WebMethod from a normal page, but I'm running into problems doing it from a UserControl (ASCX). Right now the biggest Issue I'm having is that the JavaScript for getting access to the groupDropDown control is not working. It seems that since this is a UserControl hosted within DotNetNuke, the ususal method of getting the CLientID is not working since it is nested down x number of levels. Here is what I have:
Javascript:
function validateEnrolledDate(src, args) { var isValid; [code]....
I'm now just referencing a TextBox:<asp:TextBox ID="dealerId" runat="server" CssClass="theDealer" />
The Text in the Textbox is being set in Server Side code, and it is visible on screen.The alert message is "undefined", so something is still happening so that it is not getting the value of that textbox...
I'm trying to implement a view tracking web service on my website. I'm using JavaScript because I want to exclude any search bots from my tracked views. The problem is I'm getting a "Unknown web method" error when I try to use jQuery to post to the web service I've created.
$(document).ready(function() {
$.ajax({ type: "POST", [code]...
The error is an ASP .NET error: Unknown web method TrackItemView. Parameter name: methodName.I've done this hundreds of times (seemingly), but I just can't see what I'm missing. I'm sure it's something small...
I have one project in TFS and once I get latest version it gives following error. "Resource is ambiguous, imported from the namespaces or types 'System, System.web'". Even I have checked twice that there is no duplication but still giving error.
I used this brilliant solution to convert a linq query to a datatable. But I'm getting a strange error when running it. Build succeeds though.
Compiler Error Message: CS0121: The call is ambiguous between the following methods or properties: 'Gruppkoll.App_Code.ConvertToDataTableFromLinqResult.ToADOTable<Gruppkoll.MessageSet (System.Collections.Generic.IEnumerable<Gruppkoll.MessageSet>)' and 'Gruppkoll.App_Code.ConvertToDataTableFromLinqResult.ToADOTable<Gruppkoll.MessageSet (System.Collections.Generic.IEnumerable<Gruppkoll.MessageSet>)'
I've tried re-building it and restarting the IIS. It seems as there are two classes with the same method but I've checked this and that's not the case. I'm using .NET 4.0 ASP.NET Webforms.
using System.windows.forms; using System.web.webcontrols.....
Textbox ambiguous reference error is occured from webcontrols and forms, how can i rectify this error... but i need those two namespaces in my asp.net page.
Recently, I tried to get my Web Service class to inherit from a custom base class that inherits from System.Web.Services.WebMethod instead of the System.Web.Services.WebMethod directly.
However, I've been getting Error 500.
Public Class Service1 Inherits BaseClass <System.Web.Services.WebMethod()> _ Public Function GetSessionID() As String GetSessionID = Me.Session.SessionID End Function End Class
public class BaseClass Inherits System.Web.Services.WebService public property Property1 as string public property Property2 as string
Im running a web application in visual studio 2008..i got this error when particular page was loaded.. help me to proceed....
Server Error in '/PSS.NET' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Ambiguous match found.
Source Error:
<%@ Register TagPrefix="uc1" TagName="CtrlButtonControl" Src="../../WebControls/CtrlButtonControl.ascx" %> <%@ Page language="c#" Codebehind="SPSearchFromToDtStorLocMatTypRank.aspx.cs" AutoEventWireup="false" Inherits="Sdi.Pss.Reports.SP.SPSearchFromToDtStorLocMatTypRank" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > Source File: /PSS.NET/Reports/SP/SPSearchFromToDtStorLocMatTypRank.aspx Line: 1 Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3614
I have simple 3 tier web application and have mostly CRUDE functionalities. Recently I required to add new console application to the existing solution in which I call data layer methods for retrieving data from DB but I get an exception "The type initializer for threw an exception."When I debugged I found that the exception is thrown at datalayer on first line of class where I get connectionstring from
web.config, the code is public static readonly string CONNECT_STRING =
Now if I hardcode the connection string value like public static readonly string CONNECT_STRING = "Data Source=XYZ;uid=sa;password=XXX;initial catalog=ABC;"
it works fine.I don't understand what is the issue here as web application works fine with this datalayer.
I make an asynchronous call from one web service to another web service deployed on different server? The scenario is that an ASP.NET webforms page will call a web service in an async manner. This particular web service will then make another async call to a second web service deployed on different web server. This this possible to achieve, and what additional steps or code would be necessary to make this happen?
Does anyone have a sample code on this? I want to call the FedEx "Rate Available Services/Rate Shopping" Service to retrieve pricing for various services.
My requirement is i need to display some quotes from some vendors in my User Interface. Some of the quote details will be fetched from database where as some vendors are giving web services to get the quote results. I need to combine the quotes from database as well as the various web service response and display in the grid.