.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

error HRESULT E_FAIL has been returned from a call to a COM component

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :ASP.Net
hello every one i see this error some times when i designed the page and close the program and came back.but this error do not stop debugging the page and hide all controls is my page and i cant use smart tag and see the controls.what should i do?

View Complete Post

More Related Resource Links

Exception: Error HRESULT E_FAIL has been returned from a call to a COM component.


I have two small programs that I wrote in C# that are basically just executing calls to cuteFTP Pro 8 (a scriptable FTP client). 

Program #1: needs to connect to a remote server using standard FTP protocol.  This program works fine whether I run it or schedule it through the Windows Task Scheduler (Server 2003 Standard). 

Program #2:  needs to connect to a remote server using FTPS_IMPLICIT or FTPS, I've tried using either of these two protocols and the same result is produced.

If I run Program #2 on my user account while logged in to the server it works correctly, however if I schedule it through Windows Task Scheduler (in exactly the same fashion as Program #1) I get the COM error that I put in the thread title.  A stack trace shows that it happens


at ftpteLib.TEConnectionClass.Connect()

which is one of the cuteFTP methods.  For the sake of isolating the problem I removed most of the functional code in Program#1 and Program #2 so taht they are identical other than the fact that one connects to a remote server needing FTP and the other to one needing FTPS or FTPS_IMPLICIT.

Is there anything I can do to correct this?

