473,626 Members | 3,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to open file remotely

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(txtAttachm ent.Text), 1, -1)
Line 21: 'objStream.Open ("//Teklang1/ITRS_Testing/ITRS/Attachments/"
& Trim(txtAttachm ent.Text))
Line 22:

Source File: D:\ITRS_Testing \ITRS\EnquiryRe sult.aspx Line: 20

Stack Trace:

[COMException (0xc004800a): Exception from HRESULT: 0xC004800A]

Microsoft.Visua lBasic.Compiler Services.LateBi nding.InternalL ateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn) +776
Microsoft.Visua lBasic.Compiler Services.NewLat eBinding.LateCa ll(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
IgnoreReturn) +365640
ASP.itrs_enquir yresult_aspx.Vi ewDoc(Object Source, EventArgs E) in
D:\ITRS_Testing \ITRS\EnquiryRe sult.aspx:20
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +105
System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String eventArgument)
+107

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET
Version:2.0.507 27.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.

Feb 21 '06 #1
2 4230
One possibility is absolute paths are disabled in IIS.

Ask your web provider to go into IIS and enable this for you. Or code around
it. Go to IIS properties for the site and go to Home Directory. Click
"Configurat ion" and then "Options" and check "Absoulte paths" allowed.

Or better yet host with me and not have this issue.

(Just kidding.) :)
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Seok Bee" <se*****@yahoo. com> wrote in message
news:DC******** *************** ***********@mic rosoft.com...
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(txtAttachm ent.Text), 1, -1)
Line 21:
'objStream.Open ("//Teklang1/ITRS_Testing/ITRS/Attachments/"
& Trim(txtAttachm ent.Text))
Line 22:

Source File: D:\ITRS_Testing \ITRS\EnquiryRe sult.aspx Line: 20

Stack Trace:

[COMException (0xc004800a): Exception from HRESULT: 0xC004800A]

Microsoft.Visua lBasic.Compiler Services.LateBi nding.InternalL ateCall(Object
o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn) +776
Microsoft.Visua lBasic.Compiler Services.NewLat eBinding.LateCa ll(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
IgnoreReturn) +365640
ASP.itrs_enquir yresult_aspx.Vi ewDoc(Object Source, EventArgs E) in
D:\ITRS_Testing \ITRS\EnquiryRe sult.aspx:20
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +105
System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String
eventArgument)
+107

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42;
ASP.NET
Version:2.0.507 27.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.

Feb 21 '06 #2
These are not vb.net solutions. But they do work.

<%
Response.Buffer = True
Const adTypeBinary = 1
Const adReadAll = -1

Dim oStream
set oStream = server.CreateOb ject("ADODB.Str eam")
oStream.Type = 2
oStream.Charset = "ascii"
oStream.Open "URL=http://testserver/test/hello.htm", 1, -1

'Response.write oStream.State
'Response.End
'oStream.Read

'Response.Write oStream.Size
'Response.End

oStream.Positio n = 0
Response.Conten tType = "text/html"
Response.Write oStream.ReadTex t
oStream.close

%>

oR
<%
Set xml = Server.CreateOb ject("MSXML2.Se rverXMLHTTP")
url="http://www.myserver.co m/textFile.txt"
xml.Open "GET", url, true ' the True specifies an asynchronous request
Call xml.Send()
Response.write xml.Responsetex t

%>


oR

HTML>
<HEAD>
<script language=VBScri pt >

Dim objStream
Set objStream = CreateObject("A DODB.Stream")
objStream.Type = 1 ' adTypeBinary
' The following should be the absolute URL to the file on the server.....
objStream.Open ("URL=http://localhost/notepad.exe")
document.write "<CENTER>Loaded ...<BR>"
' This should be the full path and filename to save the file on the
client....
objStream.SaveT oFile "C:\TEMP\notepa d.exe", 2 ' adSaveCreateOve rWrite
document.write "saved..<BR >"
objStream.Close
Set objStream = Nothing
' Now we'll "run" the file....
Dim WshShell
Set WshShell =CreateObject(" WScript.Shell")
WshShell.Run ("c:\temp\notep ad.exe")
Set WsShell = Nothing

