G
Guest
Dear Experts,
In my web application, I am having a button to open a file located in the
server. When I click on the button to view the file, I received the following
error message:
----------------------------------------------------------
Exception from HRESULT: 0xC004800A
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.Runtime.InteropServices.COMException: Exception
from HRESULT: 0xC004800A
Source Error:
Line 18: objStream.Type = 1 ' adTypeBinary
Line 19: ' The following should be the absolute URL to the file on
the server.....
Line 20:
objStream.Open("URL=http://Teklang1/ITRS_Testing/ITRS/Attachments/" &
Trim(txtAttachment.Text), 1, -1)
Line 21: 'objStream.Open("//Teklang1/ITRS_Testing/ITRS/Attachments/"
& Trim(txtAttachment.Text))
Line 22:
Source File: D:\ITRS_Testing\ITRS\EnquiryResult.aspx Line: 20
Stack Trace:
[COMException (0xc004800a): Exception from HRESULT: 0xC004800A]
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn) +776
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
IgnoreReturn) +365640
ASP.itrs_enquiryresult_aspx.ViewDoc(Object Source, EventArgs E) in
D:\ITRS_Testing\ITRS\EnquiryResult.aspx:20
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
+107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42
-----------------------------------------------------------------
The webserver is running on Windows 2000 sp4 and with .NET Framework 1.1,
1.1 sp1 and 2.0 being installed. This server is also running as Active
Directory. I have manually created a user named ASPNET and assigned full
control to the folder that contains my files.
May I know what is the possible solution to this problem? Please advise.
Thanks.
In my web application, I am having a button to open a file located in the
server. When I click on the button to view the file, I received the following
error message:
----------------------------------------------------------
Exception from HRESULT: 0xC004800A
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.Runtime.InteropServices.COMException: Exception
from HRESULT: 0xC004800A
Source Error:
Line 18: objStream.Type = 1 ' adTypeBinary
Line 19: ' The following should be the absolute URL to the file on
the server.....
Line 20:
objStream.Open("URL=http://Teklang1/ITRS_Testing/ITRS/Attachments/" &
Trim(txtAttachment.Text), 1, -1)
Line 21: 'objStream.Open("//Teklang1/ITRS_Testing/ITRS/Attachments/"
& Trim(txtAttachment.Text))
Line 22:
Source File: D:\ITRS_Testing\ITRS\EnquiryResult.aspx Line: 20
Stack Trace:
[COMException (0xc004800a): Exception from HRESULT: 0xC004800A]
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn) +776
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
IgnoreReturn) +365640
ASP.itrs_enquiryresult_aspx.ViewDoc(Object Source, EventArgs E) in
D:\ITRS_Testing\ITRS\EnquiryResult.aspx:20
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
+107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42
-----------------------------------------------------------------
The webserver is running on Windows 2000 sp4 and with .NET Framework 1.1,
1.1 sp1 and 2.0 being installed. This server is also running as Active
Directory. I have manually created a user named ASPNET and assigned full
control to the folder that contains my files.
May I know what is the possible solution to this problem? Please advise.
Thanks.