.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 ‘Web’

Error when you use the SharePoint Migration Tool to try to restore a Windows SharePoint Services Web site: “Error getting manifest for http://localhost (fatal)”

Symptoms
When you use the Microsoft SharePoint Migration Tool (Smigrate.exe) to try to restore aMicrosoft Windows SharePoint Services 2.0 Web site, the restore operation fails. You also receive the following error message:

Error getting manifest for http://localhost (fatal)Progress: An error occurred accessing your Windows SharePoint Services site files.This issue occurs after you use Smigrate.exeto back up a Windows SharePoint Services 2.0 Web site.
Additionally, when you rename the Backup.fwp file to Backup.cab to view the contents of the backup file, the Manifest.xml file is 0 bytes.
Resolution
This problem typically occurs on Windows SharePoint Server 2.0 Web sites if one of the following conditions is true:The Web sitecontains many lists.The Web site containslists that have large items.The Web site backup contains many files.Note Only file metadata is stored in the Manifest.xml file. The files are exported separately.
During the backup process, two contiguous memory blocks are required to create the Manifest.xml file. The memory blocks must be large enough to accommodate the manifest data. If one sufficient memory block is available to create the Manifest.xml file but a second sufficient block is unavailable, the copy operation fails silently. Then, a Manifest.xml file that is 0 bytes is created.

Error message when you view an activity form in Microsoft Dynamics CRM 4.0: “Exception of type ‘System.Web.HttpUnhandledException’ was thrown”

Symptoms
When you view an activity form in Microsoft Dynamics CRM 4.0, you receive the following error message:

Error: Exception of type ‘System.Web.HttpUnhandledException’ was thrown.Error Message: 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.Error Details: Exception of type ‘System.Web.HttpUnhandledException’ was thrown.Source File: Not availableLine Number: Not availableRequest URL: http://URL
Stack Trace Info: [ArgumentNullException: Key cannot be null.Parameter name: key]at System.Collections.Hashtable.ContainsKey(Object key)at System.Collections.Hashtable.Contains(Object key)at Microsoft.Crm.Metadata.PreloadedMetadataCacheDataProvider.TryGetEntity(String entityName, NameMappingType mapping)at Microsoft.Crm.Metadata.DynamicMetadataCache.GetEntity(String entityName, NameMappingType mapping)at Microsoft.Crm.Security.User.HasPrivilege(IUser user, String entityName, PrivilegeType privilegeType, PrivilegeDepth privilegeDepth)at Microsoft.Crm.Security.User.HasPrivilege(IUser user, String entityName, AccessRights accessRights, PrivilegeDepth privilegeDepth)at Microsoft.Crm.Security.User.HasPrivilege(IUser user, String entityName, AccessRights accessRights)at Microsoft.Crm.Application.Components.Sdk.FormControls.Web.LookupControl.set_LookupTypes(Int32[] value)at Microsoft.Crm.Application.Components.Sdk.FormControls.Web.LookupControl.set_Metadata(AttributeMetadata value)at Microsoft.Crm.Application.ControlActivator.CreateControl(ControlDescriptor controlDescriptor, String clientId)at Microsoft.Crm.Application.Forms.CrudForm.BuildFormModel(FormDescriptor formDescriptor)at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, String formType)at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity)at Microsoft.Crm.Web.Activities.BasicActivityPage.ConfigureForm()at Microsoft.Crm.Web.Activities.PhoneCallDetailPage.ConfigureForm()at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Resolution
This problem occurs because the FormDescriptor object caches some entity metadata. Therefore,an ArgumentNullException exception occurs.

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 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.

Error message when you try to restore a Windows SharePoint Services 3.0 Web site: “The site collection could not be restored. Please make sure the content databases are available and have suffici …

Symptoms
When you use the Stsadm.exe command-line tool to try to restore aMicrosoft Windows SharePoint Services 3.0 Web site on a computer that is runningWindows SharePoint Services 3.0, you receive the following error message:

The site collection could not be restored. If this problem persists, please make sure the content databases are available and have sufficient free space.
Resolution
This issue occurs if the computer that is running Windows SharePoint Services has insufficient free disk space that is available to host the restored Windows SharePoint Services Web site.This issue may also occur if the Windows SharePoint Services database has reached its maximum allowed size.

BUG: You receive a “The operation has timed-out” error message when you access a Web service or when you use the IPAddress class

Symptoms
In Microsoft Visual Studio .NET 2003, when you try to add a Web reference to a Web service, or when you call a Web service method, you may receive the following error message:

There was an error downloading ‘http://WebServerName/WebServicePath/WebServiceName’. The operation has timed-out.
Note WebServerName is a placeholder for the name of your Web server, WebServicePath is a placeholder for the path of the Web service, and WebServiceName is the name of the Web service.
In addition, when you use the IPAddress class, you may receive a “System.TypeInitializationException” exception. For example, when you use the Web Service Description Language tool (Wsdl.exe) to try to create a Web service proxy file, you may receive the following error message:

Unhandled Exception: System.TypeInitializationException: The type initializer for “System.Net.Sockets.Socket” threw an exception. —> System.Net.Sockets.SocketException: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full at System.Net.Sockets.Socket.InitializeSockets() at System.Net.Sockets.Socket..cctor()
Note You do not receive the previous error messages when you use Microsoft .NET Framework v1.0.
Resolution
When you install a protocol or a network adapter on your computer, the operating system creates a protocol binding between the network adapters and the protocols that are installed on your computer. Typically, a computer can store up to 50 protocol binding details. Therefore, if the number of protocol bindings exceeds 50, and you use the IPAddress class directly or indirectly (such as when you try to add a Web reference or when you call a Web service method), you receive the error messages that are mentioned in the “Symptoms” section of this article.
NotesThe operating system creates a protocol binding even for “phantom” (“ghosted”) adapters on your computer.
For additional information about phantom devices, click the following article number to view the article in the Microsoft Knowledge Base:
241257?(http://support.microsoft.com/kb/241257/) Device Manager Does Not Display Devices Not Currently Present in Windows 2000To determine the number of protocol bindings on your computer, run the enum.exe file.
The following file is available for download from the Microsoft Download Center:

Collapse this imageExpand this image
Download the enum.exe package now.(http://download.microsoft.com/download/9/3/0/930e1ecb-a6c6-445f-bd79-82fc3e66f009/enum.exe) For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591?(http://support.microsoft.com/kb/119591/) How to Obtain Microsoft Support Files from Online Services Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.