473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Using DSOFile in ASP.Net???

Hello-

Can someone tell me if DSOFile.dll can be accessed within ASP.NET?

DSOFile.dll is registered and I have no problem using it in my .ASP scripts. I have tried the following:

Dim oFilePropReader As DSOleFile.PropertyReader
Dim oFileProperties As oFilePropReader.GetDocumentProperties("C:\MyDoc.do c")
Response.write ("<table>" & vbCRLF)
Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title & "</td></tr>" & vbCRLF)
..
..
Response.write ("</table>" & vbCRLF)

All I get is Type 'DSOleFile.PropertyReader' is not defined.
Also - Why isn't the functionality of DSOFile built into the System.IO class????
Thanks-

Curtis


Jul 21 '05 #1
14 8663
On Fri, 26 Sep 2003 14:37:03 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:

¤ Hello-
¤
¤ Can someone tell me if DSOFile.dll can be accessed within ASP.NET?
¤
¤ DSOFile.dll is registered and I have no problem using it in my .ASP scripts. I have tried the following:
¤
¤ Dim oFilePropReader As DSOleFile.PropertyReader
¤ Dim oFileProperties As oFilePropReader.GetDocumentProperties("C:\MyDoc.do c")
¤ Response.write ("<table>" & vbCRLF)
¤ Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title & "</td></tr>" & vbCRLF)
¤ .
¤ .
¤ Response.write ("</table>" & vbCRLF)
¤
¤ All I get is Type 'DSOleFile.PropertyReader' is not defined.

You haven't instantiated any of your objects. In any event the following works for me:

Dim oFilePropReader As New DSOleFile.PropertyReader()
Dim oFileProperties As Object

oFileProperties = oFilePropReader.GetDocumentProperties("e:\My Documents\Product Rec
Guidelines.doc")
Console.WriteLine(oFileProperties.Title)
Console.WriteLine(oFileProperties.Author())
Console.WriteLine(oFileProperties.Comments)

oFileProperties = Nothing
oFilePropReader = Nothing

¤
¤ Also - Why isn't the functionality of DSOFile built into the System.IO class????

Don't know. I suppose they could have added an interface for structured storage files.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #2
I tried that and I still get the same error. I even tried coping dsofile.dll
to the bin folder but with no luck. Can something else be different??

Here is the complete file:

<%@ Page Language="VB" Debug="true" Trace = "false"%>

<%@ import namespace="System" %>

<%@ import namespace="System.IO" %>

<html>

<head>

<meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">

</head>

<body>

<%

Dim oFilePropReader As New DSOleFile.PropertyReader()

Dim oFileProperties As Object

oFileProperties =
oFilePropReader.GetDocumentProperties("C:\DATA\G20 \ServerOptions1.ppt")

Response.write ("<table>" & vbCRLF)

Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title &
"</td></tr>" & vbCRLF)

Response.write ("<tr><td><B>Author: </B></td><td>" & oFileProperties.Author
& "</td></tr>" & vbCRLF)

Response.write ("<tr><td><B>Application: </B></td><td>" &
oFileProperties.AppName & "</td></tr>" & vbCRLF)

Response.write ("</table>" & vbCRLF)

oFileProperties = Nothing

oFilePropReader = Nothing

%>

</body>

</html>

Curtis

"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:sa********************************@4ax.com...
On Fri, 26 Sep 2003 14:37:03 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:
¤ Hello-
¤
¤ Can someone tell me if DSOFile.dll can be accessed within ASP.NET?
¤
¤ DSOFile.dll is registered and I have no problem using it in my .ASP scripts. I have tried the following: ¤
¤ Dim oFilePropReader As DSOleFile.PropertyReader
¤ Dim oFileProperties As oFilePropReader.GetDocumentProperties("C:\MyDoc.do c") ¤ Response.write ("<table>" & vbCRLF)
¤ Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title & "</td></tr>" & vbCRLF) ¤ .
¤ .
¤ Response.write ("</table>" & vbCRLF)
¤
¤ All I get is Type 'DSOleFile.PropertyReader' is not defined.

You haven't instantiated any of your objects. In any event the following works for me:
Dim oFilePropReader As New DSOleFile.PropertyReader()
Dim oFileProperties As Object

oFileProperties = oFilePropReader.GetDocumentProperties("e:\My Documents\Product Rec Guidelines.doc")
Console.WriteLine(oFileProperties.Title)
Console.WriteLine(oFileProperties.Author())
Console.WriteLine(oFileProperties.Comments)

