473,397 Members | 1,950 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,397 software developers and data experts.

dsoFile Summary Updates in ASP.Net

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 (http://support.microsoft.com/?kbid=224351) and even
tried modifing it to make the changes to my local files and I get the same
error on both the original and the ASP.net version. Here is an example of my
code that's tring to make a change:

Private Sub btnAccept_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnAccept.Click
Dim oSummProps As DSOFile.SummaryProperties
Dim fi As New FileInfo(Session("sFile"))

m_oDocument = New DSOFile.OleDocumentPropertiesClass

Try
m_oDocument.Open(fi.FullName, False,
DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIf NoWriteAccess)
oSummProps = m_oDocument.SummaryProperties
oSummProps.Title = CType(mpHoriz.FindControl("txtTitle"),
TextBox).Text
oSummProps.Author = CType(mpHoriz.FindControl("txtAuthor"),
TextBox).Text
oSummProps.Subject = CType(mpHoriz.FindControl("txtSubject"),
TextBox).Text
oSummProps.Company = CType(mpHoriz.FindControl("txtCompany"),
TextBox).Text
oSummProps.Comments = CType(mpHoriz.FindControl("txtComments"),
TextBox).Text
m_oDocument.Save()
Catch ex As SystemException
Response.Write(ex.ToString)
Response.End()
Finally
m_oDocument.Close()
m_oDocument = Nothing
End Try
OpenDocumentProperties(fi)
End Sub

I've given Full Access rights to the folder where the changes are to be made
but that hasn't made a difference. But what's strange is that when I use the
modified demo application it should work for my local files but it also comes
up with the "Access Denied" error.

Is there something I'm missing?
Nov 19 '05 #1
3 1662
On Fri, 22 Jul 2005 07:21:03 -0700, "Bill Alexander" <Bi***********@discussions.microsoft.com>
wrote:

¤ 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 (http://support.microsoft.com/?kbid=224351) and even
¤ tried modifing it to make the changes to my local files and I get the same
¤ error on both the original and the ASP.net version. Here is an example of my
¤ code that's tring to make a change:
¤
¤ Private Sub btnAccept_Click(ByVal sender As Object, ByVal e As
¤ System.EventArgs) Handles btnAccept.Click
¤ Dim oSummProps As DSOFile.SummaryProperties
¤ Dim fi As New FileInfo(Session("sFile"))
¤
¤ m_oDocument = New DSOFile.OleDocumentPropertiesClass
¤
¤ Try
¤ m_oDocument.Open(fi.FullName, False,
¤ DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIf NoWriteAccess)
¤ oSummProps = m_oDocument.SummaryProperties
¤ oSummProps.Title = CType(mpHoriz.FindControl("txtTitle"),
¤ TextBox).Text
¤ oSummProps.Author = CType(mpHoriz.FindControl("txtAuthor"),
¤ TextBox).Text
¤ oSummProps.Subject = CType(mpHoriz.FindControl("txtSubject"),
¤ TextBox).Text
¤ oSummProps.Company = CType(mpHoriz.FindControl("txtCompany"),
¤ TextBox).Text
¤ oSummProps.Comments = CType(mpHoriz.FindControl("txtComments"),
¤ TextBox).Text
¤ m_oDocument.Save()
¤ Catch ex As SystemException
¤ Response.Write(ex.ToString)
¤ Response.End()
¤ Finally
¤ m_oDocument.Close()
¤ m_oDocument = Nothing
¤ End Try
¤ OpenDocumentProperties(fi)
¤ End Sub
¤
¤ I've given Full Access rights to the folder where the changes are to be made
¤ but that hasn't made a difference. But what's strange is that when I use the
¤ modified demo application it should work for my local files but it also comes
¤ up with the "Access Denied" error.
¤
¤ Is there something I'm missing?

What type of authentication are you using for your Web app? Are you implementing impersonation?

If you are not implementing impersonation have you provided sufficient permissions to the ASPNET
account?
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #2


"Paul Clement" wrote:
On Fri, 22 Jul 2005 07:21:03 -0700, "Bill Alexander" <Bi***********@discussions.microsoft.com>
wrote:

¤ 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 (http://support.microsoft.com/?kbid=224351) and even
¤ tried modifing it to make the changes to my local files and I get the same
¤ error on both the original and the ASP.net version. Here is an example of my
¤ code that's tring to make a change:
¤
¤ Private Sub btnAccept_Click(ByVal sender As Object, ByVal e As
¤ System.EventArgs) Handles btnAccept.Click
¤ Dim oSummProps As DSOFile.SummaryProperties
¤ Dim fi As New FileInfo(Session("sFile"))
¤
¤ m_oDocument = New DSOFile.OleDocumentPropertiesClass
¤
¤ Try
¤ m_oDocument.Open(fi.FullName, False,
¤ DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIf NoWriteAccess)
¤ oSummProps = m_oDocument.SummaryProperties
¤ oSummProps.Title = CType(mpHoriz.FindControl("txtTitle"),
¤ TextBox).Text
¤ oSummProps.Author = CType(mpHoriz.FindControl("txtAuthor"),
¤ TextBox).Text
¤ oSummProps.Subject = CType(mpHoriz.FindControl("txtSubject"),
¤ TextBox).Text
¤ oSummProps.Company = CType(mpHoriz.FindControl("txtCompany"),
¤ TextBox).Text
¤ oSummProps.Comments = CType(mpHoriz.FindControl("txtComments"),
¤ TextBox).Text
¤ m_oDocument.Save()
¤ Catch ex As SystemException
¤ Response.Write(ex.ToString)
¤ Response.End()
¤ Finally
¤ m_oDocument.Close()
¤ m_oDocument = Nothing
¤ End Try
¤ OpenDocumentProperties(fi)
¤ End Sub
¤
¤ I've given Full Access rights to the folder where the changes are to be made
¤ but that hasn't made a difference. But what's strange is that when I use the
¤ modified demo application it should work for my local files but it also comes
¤ up with the "Access Denied" error.
¤
¤ Is there something I'm missing?

What type of authentication are you using for your Web app? Are you implementing impersonation?

If you are not implementing impersonation have you provided sufficient permissions to the ASPNET
account?
Paul
~~~~
Microsoft MVP (Visual Basic)

Yes, I am implementing impersonation as shown in my web.config file:
<authentication mode="Windows" />
<identity impersonate="true" />

I have also set the IIS Service to Authenticate using only Basic
Authentication because it's going to a DFS virtual directory with NTFS
permissions set on each folder. But this is only accessing a directory on the
Web Server itself (as a testing are) that I have given Full Access to all
users.

Thanks,
Bill Alexander
Nov 19 '05 #3
On Fri, 22 Jul 2005 10:38:02 -0700, "Bill Alexander" <Bi***********@discussions.microsoft.com>
wrote:

¤ > ¤ 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 (http://support.microsoft.com/?kbid=224351) and even
¤ > ¤ tried modifing it to make the changes to my local files and I get the same
¤ > ¤ error on both the original and the ASP.net version. Here is an example of my
¤ > ¤ code that's tring to make a change:
¤ > ¤
¤ > ¤ Private Sub btnAccept_Click(ByVal sender As Object, ByVal e As
¤ > ¤ System.EventArgs) Handles btnAccept.Click
¤ > ¤ Dim oSummProps As DSOFile.SummaryProperties
¤ > ¤ Dim fi As New FileInfo(Session("sFile"))
¤ > ¤
¤ > ¤ m_oDocument = New DSOFile.OleDocumentPropertiesClass
¤ > ¤
¤ > ¤ Try
¤ > ¤ m_oDocument.Open(fi.FullName, False,
¤ > ¤ DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIf NoWriteAccess)
¤ > ¤ oSummProps = m_oDocument.SummaryProperties
¤ > ¤ oSummProps.Title = CType(mpHoriz.FindControl("txtTitle"),
¤ > ¤ TextBox).Text
¤ > ¤ oSummProps.Author = CType(mpHoriz.FindControl("txtAuthor"),
¤ > ¤ TextBox).Text
¤ > ¤ oSummProps.Subject = CType(mpHoriz.FindControl("txtSubject"),
¤ > ¤ TextBox).Text
¤ > ¤ oSummProps.Company = CType(mpHoriz.FindControl("txtCompany"),
¤ > ¤ TextBox).Text
¤ > ¤ oSummProps.Comments = CType(mpHoriz.FindControl("txtComments"),
¤ > ¤ TextBox).Text
¤ > ¤ m_oDocument.Save()
¤ > ¤ Catch ex As SystemException
¤ > ¤ Response.Write(ex.ToString)
¤ > ¤ Response.End()
¤ > ¤ Finally
¤ > ¤ m_oDocument.Close()
¤ > ¤ m_oDocument = Nothing
¤ > ¤ End Try
¤ > ¤ OpenDocumentProperties(fi)
¤ > ¤ End Sub
¤ > ¤
¤ > ¤ I've given Full Access rights to the folder where the changes are to be made
¤ > ¤ but that hasn't made a difference. But what's strange is that when I use the
¤ > ¤ modified demo application it should work for my local files but it also comes
¤ > ¤ up with the "Access Denied" error.
¤ > ¤
¤ > ¤ Is there something I'm missing?
¤ >
¤ > What type of authentication are you using for your Web app? Are you implementing impersonation?
¤ >
¤ > If you are not implementing impersonation have you provided sufficient permissions to the ASPNET
¤ > account?
¤ >
¤ >
¤ > Paul
¤ > ~~~~
¤ > Microsoft MVP (Visual Basic)
¤ >
¤ Yes, I am implementing impersonation as shown in my web.config file:
¤ <authentication mode="Windows" />
¤ <identity impersonate="true" />
¤
¤ I have also set the IIS Service to Authenticate using only Basic
¤ Authentication because it's going to a DFS virtual directory with NTFS
¤ permissions set on each folder. But this is only accessing a directory on the
¤ Web Server itself (as a testing are) that I have given Full Access to all
¤ users.
¤
¤ Thanks,
¤ Bill Alexander
I haven't used DFS before, so I'm not sure what kind of security issues there might be. Are you
specifying a physical path to the file when using the DSOFile component?
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #4

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

Similar topics

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...
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...
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...
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...
2
by: sanjay1983 | last post by:
Hi Everyone, I am stuck to access file properties using 'Interop.dsofile.dll'. I dont want registration of this assembly in system registry. I am using reflection to achive this, but at the time...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.