Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 ambigious error driving me nutz!

Author  Topic 

jhermiz

3564 Posts

Posted - 2004-09-21 : 13:30:34
Ahh yes...an ambigious error :( my favorite.

Using vs.net...have a page "default.aspx" set as the startup page...
vs.net generates the following code behind:


Imports System.Web.Security
Public Class _default
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub
Protected WithEvents Welcome As System.Web.UI.WebControls.Label
Protected WithEvents UserID As System.Web.UI.WebControls.Label
Protected WithEvents UserName As System.Web.UI.WebControls.Label
Protected WithEvents ClientID As System.Web.UI.WebControls.Label
Protected WithEvents Client As System.Web.UI.WebControls.Label
Protected WithEvents Button1 As System.Web.UI.WebControls.Button

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Welcome.Text = "Hello, " + User.Identity.Name + " you have logged in at: " + DateTime.Now()
UserID.Text = "Your IMS LoginID is: " & Session("LoginID")
UserName.Text = "Your IMS Login is: " & Session("Login")
ClientID.Text = "Your ClientID is: " & Session("ClientID")
Client.Text = "Your Client is: " & Session("Client")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FormsAuthentication.SignOut()
Response.Redirect("login.aspx")
End Sub
End Class


The html for this page:

<%@ Page CodeBehind="default.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="ims.jakah.com._default" %>
<HTML>
<HEAD>
<title>IMS</title>
</HEAD>
<body>
<form runat="server">
<font face="Arial, Helvetica, sans-serif" size="2">
<asp:label id="Welcome" runat="server" /></font><p>
<font face="Arial, Helvetica, sans-serif" size="2">
<asp:label id="UserID" runat="server" /></font>
<p>
<font face="Arial, Helvetica, sans-serif" size="2">
<asp:label id="UserName" runat="server" /></font>
<p>
<font face="Arial, Helvetica, sans-serif" size="2">
<asp:label id="ClientID" runat="server" /></font>
<p>
<font face="Arial, Helvetica, sans-serif" size="2">
<asp:label id="Client" runat="server" /></font>
<p>
<asp:button text="Signout" runat="server" id="Button1" /></p>
</form>
</body>
</HTML>


And when I try to login immediately when it tries to go to default.aspx I get this HUGE error:

Ambiguous match found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Reflection.AmbiguousMatchException: Ambiguous match found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[AmbiguousMatchException: Ambiguous match found.]
System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) +245
System.Type.GetProperty(String name, BindingFlags bindingAttr) +24
System.Web.UI.Util.GetNonPrivatePropertyType(Type classType, String propName) +9
System.Web.Compilation.TemplateControlCompiler.BuildFieldDeclaration(ControlBuilder builder, Boolean fGeneratedID) +48
System.Web.Compilation.TemplateControlCompiler.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, PropertySetterEntry pse) +794
System.Web.Compilation.TemplateControlCompiler.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, PropertySetterEntry pse) +355
System.Web.Compilation.TemplateControlCompiler.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, PropertySetterEntry pse) +355
System.Web.Compilation.TemplateControlCompiler.BuildMiscClassMembers() +52
System.Web.Compilation.PageCompiler.BuildMiscClassMembers() +10
System.Web.Compilation.BaseCompiler.BuildSourceDataTree() +1291
System.Web.Compilation.BaseCompiler.GetCompiledType() +129
System.Web.UI.PageParser.CompileIntoType() +60
System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation() +124

[HttpException (0x80004005): Ambiguous match found.]
System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) +692
System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() +125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context) +116
System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context) +36
System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +96
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173


????

Yaaaaaaaaaaaaa


Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/

jhermiz

3564 Posts

Posted - 2004-09-21 : 13:39:34
ambigious fix...nevermind :)

Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/
Go to Top of Page
   

- Advertisement -