oFileProperties = Nothing
oFilePropReader = Nothing

¤
¤ Also - Why isn't the functionality of DSOFile built into the System.IO class????
Don't know. I suppose they could have added an interface for structured storage files.

Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)

Jul 21 '05 #3
On Mon, 29 Sep 2003 11:30:24 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:

¤ I tried that and I still get the same error. I even tried coping dsofile.dll
¤ to the bin folder but with no luck. Can something else be different??
¤
¤ Here is the complete file:
¤
¤ <%@ Page Language="VB" Debug="true" Trace = "false"%>
¤
¤ <%@ import namespace="System" %>
¤
¤ <%@ import namespace="System.IO" %>
¤
¤ <html>
¤
¤ <head>
¤
¤ <meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
¤
¤ </head>
¤
¤ <body>
¤
¤ <%
¤
¤ Dim oFilePropReader As New DSOleFile.PropertyReader()
¤
¤ Dim oFileProperties As Object
¤
¤ oFileProperties =
¤ oFilePropReader.GetDocumentProperties("C:\DATA\G20 \ServerOptions1.ppt")
¤
¤ Response.write ("<table>" & vbCRLF)
¤
¤ Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title &
¤ "</td></tr>" & vbCRLF)
¤
¤ Response.write ("<tr><td><B>Author: </B></td><td>" & oFileProperties.Author
¤ & "</td></tr>" & vbCRLF)
¤
¤ Response.write ("<tr><td><B>Application: </B></td><td>" &
¤ oFileProperties.AppName & "</td></tr>" & vbCRLF)
¤
¤ Response.write ("</table>" & vbCRLF)
¤
¤ oFileProperties = Nothing
¤
¤ oFilePropReader = Nothing
¤
¤ %>
¤
¤ </body>
¤
¤ </html>
¤

Did you register DSOFile.dll using Regsvr32.exe or another utility? It is a COM-based component and
needs to be registered before you can use it.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #4
"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:52********************************@4ax.com...
On Mon, 29 Sep 2003 11:30:24 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:
¤ I tried that and I still get the same error. I even tried coping dsofile.dll ¤ to the bin folder but with no luck. Can something else be different??
¤
¤ Here is the complete file:
¤
¤ <%@ Page Language="VB" Debug="true" Trace = "false"%>
¤
¤ <%@ import namespace="System" %>
¤
¤ <%@ import namespace="System.IO" %>
¤
¤ <html>
¤
¤ <head>
¤
¤ <meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
¤
¤ </head>
¤
¤ <body>
¤
¤ <%
¤
¤ Dim oFilePropReader As New DSOleFile.PropertyReader()
¤
¤ Dim oFileProperties As Object
¤
¤ oFileProperties =
¤ oFilePropReader.GetDocumentProperties("C:\DATA\G20 \ServerOptions1.ppt")
¤
¤ Response.write ("<table>" & vbCRLF)
¤
¤ Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title & ¤ "</td></tr>" & vbCRLF)
¤
¤ Response.write ("<tr><td><B>Author: </B></td><td>" & oFileProperties.Author ¤ & "</td></tr>" & vbCRLF)
¤
¤ Response.write ("<tr><td><B>Application: </B></td><td>" &
¤ oFileProperties.AppName & "</td></tr>" & vbCRLF)
¤
¤ Response.write ("</table>" & vbCRLF)
¤
¤ oFileProperties = Nothing
¤
¤ oFilePropReader = Nothing
¤
¤ %>
¤
¤ </body>
¤
¤ </html>
¤

Did you register DSOFile.dll using Regsvr32.exe or another utility? It is a COM-based component and needs to be registered before you can use it.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


DSOFile.dll was registered with regsvr32. I have been using it in my ASP
pages without any problems...
For .NET, would DSOFile.dll also need to be located in the BIN folder of my
web app?

