Public Class ProfileCommonInherits System.Web.Profile.ProfileBase
Public Overridable
Property Theme()
As String
Get
Return
CType(Me.GetPropertyValue("Theme"),String)
End Get
Set
Me.SetPropertyValue("Theme", value)
End Set
End Property
Public Overridable
Function GetProfile(ByVal username
As String)
As ProfileCommon
Return CType(ProfileBase.Create(username),ProfileCommon)
End Function
Then I rebuilt the solution and republished the web site. After that everything ran good. I then went back into the code above and the project had uncommented that section. I'm not sure what was going on, but all is fine now.
Now I've caught the bug... and it really has me stumped.
In my case, the whole site (and it's not very big yet) works fine on my XP Pro development machine, but when I try to copy or publish it to the Win2K Server, it says ProfileCommon is ambiguous and won't run.
Here's the web.config file in case anyone can find the problem...
I am having this problem after turning on membership to an existing application. Works fine on dev machine. Works fine on production clone. Doesn't work on production machine. I get BC30554: 'ProfileCommon' is ambiguous. I have tried everything short
of rebooting the production server. Still not able to resolve.
I know the problem. I just worked it out now; at least I think. I will start off by saying I always publish apps with the “Allow this precompiled site to be updateable” unchecked,
because I like the added security idea of compiling all the code and only leaving page markers behind. In fact, I assume we do not get the BC30554 error because all assemblies and code are compiled into their own unique constructs when you publish apps in
this way. However, our site now has hundreds of pages and the idea of compiling the entire applications to fix a static link or grammar issue on a single aspx page has become a daunting task.
Anyway, so I decided to publish the next version of the App with the “Allow this precompiled site to be updateable” checkbox, checked. I kept getting failures though. I had no idea
why. FYI, to get details of the build error, be sure to: In visual studio 2008(or 2005), go to options -> projects and Solutions -> and then check the "show Output Window when build starts". This will at least print out the raw compile issues. Even then, I
saw nothing but BC30554 ‘ambiguous’ errors. After hunting the internet, I found nothing with the exception that the BC30554 errors were related to User Controls. Then it hit me… I have several User Controls with the same name, but in different directories.
By changing the physical name of the user control, the source code file (which should change with the name) and by making sure the inherited class is changed (if it is required), from what I see, the app compiled and things work fine.
My suggestion is to remove any extra user controls that are not needed. My initial thought when I started my project almost 2 years ago was that you needed separate user controls
with SSL directories v.s. using the control within static non SSL directories. I found out later that it does not matter. The server knows how to render the user control. If the control is rendered over an SSL connection even though it is located in a directory
that might not be secure, the server still knows to render the control over an SSL. Just be sure to make the register reference absolute or use a ~ if you are using relative linkages.
Moving along; remove duplicate controls if you are only using them to handle secure and unsecure situations. If you have controls you might have copied and then made finite changes, removing them is an issue obviously. This is when you
should make the name change as stated above.
I have now experienced this problem. It arose from the fact that I have added a link to a dynamically created library. This problem persists even if you delete a reference to this library. The solution I have been quite simple: remove the library from the
folder bin. The name of the library begins with app_code
speenr
Member
8 Points
4 Posts
Re: BC30554: 'ProfileCommon' is ambiguous - - PLEASE HELP
Jul 28, 2007 03:00 PM|LINK
I just had the same issue with "ProfileCommon". I commented
*************************************************************************************************************
Public Class ProfileCommonInherits System.Web.Profile.ProfileBase
Public Overridable Property Theme() As String Get Return CType(Me.GetPropertyValue("Theme"),String) End Get Set Me.SetPropertyValue("Theme", value) End Set End Property
Public Overridable Function GetProfile(ByVal username As String) As ProfileCommon Return CType(ProfileBase.Create(username),ProfileCommon) End FunctionEnd
Class*************************************************************************************************************
Then I rebuilt the solution and republished the web site. After that everything ran good. I then went back into the code above and the project had uncommented that section. I'm not sure what was going on, but all is fine now.
stevemol
Member
2 Points
1 Post
Re: BC30554: 'ProfileCommon' is ambiguous - - PLEASE HELP
Aug 20, 2007 02:34 AM|LINK
Now I've caught the bug... and it really has me stumped.
In my case, the whole site (and it's not very big yet) works fine on my XP Pro development machine, but when I try to copy or publish it to the Win2K Server, it says ProfileCommon is ambiguous and won't run.
Here's the web.config file in case anyone can find the problem...
<?xml version="1.0"?><
configuration> <configSections><
sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><
section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><
section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/><
section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> </sectionGroup></
sectionGroup> </sectionGroup></
configSections> <connectionStrings><
remove name="LocalSqlServer" /> <add name="LocalSqlServer" connectionString="Data Source=P4;Initial Catalog=SMDR;Integrated Security=True" providerName="System.Data.SqlClient" /><
add name="SMDRConnectionString" connectionString="Data Source=P4;Initial Catalog=SMDR;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings><
system.web> <roleManager enabled="true"><
providers> <remove name="AspNetSqlRoleProvider" /><
add connectionStringName="SMDRConnectionString" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers></
roleManager> <authentication mode="Forms"><
forms name=".CNITIM" /> </authentication><
authorization> <deny users="?"/></
authorization> <membership><
providers> <remove name="AspNetSqlMembershipProvider" /><
add connectionStringName="SMDRConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></
providers> </membership><
profile defaultProvider="AspNetSqlProfileProvider" inherits="System.Web.Profile.ProfileBase"> <properties><
add name="DealerID" type="string"/> <add name="CustomerID" type="string"/><
add name="UserID" type="string"/> </properties></
profile> <siteMap defaultProvider="XmlSiteMapProvider" enabled="true"><
providers> <add name="XmlSiteMapProvider" description="Default SiteMap provider." type="System.Web.XmlSiteMapProvider" siteMapFile="Web.sitemap" securityTrimmingEnabled="true" /></
providers> </siteMap><
pages> <controls><
add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </controls></
pages> <compilation debug="false"><
assemblies> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></
assemblies> </compilation><
httpHandlers> <remove verb="*" path="*.asmx"/><
add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><
add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> </httpHandlers><
httpModules> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></
httpModules> </system.web><
system.webServer> <validation validateIntegratedModeConfiguration="false"/><
modules> <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></
modules> <handlers><
remove name="WebServiceHandlerFactory-Integrated"/> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><
add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></
handlers> </system.webServer><
system.net> <mailSettings><
smtp from="tim@centernet.info"> <network defaultCredentials="true" host="p4" password="" userName="" /></
smtp> </mailSettings></
system.net></
configuration>Bugs66
Member
28 Points
9 Posts
Re: BC30554: 'ProfileCommon' is ambiguous - - PLEASE HELP
Mar 19, 2008 11:19 PM|LINK
I am having this problem after turning on membership to an existing application. Works fine on dev machine. Works fine on production clone. Doesn't work on production machine. I get BC30554: 'ProfileCommon' is ambiguous. I have tried everything short of rebooting the production server. Still not able to resolve.
scott@elband...
Star
11346 Points
1865 Posts
Re: BC30554: 'ProfileCommon' is ambiguous - - PLEASE HELP
Nov 20, 2008 04:24 PM|LINK
I had this problem and solved it by uploading the PrecompiledApp.config file to my live server.
WikiDiscover...
Member
2 Points
1 Post
Re: BC30554: 'ProfileCommon' is ambiguous - - PLEASE HELP
Dec 29, 2008 10:55 PM|LINK
I know the problem. I just worked it out now; at least I think. I will start off by saying I always publish apps with the “Allow this precompiled site to be updateable” unchecked, because I like the added security idea of compiling all the code and only leaving page markers behind. In fact, I assume we do not get the BC30554 error because all assemblies and code are compiled into their own unique constructs when you publish apps in this way. However, our site now has hundreds of pages and the idea of compiling the entire applications to fix a static link or grammar issue on a single aspx page has become a daunting task.
Anyway, so I decided to publish the next version of the App with the “Allow this precompiled site to be updateable” checkbox, checked. I kept getting failures though. I had no idea why. FYI, to get details of the build error, be sure to: In visual studio 2008(or 2005), go to options -> projects and Solutions -> and then check the "show Output Window when build starts". This will at least print out the raw compile issues. Even then, I saw nothing but BC30554 ‘ambiguous’ errors. After hunting the internet, I found nothing with the exception that the BC30554 errors were related to User Controls. Then it hit me… I have several User Controls with the same name, but in different directories. By changing the physical name of the user control, the source code file (which should change with the name) and by making sure the inherited class is changed (if it is required), from what I see, the app compiled and things work fine.
My suggestion is to remove any extra user controls that are not needed. My initial thought when I started my project almost 2 years ago was that you needed separate user controls with SSL directories v.s. using the control within static non SSL directories. I found out later that it does not matter. The server knows how to render the user control. If the control is rendered over an SSL connection even though it is located in a directory that might not be secure, the server still knows to render the control over an SSL. Just be sure to make the register reference absolute or use a ~ if you are using relative linkages. Moving along; remove duplicate controls if you are only using them to handle secure and unsecure situations. If you have controls you might have copied and then made finite changes, removing them is an issue obviously. This is when you should make the name change as stated above.
I hope this helps?
Highest Regards,
Jason
ArmandoS
Member
20 Points
7 Posts
BC30554: 'ProfileCommon' is ambiguous - - PLEASE HELP
Oct 13, 2009 08:21 PM|LINK
I had the same issue, I went to the bin folder and deleted all the dlls not needed and boom!,
my project worked good on the server.
21a1ss3
Member
2 Points
1 Post
Re: BC30554: 'ProfileCommon' is ambiguous - - PLEASE HELP
Aug 04, 2011 11:29 PM|LINK
Hi Deakus.
I have now experienced this problem. It arose from the fact that I have added a link to a dynamically created library. This problem persists even if you delete a reference to this library. The solution I have been quite simple: remove the library from the folder bin. The name of the library begins with app_code