</script>
<TITLE>Downlo ad and Install Page</TITLE>
</HEAD>
<BODY>
DONE!</CENTER>
</BODY>
</HTML>
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Seok Bee" <se*****@yahoo. com> wrote in message
news:DC******** *************** ***********@mic rosoft.com...
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(txtAttachm ent.Text), 1, -1)
Line 21:
'objStream.Open ("//Teklang1/ITRS_Testing/ITRS/Attachments/"
& Trim(txtAttachm ent.Text))
Line 22:

Source File: D:\ITRS_Testing \ITRS\EnquiryRe sult.aspx Line: 20

Stack Trace:

[COMException (0xc004800a): Exception from HRESULT: 0xC004800A]

Microsoft.Visua lBasic.Compiler Services.LateBi nding.InternalL ateCall(Object
o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn) +776
Microsoft.Visua lBasic.Compiler Services.NewLat eBinding.LateCa ll(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
IgnoreReturn) +365640
ASP.itrs_enquir yresult_aspx.Vi ewDoc(Object Source, EventArgs E) in
D:\ITRS_Testing \ITRS\EnquiryRe sult.aspx:20
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +105
System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String
eventArgument)
+107

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42;
ASP.NET
Version:2.0.507 27.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.

Feb 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2385
by: Tom wilson | last post by:
I've been through everything with this error and cannot get the debugger to work remotely. The only thing I can trace it down to is that RPC is not communicating between servers. So after many, many hours of searching I found the RPCPing utilitty. We have 8 servers, 2 Exchange 2003 servers. RPCPing pings nothing from anywhere on all protocols. I've tried on all severs in all directions and from several different workstations. I...
3
4101
by: David N | last post by:
I got a solution that contains about 30 projects, three of which cannot be open. When I open the project, I always receive the error message "Unable to get the project file from the Web Server" My machine is running Windows 2003. My colleagues are using the same hardware and software as I do, but I am the only one running into this problem. I searched the Internet and see that quite a lot of people having the same problem in the...
2
1573
by: vince | last post by:
I installed the Portal Starter Kit (from www.asp.net) on a win 2003 server running IIS 6.0 and SQL Server 8.0, and it works fine using integrated authentication. However, I'm unable to open the portal project remotely from my development pc... when in vs.net I click File/Open/Project from Web, and I'm prompted to enter the URL of the server containing the project. After entering "http://myserver" it shows a listing of web projects, but...
3
2393
by: purkka | last post by:
Hi I replaced a Win 2000 Adv server to the Win 2003 Std with Front Page Server Extension and .Net Framework 2.0. FPSE is extended to Default Web Site. Visual Studio 2005: If I create a new web by VS2005 installed on my server, no problem, but if i try to do same remotely using http, I got "Unable to create the Web 'http://computer.aaa.com/MySite'. You are not authorized to perform the current operation."
6
3618
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a list of all of my webs, however if I attempt to open a site under and web other than localhost I receive the message: "Unable to open the Web 'http://localhost/anywebappname'. The Web 'http://localhost/anywebappname' does not exist" Obviously...
7
613
by: Jed | last post by:
I am trying to open web project in VS 2003 using the File Share method. VS is running on XP Pro (Host) and I am accessing the root web of an XP Pro install on Virtual PC (Server) running on the same machine. I have the loopback adapter running on the Host. The Host is sharing it's Internet connectivity with the loopback adapter and the Server is using the loopback it for Internet connectivity. All the networking stuff is working fine.
0
1102
by: Seok Bee | last post by:
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...
0
2157
by: Marc Melancon | last post by:
I have a situation where accessing perfmon counters remotely does not display the same list of Performance Objects remotely as it does when doing it from the host of SQL Server. From the host of SQL Server if I run perfmon.exe I will see performance objects for all instances of SQL Server running. I.E. all entries for default instance "SQLServer:....", all entries for non default instance like "MSSQL$.....". But If I run perfmon from...
0
12031
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in '/CinemaBookingSystem' Application. -------------------------------------------------------------------------------- ERROR General error Unable to open registry key 'Temporary (volatile) Jet DSN for process
0
8203
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2630
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1515
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.