Curtis
Jul 21 '05 #5
On Wed, 1 Oct 2003 17:26:09 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:
¤ > ¤ I tried that and I still get the same error. I even tried coping
¤ dsofile.dll
¤ > ¤ to the bin folder but with no luck. Can something else be different??
¤ > ¤
¤ > ¤ Here is the complete file:
¤ > ¤
¤ > ¤ <%@ Page Language="VB" Debug="true" Trace = "false"%>
¤ > ¤
¤ > ¤ <%@ import namespace="System" %>
¤ > ¤
¤ > ¤ <%@ import namespace="System.IO" %>
¤ > ¤
¤ > ¤ <html>
¤ > ¤
¤ > ¤ <head>
¤ > ¤
¤ > ¤ <meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
¤ > ¤
¤ > ¤ </head>
¤ > ¤
¤ > ¤ <body>
¤ > ¤
¤ > ¤ <%
¤ > ¤
¤ > ¤ Dim oFilePropReader As New DSOleFile.PropertyReader()
¤ > ¤
¤ > ¤ Dim oFileProperties As Object
¤ > ¤
¤ > ¤ oFileProperties =
¤ > ¤ oFilePropReader.GetDocumentProperties("C:\DATA\G20 \ServerOptions1.ppt")
¤ > ¤
¤ > ¤ Response.write ("<table>" & vbCRLF)
¤ > ¤
¤ > ¤ Response.write ("<tr><td><B>Title: </B></td><td>" &
¤ oFileProperties.Title &
¤ > ¤ "</td></tr>" & vbCRLF)
¤ > ¤
¤ > ¤ Response.write ("<tr><td><B>Author: </B></td><td>" &
¤ oFileProperties.Author
¤ > ¤ & "</td></tr>" & vbCRLF)
¤ > ¤
¤ > ¤ Response.write ("<tr><td><B>Application: </B></td><td>" &
¤ > ¤ oFileProperties.AppName & "</td></tr>" & vbCRLF)
¤ > ¤
¤ > ¤ Response.write ("</table>" & vbCRLF)
¤ > ¤
¤ > ¤ oFileProperties = Nothing
¤ > ¤
¤ > ¤ oFilePropReader = Nothing
¤ > ¤
¤ > ¤ %>
¤ > ¤
¤ > ¤ </body>
¤ > ¤
¤ > ¤ </html>
¤ > ¤
¤ >
¤ > Did you register DSOFile.dll using Regsvr32.exe or another utility? It is
¤ a COM-based component and
¤ > needs to be registered before you can use it.
¤ >
¤ >
¤ > Paul ~~~ pc******@ameritech.net
¤ > Microsoft MVP (Visual Basic)
¤
¤ DSOFile.dll was registered with regsvr32. I have been using it in my ASP
¤ pages without any problems...
¤ For .NET, would DSOFile.dll also need to be located in the BIN folder of my
¤ web app?

No location shouldn't matter as long as it is registered, but I think you might need the interop
assembly that was created for it (Interop.DSOleFile) when you distribute the application. Are you
having this problem on your development machine or your web server? I'm assuming you added it as a
COM reference in your project?
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #6

"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:4i********************************@4ax.com...
On Wed, 1 Oct 2003 17:26:09 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:

¤ > ¤ I tried that and I still get the same error. I even tried coping
¤ dsofile.dll
¤ > ¤ to the bin folder but with no luck. Can something else be different?? ¤ > ¤
¤ > ¤ Here is the complete file:
¤ > ¤
¤ > ¤ <%@ Page Language="VB" Debug="true" Trace = "false"%>
¤ > ¤
¤ > ¤ <%@ import namespace="System" %>
¤ > ¤
¤ > ¤ <%@ import namespace="System.IO" %>
¤ > ¤
¤ > ¤ <html>
¤ > ¤
¤ > ¤ <head>
¤ > ¤
¤ > ¤ <meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
¤ > ¤
¤ > ¤ </head>
¤ > ¤
¤ > ¤ <body>
¤ > ¤
¤ > ¤ <%
¤ > ¤
¤ > ¤ Dim oFilePropReader As New DSOleFile.PropertyReader()
¤ > ¤
¤ > ¤ Dim oFileProperties As Object
¤ > ¤
¤ > ¤ oFileProperties =
¤ > ¤ oFilePropReader.GetDocumentProperties("C:\DATA\G20 \ServerOptions1.ppt") ¤ > ¤
¤ > ¤ Response.write ("<table>" & vbCRLF)
¤ > ¤
¤ > ¤ Response.write ("<tr><td><B>Title: </B></td><td>" &
¤ oFileProperties.Title &
¤ > ¤ "</td></tr>" & vbCRLF)
¤ > ¤
¤ > ¤ Response.write ("<tr><td><B>Author: </B></td><td>" &
¤ oFileProperties.Author
¤ > ¤ & "</td></tr>" & vbCRLF)
¤ > ¤
¤ > ¤ Response.write ("<tr><td><B>Application: </B></td><td>" &
¤ > ¤ oFileProperties.AppName & "</td></tr>" & vbCRLF)
¤ > ¤
¤ > ¤ Response.write ("</table>" & vbCRLF)
¤ > ¤
¤ > ¤ oFileProperties = Nothing
¤ > ¤
¤ > ¤ oFilePropReader = Nothing
¤ > ¤
¤ > ¤ %>
¤ > ¤
¤ > ¤ </body>
¤ > ¤
¤ > ¤ </html>
¤ > ¤
¤ >
¤ > Did you register DSOFile.dll using Regsvr32.exe or another utility? It is ¤ a COM-based component and
¤ > needs to be registered before you can use it.
¤ >
¤ >
¤ > Paul ~~~ pc******@ameritech.net
¤ > Microsoft MVP (Visual Basic)
¤
¤ DSOFile.dll was registered with regsvr32. I have been using it in my ASP
¤ pages without any problems...
¤ For .NET, would DSOFile.dll also need to be located in the BIN folder of my ¤ web app?

