Using DSOFile in ASP.Net???

  • Thread starter Thread starter Curtis Tammany
  • Start date Start date
C

Curtis Tammany

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.doc")
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
 
¤ 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.doc")
¤ 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 ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
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 said:
¤ 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:
 
¤ 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 ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Paul Clement said:
¤ 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 ~~~ (e-mail address removed)
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
 
¤ > ¤ 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 ~~~ (e-mail address removed)
¤ > 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 ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Paul Clement said:
¤ > ¤ 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 ~~~ (e-mail address removed)
¤ > 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 ~~~ (e-mail address removed)
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
 
¤
¤ ¤ > On Wed, 1 Oct 2003 17:26:09 -0400, "Curtis Tammany" <[email protected]>
¤ 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 ~~~ (e-mail address removed)
¤ > ¤ > 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 ~~~ (e-mail address removed)
¤ > 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 ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
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


 
¤ 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.ReleaseComObject(FilePropReader)
System.Runtime.InteropServices.Marshal.ReleaseComObject(FileProperties)


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Paul Clement said:
¤ 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.ReleaseComObject(FilePropReader)
System.Runtime.InteropServices.Marshal.ReleaseComObject(FileProperties)


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)


Great - I would have never found that!

Thanks for your help.
-Curtis
 
Curtis Tammany said:
Paul Clement said:
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>\<folder>\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,
 
On 15 Oct 2003 12:26:55 -0700, (e-mail address removed) (Nautilus) wrote:

¤ > ¤ > > On Mon, 6 Oct 2003 14:52:48 -0400, "Curtis Tammany" <[email protected]>
¤ > 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.ReleaseComObject(FilePropReader)
¤ > > System.Runtime.InteropServices.Marshal.ReleaseComObject(FileProperties)
¤ > >
¤ > >
¤ > > Paul ~~~ (e-mail address removed)
¤ > > 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>\<folder>\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 ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Paul Clement said:
On 15 Oct 2003 12:26:55 -0700, (e-mail address removed) (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>\<folder>\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 ~~~ (e-mail address removed)
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..
 
On 22 Oct 2003 11:07:16 -0700, (e-mail address removed) (Nautilus) wrote:

¤ > On 15 Oct 2003 12:26:55 -0700, (e-mail address removed) (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>\<folder>\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 ~~~ (e-mail address removed)
¤ > 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/freeware/procexp.shtml


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top