Browsing a cube: Error HRESULT E_FAIL has been returned from a call to a COM component. (Microsoft V


When I try to reconnect using the cube browser (in both Visual Studio and SQL Management Studio) I get the following error:

Error HRESULT E_FAIL has been returned from a call to a COM component. (Microsoft Visual Studio)
Program Location:
   at Microsoft.Office.Interop.Owc11.PivotView.get_FieldSets()
   at Microsoft.AnalysisServices.Browse.CubeBrowser.TranslatePivotTable()
   at Microsoft.AnalysisServices.Browse.CubeBrowser.UpdatePivotTable(Boolean translate)
   at Microsoft.AnalysisServices.Browse.CubeBrowser.UpdateAll(Boolean translate)
   at Microsoft.AnalysisServices.Browse.CubeBrowser.ReconnectCanFail()
   at Microsoft.AnalysisServices.Browse.CubeBrowser.SupportFunctionWhichCanFail(FunctionWhichCanFail function)

And when I try to drag stuff from the measure group (the left panel) I get:

Error HRESULT E_FAIL has been returned from a call to a COM component. (Microsoft Visual Studio)
Program Location:
   at Microsoft.Office.Interop.Owc11.PivotView.get_FieldSets()
   at Microsoft.AnalysisServices.Controls.PivotTableHash.get_FieldSetsEnumerator()
   at Microsoft.AnalysisServices.Controls.PivotTableHash.GetFieldSet(String uniqueName)
   at Microsoft.AnalysisServices.Controls.PivotTableBoundMetadataBrowser.GetPiv

Error HRESULT E_Fail



I created a simple page calling the DateTime.Now.ToString on a page ran the page it came up eventually but then when I went back to my .net page there is an error:

Error Creating Control - Label1

Error HRESULT E_FAIL has been returned from a call to a COM component.

If I try to run the page again I get there is no problem but the error on the default.aspx page in design view still exists.

Generation of designer file failed: Error HRESULT E_FAIL


started getting error

Warning 1 Generation of designer file failed: Error HRESULT E_FAIL has been returned from a call to a COM component. 

i am not even able to see the designer file 

Error Registering COM+ Component

Hi All,

I am experimenting with using EnterpriseServices. I created a component, created the SNK file, compiled the DLL. In the assemblyinfo.vb file, I added '<Assembly: AssemblyKeyFile("c:\key.snk")> '.
I created a new package in COM+, When I attempt to add the .dll to the package i get:

An error occured while processeing the last operation.
Error Code 80020009 - Exception ocurred.

The eventlog may contain additional troubleshooting information.

Here is the Event log:

Installation of 'TransactionalComponentsCore.dll' into '{6367F5F1-56A7-4223-97AC-51F7DC1D53EB}' failed with an exception:

System.EnterpriseServices.RegistrationException: Could not install type library 'TransactionalComponentsCore.tlb' into application 'TransactionalComponentsCore'.

Server stack trace:
at System.EnterpriseServices.RegistrationDriver.InstallTypeLibrary_W2K(ApplicationSpec spec)
at System.EnterpriseServices.RegistrationDriver.InstallTypeLibrary(ApplicationSpec spec)
at System.EnterpriseServices.RegistrationDriver.InstallAssembly(RegistrationConfig regConfig, Object obSync)
at System.EnterpriseServices.RegistrationHelperTx.InstallAssemblyFromConfig(RegistrationConfig& regConfig, Object sync)
at Sys

Linq2Sql error: "Invalid attempt to call Read when reader is closed."


I've read up on this error from other posts and on other sites, but haven't found a solid resolution to the issue yet. My setup is as follows:

I have a RepositoryBase class that fields certain db calls that all repositories need to perform. In one such call, "GetSecurityGroup", it works most of the time, but will seemingly at random throw an exception with the error "Invalid attempt to call Read when reader is closed." All other Repository classes inherit from this one, and they all use the same DataContext object, which I understand isn't thread safe. Since there could be multiple calls to the DataContext object on the same page, perhaps one is using the DataContext when the next tries to do so. I'm not sure. What can I do to ensure this doesn't happen?

The remote server returned an error: (405) Method Not Allowed.



{System.Net.WebException: The remote server returned an error: (405) Method Not Allowed.
   at System.Net.WebClient.UploadFile(Uri address, String method, String fileName)
   at System.Net.WebClient.UploadFile(Uri address, String fileName)
   at System.Net.WebClient.UploadFile(String address, String fileName)
   at Test.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\WebSite1\Test.aspx.cs:line 35}

Windows application, automated process will run on local user system...
trying to upload a file to website folder. website address:

System.Net.WebClient wc = new WebClient();
wc.UploadFile(website address, "c:/1.pdf");

Getting error from above line.. Am doing something wrong??
I dont want to use ftp or share folder logic..
is there any other way to upload the files to server??

Microsoft .NET Framework 2.0SP1 (CBS): [2] Error: Installation failed for component Microsoft .NET F

I downloaded the the .Net Framework 3.5 from Microsoft and I am trying to install the .Net Framework 3.5 in a clean Windows Vista Ultimate installation but it fails. The dd_dotnetfx35error file shows:   [03/08/08,19:05:35] Microsoft .NET Framework 2.0SP1 (CBS): [2] Error: Installation failed for component Microsoft .NET Framework 2.0SP1 (CBS). MSI returned error code 1[03/08/08,19:05:46] WapUI: [2] DepCheck indicates Microsoft .NET Framework 2.0SP1 (CBS) is not installed. Thank you for your help.

[SSRS 2008 R2]Report Builder Access error-The remote server returned an error: (401) Unauthorized.

Hello,        I am able to login Web Service URL and report manager using computer name and report builder is also working fine.  http://RPTSRV/reportserver   (RPTSRV is report server name. web service url working fine. all accessible) http://RPTSRV/reports  (report manager working fine and all accessible ,report builder too) It means I am able to access everything locally right? http://rs.test.abc.com/reportserver  (web service url working fine. all accessible)  http://rs.test.abc.com/reports    (Report manager working fine and all accessible accept report builder)(I carefully checked the link and its taking rs.test.abc.com/reportserver.....)     when I click on reportbuilder button in report manager it shows me error dialog box with following error log!! I tried from local and remote computer too but gives the same error both side. I am not sure but I am just thinking is this double hop kerberos security issue? Please help me to solve this problem. I am finding solution from last 4 days. Reporting Service configuratin tool settings Web Serivice URL -  all set to default Report Manager URL - all set to default Environment - Distributed deployment Server1(report_srv) --Windows server 2003, Installed sql server 2008R2 reporting service,

Msg 15121, Level 16, State 10, XP_Cmdshell - A call to 'CreateProcessAsUser' failed with error cod

I have the XP_cmdshell issues for the past two days in SQL2005 SP2 environment. There is a domain account with sysadmin privilege. I have created a proxy account and gave the execute privilege for xp_cmdshell. If i try to run the following commmand EXEC master..xp_cmdshell 'dir *.txt' Msg 15121, Level 16, State 10, Procedure xp_cmdshell, Line 1 An error occurred during the execution of xp_cmdshell. A call to 'CreateProcessAsUser' failed with error code: '1314'. But if i give sysadmin priv and then i try to execute. It worked. I cant give sysadmin priv so i m using a proxy account. Whether any one have solution for it.

The remote server returned an error: (550) File unavailable (e.g., file not found, no access).

Hi.   I have read the other threads regarding this but they do not solve my problem. All i am trying to do is upload a file from the webserver onto another server via FTP. But i get the above error and am at my wits end as to why.   below is the code:   Dim fs As New FileStream("H:\Visual Studio 2005\Websites\Website1\testfile.txt", FileMode.Open) Dim filecontents(fs.Length) As Byte fs.Read(filecontents, 0, fs.Length)   Dim remotePath As String = "ftp://elonwactd.uk.ml.com/apps/files/IPBHVGTRADE/QA5/in/testfile.txt" Dim ftp As FtpWebRequest = FtpWebRequest.Create(remotePath) ftp.Credentials = New System.Net.NetworkCredential("user1", "passwd1") ftp.KeepAlive = False ftp.UseBinary = True   ' (have tried UploadFile as well instead of UploadFileWithUniqueName) ftp.Method = WebRequestMethods.Ftp.UploadFileWithUniqueName     fs.Close()   ftp.GetRequestStream.Write(filecontents, 0, filecontents.Length) ftp.GetRequestStream.Close() ftp.GetResponse.Close()     Below is the stack trace that i get. [WebException: The remote server returned an error: (550) File unavailable (e.g., file not found, no access).]   System.Net.FtpWebRequest.SyncRequestCallback(Object obj) +321   System.Net.FtpWebRequest.RequestCallback(Object obj) +19   System.Net.CommandStream.Abort(Exception e) +163   System.Net.FtpWebRequest.FinishRequestStage(RequestStage stage) +45

SharePoint ASPX Web Service Call Error

I have developed an ASPX page using VS2005. This page simply queries a SharePoint list through a WSS web service using CAML and takes the results and populates a DataTable and binds it to a DataView. The code works perfect using VS2005 but when I port it over to SharePoint I get the following error.Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.The call stack is as follows:[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]   System.Security.CodeAccessSecurityEngine.CheckNReturnSO(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 unrestrictedOverride, Int32 create) +0   System.Security.CodeAccessSecurityEngine.Assert(CodeAccessPermission cap, StackCrawlMark& stackMark) +79   System.Security.CodeAccessPermission.Assert() +37   Book2Physical.Requests.get_DataSource() +

Error in Script component in the Data Flow Task

Hi, I need a small help. This is what i require. I need to generate a auto increment number using script component and assign it to target column. use db1 go create table src (name varchar(10) ) insert into src select 'A' union all select 'B' union all select 'C'   create table trg (id int, name varchar(10) ) while loading the trg table, i need to generate a auto increment number and then load it to target. Finally, my trg table data should look as follows id name 1  A 2  B 3  C This is what i have done inside the package. step1 : declared a global variable "tmp" of int32 step2 : created a connection manager pointing to "db1" database step3 : drag n drop data flow task step : inside the data flow task , i have the following        OLEDB Source  (select name from src)           |        Script Component (i have added a new Output column "v_id" of int datatype in INPUTS AND OUTPUTS page)           |        OLEDB Destination In the Script page in Script component , in ReadWriteVariables | User::tmp, I have chose Visual Basic 2008 and clicked the EDit script and inside the Editor this and inisde the below routine i have added only two

Need an example of error in OLE DB Source component when source is Excel file.

I want an example of error (not truncation) in individual row or individual cell that can occur in OLE DB Source component when source is Excel file. I'm trying out Error Output of data task component.  I have already tried out Error Output of OLE DB Destination component.

Get xhr object in vb.net when error occured in ajax call using JQuery.

Hi Dude,   I have a big problem in Jquery ajax call. I am calling the web service whenever click the update button. I have a separate web service class, in which consist of few methods. When I calling the web service method, I have made the error handling and log the error information in db after that I have to override the "ex" that means error object to XMLHttpRequest. Is it possible to assign the sqlexception to ajax object (xhr) in vb.net? Please help me its much more useful for me.   Thank in advance.

Error: 'SubQuery Returned More than 1 Value'

I have some code that calls a stored procedure on SQL Server 2005 using the Microsoft JDBC driver 1.1.  The code normally works however, every once in a while an exception is thrown: Code Snippet com.microsoft.sqlserver.jdbc.SQLServerException: Subquery returned more than 1 value.  This is not permitted when the subquery follows =, !, <,<=, >, >=, or when the subquery is used as an expression.Generally, this has been resolved by restarting SQL Server 2005, but why is it showing up to being with?Stored Procedure: Code Snippet ALTER Procedure [dbo].[addRecord]@userID int,@itemID int,@info varchar(50),@comment varchar(50),@output int outputASDeclare @dateSubmitted datetimeset @dateSubmitted = getDate();--Insert the new record. THIS TABLE has an ID identity Primary Key --column that auto-increments.insert into RecordTable(UserPerson, Information, DateSubmitted)values (@userID, @info, @dateSubmitted);---Get the ID Assigned in the record table.  The Item table ---has a Foreign key on this column.Declare @assignedID  intset @assignedID = (select ID from RecordTable where DateSubmitted = @dateSubmitted)/**Set the output parameter.*/set @output = @assignedID;--Now update the Item Table.insert into Item (ID, RecordID, Comment)values (@item,@assignedID, @comment);

InvalidOperationException error with jquery call to webmethod

Hi, I'm having an issue which results in returning the following from XHR requests to an webmethod on my form. {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"}Simplified form Code is as follows. [WebMethod]        public string LoadContact()        {            return string.Format("Hello From Server");        }I'm using JQuery to make the call: $.ajax({            type: "POST",            url: "SYS_AjaxResearch.aspx/LoadContact",            data: "{}",            contentType: "application/json; charset=utf-8",            dataType: "json",            success: function(msg) {                $("#topPanel").text(msg.d.LoadContact);   
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend