.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘exception stack trace’

FIX: A new user profile may not be created and you may receive an exception when you try to create a new user profile in Commerce Server 2007

Symptoms
When you try to create a new user profile in Microsoft Commerce Server 2007, a new user profile may not be created.Additionally, you may receive the following exceptions in the Application event log.
Exception 1

An exception occurred in the ‘ProfilesWebService’ Web service.Exception details follow: System.Runtime.InteropServices.COMException (0×8007202F): A constraint violation occurred. (Exception from HRESULT: 0×8007202F)
at Microsoft.CommerceServer.Interop.Profiles.IProfileObject2.Update()
at Microsoft.CommerceServer.Internal.Profiles.ProfileStorage.UpdateOnProfilePIA(IProfileObject2 piaProfileObject, ProfileErrorContext ctxt)
at Microsoft.CommerceServer.Internal.Profiles.ProfileStorage.UpdateProfile(XmlElement profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.UpdateProfile(XmlElement& profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Exception 2

Microsoft.CommerceServer.ServerFaultException: A constraint violation occurred. (Exception from HRESULT: 0×8007202F) —>
System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: A constraint violation occurred.
(Exception from HRESULT: 0×8007202F) —>
Microsoft.CommerceServer.ServerFaultException: A constraint violation occurred.
(Exception from HRESULT: 0×8007202F)
— End of inner exception stack trace —
at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.PropagateOrLogExceptionInternal(Exception ex)
at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.PropagateOrLogException(Exception ex)
at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.UpdateProfile(XmlElement& profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)at Microsoft.CommerceServer.Internal.Profiles.ProfilesServiceProxy.AuthorizedInvoke(String methodName, Object[] parameters)— End of inner exception stack trace —
at Microsoft.CommerceServer.ServiceAgent.TryHandleWebMethodException(Exception ex, SoapHttpClientProtocol serviceProxy)at Microsoft.CommerceServer.Internal.Profiles.ProfilesServiceProxy.AuthorizedInvoke(String methodName, Object[] parameters)
at Microsoft.CommerceServer.Internal.Profiles.ProfilesServiceProxy.UpdateProfile(XmlElement& profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
at Microsoft.CommerceServer.Profiles.ProfileManagementContext.UpdateProfile(XmlElement profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
at Microsoft.CommerceServer.Profiles.ProfileManagementContext.UpdateProfile(XmlElement profileXml, Boolean forceOverwrite)
at Microsoft.CommerceServer.UI.CustomerAndOrdersManager.ProfilesManagementProxy.TryUpdateProfile(XmlElement profileXml, Boolean forceOverwrite)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. This problem occurs if the following conditions are true:You use a centralized profile store to maintain credentials in Active Directory Application Mode (ADAM).You try to set a password for the unicodePwd attribute.Note This problem may not occur if the unicodepwd attribute is blank.
Resolution
Hotfix information A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a “Hotfix download available” section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or tocreate a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support(http://support.microsoft.com/contactus/?ws=support)Note The “Hotfix download available” form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.PrerequisitesNo prerequisites are required.Restart requirementYou must restart Microsoft Internet Information Services (IIS) after you apply this hotfix. To restart IIS, run the following command at a command prompt.

IISRESET/RESTART Note This option stops and then restarts all IIS services.Hotfix replacement information This hotfix does not replace any other software updates.
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformMscsdp.dll6.0.4010.066,56023-Feb-200722:55×86

FIX: A new user profile may not be created and you may receive an exception when you try to create a new user profile in Commerce Server 2007

Symptoms
When you try to create a new user profile in Microsoft Commerce Server 2007, a new user profile may not be created.Additionally, you may receive the following exceptions in the Application event log.
Exception 1

An exception occurred in the ‘ProfilesWebService’ Web service.Exception details follow: System.Runtime.InteropServices.COMException (0×8007202F): A constraint violation occurred. (Exception from HRESULT: 0×8007202F)
at Microsoft.CommerceServer.Interop.Profiles.IProfileObject2.Update()
at Microsoft.CommerceServer.Internal.Profiles.ProfileStorage.UpdateOnProfilePIA(IProfileObject2 piaProfileObject, ProfileErrorContext ctxt)
at Microsoft.CommerceServer.Internal.Profiles.ProfileStorage.UpdateProfile(XmlElement profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.UpdateProfile(XmlElement& profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Exception 2

Microsoft.CommerceServer.ServerFaultException: A constraint violation occurred. (Exception from HRESULT: 0×8007202F) —>
System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: A constraint violation occurred.
(Exception from HRESULT: 0×8007202F) —>
Microsoft.CommerceServer.ServerFaultException: A constraint violation occurred.
(Exception from HRESULT: 0×8007202F)
— End of inner exception stack trace —
at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.PropagateOrLogExceptionInternal(Exception ex)
at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.PropagateOrLogException(Exception ex)
at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.UpdateProfile(XmlElement& profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)at Microsoft.CommerceServer.Internal.Profiles.ProfilesServiceProxy.AuthorizedInvoke(String methodName, Object[] parameters)— End of inner exception stack trace —
at Microsoft.CommerceServer.ServiceAgent.TryHandleWebMethodException(Exception ex, SoapHttpClientProtocol serviceProxy)at Microsoft.CommerceServer.Internal.Profiles.ProfilesServiceProxy.AuthorizedInvoke(String methodName, Object[] parameters)
at Microsoft.CommerceServer.Internal.Profiles.ProfilesServiceProxy.UpdateProfile(XmlElement& profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
at Microsoft.CommerceServer.Profiles.ProfileManagementContext.UpdateProfile(XmlElement profileXml, Boolean forceOverwrite, Boolean inAdapterContext)
at Microsoft.CommerceServer.Profiles.ProfileManagementContext.UpdateProfile(XmlElement profileXml, Boolean forceOverwrite)
at Microsoft.CommerceServer.UI.CustomerAndOrdersManager.ProfilesManagementProxy.TryUpdateProfile(XmlElement profileXml, Boolean forceOverwrite)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. This problem occurs if the following conditions are true:You use a centralized profile store to maintain credentials in Active Directory Application Mode (ADAM).You try to set a password for the unicodePwd attribute.Note This problem may not occur if the unicodepwd attribute is blank.
Resolution
Hotfix information A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a “Hotfix download available” section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or tocreate a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support(http://support.microsoft.com/contactus/?ws=support)Note The “Hotfix download available” form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.PrerequisitesNo prerequisites are required.Restart requirementYou must restart Microsoft Internet Information Services (IIS) after you apply this hotfix. To restart IIS, run the following command at a command prompt.

IISRESET/RESTART Note This option stops and then restarts all IIS services.Hotfix replacement information This hotfix does not replace any other software updates.
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformMscsdp.dll6.0.4010.066,56023-Feb-200722:55×86

Error message when you view a report in Microsoft Dynamics CRM 3.0: “System.Web.Services.Protocols.SoapException: The feature: “Report history snapshots” is not supported in this edition of Repor …

Symptoms
Consider the following scenario:You install Microsoft Dynamics CRM 3.0 on Microsoft Windows Small Business Server 2003 Release 2 (R2) with Microsoft SQL Server 2005 Workgroup Edition.You view a report in Microsoft Dynamics CRM 3.0.In this scenario, you receive the following error message:

Server Error in ‘/’ Application.
System.Web.Services.Protocols.SoapException: The feature: “Report history snapshots” is not supported in this edition of Reporting Services.
Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: “Report history snapshots” is not supported in this edition of Reporting Services. at Microsoft.ReportingServices.Diagnostics.Sku.ThrowIfFeatureNotEnabled(String instanceId, RestrictedFeatures feature) at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory) — End of inner exception stack trace — at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory)
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.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The feature: “Report history snapshots” is not supported in this edition of Reporting Services. —> Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: “Report history snapshots” is not supported in this edition of Reporting Services. at Microsoft.ReportingServices.Diagnostics.Sku.ThrowIfFeatureNotEnabled(String instanceId, RestrictedFeatures feature) at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory) — End of inner exception stack trace — at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory)
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:[SoapException: System.Web.Services.Protocols.SoapException: The feature: "Report history snapshots" is not supported in this edition of Reporting Services. ---> Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "Report history snapshots" is not supported in this edition of Reporting Services.at Microsoft.ReportingServices.Diagnostics.Sku.ThrowIfFeatureNotEnabled(String instanceId, RestrictedFeatures feature)at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory)— End of inner exception stack trace —at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory)]System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1496System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +218Microsoft.Crm.ReportingServices.ReportingService.ListReportHistory(String Report) +48Microsoft.Crm.Reports.ReportCache.GetSnapshots(String reportPath) +267Microsoft.Crm.Reports.ReportCache.GetReportSnapshotProperties(String reportName) +194Microsoft.Crm.Web.Reporting.SRSViewer.ConfigurePage() +440Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +20System.Web.UI.Control.PreRenderRecursiveInternal() +62System.Web.UI.Page.ProcessRequestMain() +1499
Resolution
SQL Server 2005 Workgroup Edition is available withWindows Small Business Server R2. However, this problem occurs because this version of SQL Server does not support the Snapshot feature in SQL Server Reporting Services.

Error message when you upgrade to Microsoft Dynamics CRM 4.0: “Exception has been thrown by the target of an invocation”

Symptoms
When you upgrade to Microsoft Dynamics CRM 4.0, the upgrade process cannot be completed. Additionally, you receive the following error message in the CRM40setup.log file:

Time|Info| Updating precision and scale of decimal attributes
Time|Error| System.Exception: Action
Microsoft.Crm.Setup.Server.InstallDatabaseAction failed. —>
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Data.SqlClient.SqlException: The statistics ‘hind_1090102924_1A_2A_4A_9A_15A’ is dependent on column ‘Quantity’.
ALTER TABLE ALTER COLUMN Quantity failed because one or more objects access this column.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command)
at Microsoft.Crm.Setup.DiffBuilder.UpdatePrecisionAndScaleOnDecimalAttributes()
— End of inner exception stack trace —
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseCollection releases, Int32 currentProgress)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
at Microsoft.Crm.Setup.Server.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Common.Action.ExecuteAction(Action action, IDictionary parameters, Boolean undo)
— End of inner exception stack trace —, Error, RetryCancel, Option1Note By default, the CRM40setup.log file is in the following folder:
C:\Documents and Settings\upgrading user\Application Data\Microsoft\MSCRM\logs
This problem occurs if you have custom statistics in the OrgName_MSCRM database.
Resolution
This problem occurs because the upgrade process cannot handle custom statistics in the OrgName_MSCRM database.

Error message when you try to view the service calendar in Microsoft Dynamics CRM 3.0: “An unhandled exception was generated during the execution of the current web request”

Symptoms
You cannot view the service calendar in Microsoft Dynamics CRM 3.0. Additionally,you receive the following error message:

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.
Resolution
This problem occurs when you have working hours set in Microsoft Dynamics CRM 3.0 and when one of the following conditions is true: You change time zones on your computer.You change from daylight saving time to standard time,or you change fromstandard time to daylight saving time.

Error message when you try to use the Microsoft Exchange Server ActiveSync Web Administration tool to delete a partnership or to perform a Remote Wipe operation on a mobile device in Exchange Ser …

Symptoms
When you try to use the Microsoft Exchange Server ActiveSync Web Administration tool to delete a partnership with a mobile device or to perform a Remote Wipe operation on a mobile device, you receive the following error message:

Failed to access user’s Mailbox, verify that the mailbox and user account are enabled and functional.
Server Error in ‘/MobileAdmin’ Application.
——————————————————————————–
The remote server returned an error: (401) Unauthorized.
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.Net.WebException: The remote server returned an error: (401) Unauthorized.
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:
[WebException: The remote server returned an error: (401) Unauthorized.]
System.Net.HttpWebRequest.CheckFinalStatus() +680
System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) +74
System.Net.HttpWebRequest.GetRequestStream() +234
Microsoft.Exchange.AirSync.Admin.Mailbox.propFindRequest(String deviceUri) +240
Microsoft.Exchange.AirSync.Admin.Mailbox.getDevices() +194
Microsoft.Exchange.AirSync.Admin.Devices.refreshDevicesTable() +135
Microsoft.Exchange.AirSync.Admin.Devices.Page_Load(Object sender, EventArgs e) +190
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
——————————————————————————–
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
Resolution
This issue occurs if one or both of the following conditions are true:Integrated Windows authentication is not enabled on the Exadmin virtual directory on the mailbox server.
Note In a front-end/back-end (FE/BE) Exchange configuration, this issue occurs if Integrated Windows authentication is not enabled on the Exadmin virtual directory on the back-end server.The MobileAdmin Web application is not running under the ExchangeApplicationPool application pool.