No location shouldn't matter as long as it is registered, but I think you might need the interop assembly that was created for it (Interop.DSOleFile) when you distribute the application. Are you having this problem on your development machine or your web server? I'm assuming you added it as a COM reference in your project?
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


Right now it is only on my development machine. I haven't created a project-
just that aspx file above. Do I have to make a project just to get this to
work??

Curtis
Jul 21 '05 #7
On Fri, 3 Oct 2003 11:04:42 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:

¤
¤ "Paul Clement" <Us***********************@swspectrum.com> wrote in message
¤ news:4i********************************@4ax.com...
¤ > On Wed, 1 Oct 2003 17:26:09 -0400, "Curtis Tammany" <ct******@egginc.com>
¤ wrote:
¤ >
¤ >
¤ > ¤ > ¤ I tried that and I still get the same error. I even tried coping
¤ > ¤ dsofile.dll
¤ > ¤ > ¤ to the bin folder but with no luck. Can something else be
¤ different??
¤ > ¤ > ¤
¤ > ¤ > ¤ Here is the complete file:
¤ > ¤ > ¤
¤ > ¤ > ¤ <%@ Page Language="VB" Debug="true" Trace = "false"%>
¤ > ¤ > ¤
¤ > ¤ > ¤ <%@ import namespace="System" %>
¤ > ¤ > ¤
¤ > ¤ > ¤ <%@ import namespace="System.IO" %>
¤ > ¤ > ¤
¤ > ¤ > ¤ <html>
¤ > ¤ > ¤
¤ > ¤ > ¤ <head>
¤ > ¤ > ¤
¤ > ¤ > ¤ <meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
¤ > ¤ > ¤
¤ > ¤ > ¤ </head>
¤ > ¤ > ¤
¤ > ¤ > ¤ <body>
¤ > ¤ > ¤
¤ > ¤ > ¤ <%
¤ > ¤ > ¤
¤ > ¤ > ¤ Dim oFilePropReader As New DSOleFile.PropertyReader()
¤ > ¤ > ¤
¤ > ¤ > ¤ Dim oFileProperties As Object
¤ > ¤ > ¤
¤ > ¤ > ¤ oFileProperties =
¤ > ¤ > ¤
¤ oFilePropReader.GetDocumentProperties("C:\DATA\G20 \ServerOptions1.ppt")
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("<table>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("<tr><td><B>Title: </B></td><td>" &
¤ > ¤ oFileProperties.Title &
¤ > ¤ > ¤ "</td></tr>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("<tr><td><B>Author: </B></td><td>" &
¤ > ¤ oFileProperties.Author
¤ > ¤ > ¤ & "</td></tr>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("<tr><td><B>Application: </B></td><td>" &
¤ > ¤ > ¤ oFileProperties.AppName & "</td></tr>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("</table>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ oFileProperties = Nothing
¤ > ¤ > ¤
¤ > ¤ > ¤ oFilePropReader = Nothing
¤ > ¤ > ¤
¤ > ¤ > ¤ %>
¤ > ¤ > ¤
¤ > ¤ > ¤ </body>
¤ > ¤ > ¤
¤ > ¤ > ¤ </html>
¤ > ¤ > ¤
¤ > ¤ >
¤ > ¤ > Did you register DSOFile.dll using Regsvr32.exe or another utility? It
¤ is
¤ > ¤ a COM-based component and
¤ > ¤ > needs to be registered before you can use it.
¤ > ¤ >
¤ > ¤ >
¤ > ¤ > Paul ~~~ pc******@ameritech.net
¤ > ¤ > Microsoft MVP (Visual Basic)
¤ > ¤
¤ > ¤ DSOFile.dll was registered with regsvr32. I have been using it in my ASP
¤ > ¤ pages without any problems...
¤ > ¤ For .NET, would DSOFile.dll also need to be located in the BIN folder of
¤ my
¤ > ¤ web app?
¤ >
¤ > No location shouldn't matter as long as it is registered, but I think you
¤ might need the interop
¤ > assembly that was created for it (Interop.DSOleFile) when you distribute
¤ the application. Are you
¤ > having this problem on your development machine or your web server? I'm
¤ assuming you added it as a
¤ > COM reference in your project?
¤ >
¤ >
¤ > Paul ~~~ pc******@ameritech.net
¤ > Microsoft MVP (Visual Basic)
¤
¤ Right now it is only on my development machine. I haven't created a project-
¤ just that aspx file above. Do I have to make a project just to get this to
¤ work??

You don't have to create a project but then you will need to late bind on the DSOFile objects:

'Declare as late bound object
Dim FilePropReader As Object
Dim FileProperties As Object
'Create instance of late bound object
FilePropReader = CreateObject("DSOleFile.PropertyReader")

FileProperties = FilePropReader.GetDocumentProperties("e:\My Documents\Product Rec
Guidelines.doc")
Console.WriteLine(FileProperties.Title)
Console.WriteLine(FileProperties.Author())
Console.WriteLine(FileProperties.Comments)

FileProperties = Nothing
FilePropReader = Nothing
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #8
OK- THAT WORKED!
Next Problem - It doesn't seem to release the file- when I reload, I get the
following error: "System.Runtime.InteropServices.COMException: A share
violation has occurred"

Any Ideas?

Thanks- Curtis
"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:pm********************************@4ax.com...
On Fri, 3 Oct 2003 11:04:42 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:
¤
¤ "Paul Clement" <Us***********************@swspectrum.com> wrote in message ¤ news:4i********************************@4ax.com...
¤ > On Wed, 1 Oct 2003 17:26:09 -0400, "Curtis Tammany" <ct******@egginc.com> ¤ wrote:
¤ >
¤ >
¤ > ¤ > ¤ I tried that and I still get the same error. I even tried coping
¤ > ¤ dsofile.dll
¤ > ¤ > ¤ to the bin folder but with no luck. Can something else be
¤ different??
¤ > ¤ > ¤
¤ > ¤ > ¤ Here is the complete file:
¤ > ¤ > ¤
¤ > ¤ > ¤ <%@ Page Language="VB" Debug="true" Trace = "false"%>
¤ > ¤ > ¤
¤ > ¤ > ¤ <%@ import namespace="System" %>
¤ > ¤ > ¤
¤ > ¤ > ¤ <%@ import namespace="System.IO" %>
¤ > ¤ > ¤
¤ > ¤ > ¤ <html>
¤ > ¤ > ¤
¤ > ¤ > ¤ <head>
¤ > ¤ > ¤
¤ > ¤ > ¤ <meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0"> ¤ > ¤ > ¤
¤ > ¤ > ¤ </head>
¤ > ¤ > ¤
¤ > ¤ > ¤ <body>
¤ > ¤ > ¤
¤ > ¤ > ¤ <%
¤ > ¤ > ¤
¤ > ¤ > ¤ Dim oFilePropReader As New DSOleFile.PropertyReader()
¤ > ¤ > ¤
¤ > ¤ > ¤ Dim oFileProperties As Object
¤ > ¤ > ¤
¤ > ¤ > ¤ oFileProperties =
¤ > ¤ > ¤
¤ oFilePropReader.GetDocumentProperties("C:\DATA\G20 \ServerOptions1.ppt")
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("<table>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("<tr><td><B>Title: </B></td><td>" &
¤ > ¤ oFileProperties.Title &
¤ > ¤ > ¤ "</td></tr>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("<tr><td><B>Author: </B></td><td>" &
¤ > ¤ oFileProperties.Author
¤ > ¤ > ¤ & "</td></tr>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("<tr><td><B>Application: </B></td><td>" &
¤ > ¤ > ¤ oFileProperties.AppName & "</td></tr>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ Response.write ("</table>" & vbCRLF)
¤ > ¤ > ¤
¤ > ¤ > ¤ oFileProperties = Nothing
¤ > ¤ > ¤
¤ > ¤ > ¤ oFilePropReader = Nothing
¤ > ¤ > ¤
¤ > ¤ > ¤ %>
¤ > ¤ > ¤
¤ > ¤ > ¤ </body>
¤ > ¤ > ¤
¤ > ¤ > ¤ </html>
¤ > ¤ > ¤
¤ > ¤ >
¤ > ¤ > Did you register DSOFile.dll using Regsvr32.exe or another utility? It ¤ is
¤ > ¤ a COM-based component and
¤ > ¤ > needs to be registered before you can use it.
¤ > ¤ >
¤ > ¤ >
¤ > ¤ > Paul ~~~ pc******@ameritech.net
¤ > ¤ > Microsoft MVP (Visual Basic)
¤ > ¤
¤ > ¤ DSOFile.dll was registered with regsvr32. I have been using it in my ASP ¤ > ¤ pages without any problems...
¤ > ¤ For .NET, would DSOFile.dll also need to be located in the BIN folder of ¤ my
¤ > ¤ web app?
¤ >
¤ > No location shouldn't matter as long as it is registered, but I think you ¤ might need the interop
¤ > assembly that was created for it (Interop.DSOleFile) when you distribute ¤ the application. Are you
¤ > having this problem on your development machine or your web server? I'm ¤ assuming you added it as a
¤ > COM reference in your project?
¤ >
¤ >
¤ > Paul ~~~ pc******@ameritech.net
¤ > Microsoft MVP (Visual Basic)
¤
¤ Right now it is only on my development machine. I haven't created a project- ¤ just that aspx file above. Do I have to make a project just to get this to ¤ work??

You don't have to create a project but then you will need to late bind on the DSOFile objects:
'Declare as late bound object
Dim FilePropReader As Object
Dim FileProperties As Object
'Create instance of late bound object
FilePropReader = CreateObject("DSOleFile.PropertyReader")

FileProperties = FilePropReader.GetDocumentProperties("e:\My Documents\Product Rec Guidelines.doc")
Console.WriteLine(FileProperties.Title)
Console.WriteLine(FileProperties.Author())
Console.WriteLine(FileProperties.Comments)

FileProperties = Nothing
FilePropReader = Nothing
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)

Jul 21 '05 #9
On Mon, 6 Oct 2003 14:52:48 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:

¤ OK- THAT WORKED!
¤ Next Problem - It doesn't seem to release the file- when I reload, I get the
¤ following error: "System.Runtime.InteropServices.COMException: A share
¤ violation has occurred"

Try releasing the DSOFile objects after retrieving the properties from a document:

System.Runtime.InteropServices.Marshal.ReleaseComO bject(FilePropReader)
System.Runtime.InteropServices.Marshal.ReleaseComO bject(FileProperties)
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #10

"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:8i********************************@4ax.com...
On Mon, 6 Oct 2003 14:52:48 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:
¤ OK- THAT WORKED!
¤ Next Problem - It doesn't seem to release the file- when I reload, I get the ¤ following error: "System.Runtime.InteropServices.COMException: A share
¤ violation has occurred"

Try releasing the DSOFile objects after retrieving the properties from a document:
System.Runtime.InteropServices.Marshal.ReleaseComO bject(FilePropReader)
System.Runtime.InteropServices.Marshal.ReleaseComO bject(FileProperties)
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)

Great - I would have never found that!

Thanks for your help.
-Curtis
Jul 21 '05 #11
"Curtis Tammany" <ct******@egginc.com> wrote in message news:<#G**************@TK2MSFTNGP10.phx.gbl>...
"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:8i********************************@4ax.com...
On Mon, 6 Oct 2003 14:52:48 -0400, "Curtis Tammany" <ct******@egginc.com>

wrote:

¤ OK- THAT WORKED!
¤ Next Problem - It doesn't seem to release the file- when I reload, I get

the
¤ following error: "System.Runtime.InteropServices.COMException: A share
¤ violation has occurred"

Try releasing the DSOFile objects after retrieving the properties from a

document:

System.Runtime.InteropServices.Marshal.ReleaseComO bject(FilePropReader)
System.Runtime.InteropServices.Marshal.ReleaseComO bject(FileProperties)
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)

Great - I would have never found that!

Thanks for your help.
-Curtis


Hi,
I am also using the DSOFile.dll in my ASP.Net application but when i
try to provide the
filename to DSOFile control as
docProps = propReader.GetDocumentProperties(\\<machine>\<fold er>\file)
it does not read it. When I provide the local
machine drive(like E:\Folder\file), it works fine but with
network folder, I get the error: Exception from HRESULT:
0x80030002 (STG_E_FILENOTFOUND).
Can some please tell me how to resolve this issue?
.. I am able to generate a list of files from the network drive using
the DirectoryInfo class (had to add <impersonate identity="true" in
web.config to read the network drive)
Can you please tell me if we can read the doc properties from network
drive?
Thanks,
Jul 21 '05 #12
On 15 Oct 2003 12:26:55 -0700, na**********@yahoo.com (Nautilus) wrote:

¤ "Curtis Tammany" <ct******@egginc.com> wrote in message news:<#G**************@TK2MSFTNGP10.phx.gbl>...
¤ > "Paul Clement" <Us***********************@swspectrum.com> wrote in message
¤ > news:8i********************************@4ax.com...
¤ > > On Mon, 6 Oct 2003 14:52:48 -0400, "Curtis Tammany" <ct******@egginc.com>
¤ > wrote:
¤ > >
¤ > > ¤ OK- THAT WORKED!
¤ > > ¤ Next Problem - It doesn't seem to release the file- when I reload, I get
¤ > the
¤ > > ¤ following error: "System.Runtime.InteropServices.COMException: A share
¤ > > ¤ violation has occurred"
¤ > >
¤ > > Try releasing the DSOFile objects after retrieving the properties from a
¤ > document:
¤ > >
¤ > > System.Runtime.InteropServices.Marshal.ReleaseComO bject(FilePropReader)
¤ > > System.Runtime.InteropServices.Marshal.ReleaseComO bject(FileProperties)
¤ > >
¤ > >
¤ > > Paul ~~~ pc******@ameritech.net
¤ > > Microsoft MVP (Visual Basic)
¤ >
¤ >
¤ > Great - I would have never found that!
¤ >
¤ > Thanks for your help.
¤ > -Curtis
¤
¤ Hi,
¤ I am also using the DSOFile.dll in my ASP.Net application but when i
¤ try to provide the
¤ filename to DSOFile control as
¤ docProps = propReader.GetDocumentProperties(\\<machine>\<fold er>\file)
¤ it does not read it. When I provide the local
¤ machine drive(like E:\Folder\file), it works fine but with
¤ network folder, I get the error: Exception from HRESULT:
¤ 0x80030002 (STG_E_FILENOTFOUND).
¤ Can some please tell me how to resolve this issue?
¤ . I am able to generate a list of files from the network drive using
¤ the DirectoryInfo class (had to add <impersonate identity="true" in
¤ web.config to read the network drive)
¤ Can you please tell me if we can read the doc properties from network
¤ drive?
¤ Thanks,

I think the UNC path should work, however, the account under which the ASP application is running
must have read permissions to the UNC resource. If you need to supply a user ID and password when
you create the mapped drive resource then this is likely the problem.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #13
Paul Clement <Us***********************@swspectrum.com> wrote in message news:<ch********************************@4ax.com>. ..
On 15 Oct 2003 12:26:55 -0700, na**********@yahoo.com (Nautilus) wrote:

¤ Hi,
¤ I am also using the DSOFile.dll in my ASP.Net application but when i
¤ try to provide the
¤ filename to DSOFile control as
¤ docProps = propReader.GetDocumentProperties(\\<machine>\<fold er>\file)
¤ it does not read it. When I provide the local
¤ machine drive(like E:\Folder\file), it works fine but with
¤ network folder, I get the error: Exception from HRESULT:
¤ 0x80030002 (STG_E_FILENOTFOUND).
¤ Can some please tell me how to resolve this issue?
¤ . I am able to generate a list of files from the network drive using
¤ the DirectoryInfo class (had to add <impersonate identity="true" in
¤ web.config to read the network drive)
¤ Can you please tell me if we can read the doc properties from network
¤ drive?
¤ Thanks,

I think the UNC path should work, however, the account under which the ASP application is running
must have read permissions to the UNC resource. If you need to supply a user ID and password when
you create the mapped drive resource then this is likely the problem.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


Thanks Paul, I have mapped the drive on which "everyone" has read
permissions. It maps the drive using the windows logon information
which will be my domain account and thus does not prompt for un/pwd.
I am able to generate a list of files from this mapped drive using the
DirectoryInfo class of .Net, so the application reads the drive. But,
the DSOFile control does not read the file. I think the DSOfile works
in Windows shell namespace and cannot utilize the ASP.Net application
identity, but i am not sure..
Jul 21 '05 #14
On 22 Oct 2003 11:07:16 -0700, na**********@yahoo.com (Nautilus) wrote:

¤ Paul Clement <Us***********************@swspectrum.com> wrote in message news:<ch********************************@4ax.com>. ..
¤ > On 15 Oct 2003 12:26:55 -0700, na**********@yahoo.com (Nautilus) wrote:
¤ >
¤ > ¤ Hi,
¤ > ¤ I am also using the DSOFile.dll in my ASP.Net application but when i
¤ > ¤ try to provide the
¤ > ¤ filename to DSOFile control as
¤ > ¤ docProps = propReader.GetDocumentProperties(\\<machine>\<fold er>\file)
¤ > ¤ it does not read it. When I provide the local
¤ > ¤ machine drive(like E:\Folder\file), it works fine but with
¤ > ¤ network folder, I get the error: Exception from HRESULT:
¤ > ¤ 0x80030002 (STG_E_FILENOTFOUND).
¤ > ¤ Can some please tell me how to resolve this issue?
¤ > ¤ . I am able to generate a list of files from the network drive using
¤ > ¤ the DirectoryInfo class (had to add <impersonate identity="true" in
¤ > ¤ web.config to read the network drive)
¤ > ¤ Can you please tell me if we can read the doc properties from network
¤ > ¤ drive?
¤ > ¤ Thanks,
¤ >
¤ > I think the UNC path should work, however, the account under which the ASP application is running
¤ > must have read permissions to the UNC resource. If you need to supply a user ID and password when
¤ > you create the mapped drive resource then this is likely the problem.
¤ >
¤ >
¤ > Paul ~~~ pc******@ameritech.net
¤ > Microsoft MVP (Visual Basic)
¤
¤ Thanks Paul, I have mapped the drive on which "everyone" has read
¤ permissions. It maps the drive using the windows logon information
¤ which will be my domain account and thus does not prompt for un/pwd.
¤ I am able to generate a list of files from this mapped drive using the
¤ DirectoryInfo class of .Net, so the application reads the drive. But,
¤ the DSOFile control does not read the file. I think the DSOfile works
¤ in Windows shell namespace and cannot utilize the ASP.Net application
¤ identity, but i am not sure..

You might want to try the Process Explorer utility to see where DSOFile is being loaded:
http://www.sysinternals.com/ntw2k/fr.../procexp.shtml
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #15

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

Similar topics

0
by: Curtis Tammany | last post by:
To Microsoft: For the next release of .NET framework, can you please include the functionality of DSOFile.dll??? Trying to implement DSOFile in .NET and get all the extended properties...
0
by: Do | last post by:
Hi, I can use DSOFile correctly to pull Word, Excel, and Powerpoint properties. Can't pull Visio and Access properties. Is this normal? Do
3
by: Bill Alexander | last post by:
I'm having trouble with updating general fields (Title, Autor Suject, etc.) in the summary of documents located on our Intranet. I've downloaded the FilePropDemoVB7 example...
0
by: Don | last post by:
Hi, Anyone have any quick ideas as to why we can write extended file properties with dsofile.dll to all sorts of file formats - but not XML? Even in Word 2003, when I save as DOC extended...
4
by: Paul Bromley | last post by:
I have been pondering over this one all night!! I want to read the properties of a Word document WITHOUT opening it - notably the title document. Having read the newsgroups it seems that I neede to...
14
by: Curtis Tammany | last post by:
Hello- Can someone tell me if DSOFile.dll can be accessed within ASP.NET? DSOFile.dll is registered and I have no problem using it in my .ASP scripts. I have tried the following: Dim...
0
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Has anyone had any success getting DSOfile working with a windows 2003 Server? I know it isn't listed as being supported, but had hoped it would work. When it runs I get empty strings returned...
3
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
0
by: aschurg | last post by:
This post is in regard to archived discussion: http://www.thescripts.com/forum/thread103110.html Here is important information about dsofile.dll from an ASP.NET 2.0 application with regard to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.