Hello,
I am having some sort of security issue with my code. When I change a
file's title in a Windows or console app, I have no problems. (I am using
Microsoft's article & DsoFile.dll:
http://support.microsoft.com/default...b;en-us;224351)
When I run it in ASP.NET, I get a "file not found" exception, even though
the file does exist.
Here is what I have already tried within ASP.NET:
1. Launch the code in a console app in a separate process.
2. Launch the code as a web service...didn't think this would work since
it's under IIS's jurisdiction as well, but tried anyway.
3. Both of the above two options while impersonating an admin account.
4. Steps 1 and 2 after fully trusting the assemblies (meaning every assembly
in my solution).
Here is my code:
Dim oSummProps As DSOFile.SummaryProperties
Dim oCustProp As DSOFile.CustomProperty
Dim sFile, sTmp As String
Dim m_oDocument As DSOFile.OleDocumentPropertiesClass
m_oDocument = New DSOFile.OleDocumentPropertiesClass
' Note: fileName is just a local file...in this case, c:\test.txt.
m_oDocument.Open(fileName, False, _
DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIf NoWriteAccess)
If Not m_oDocument.IsReadOnly Then
oSummProps = m_oDocument.SummaryProperties
oSummProps.Title = myNewTitle
m_oDocument.Save()
End If
m_oDocument.Close()
m_oDocument = Nothing
Does anybody know what to do here?
Thank you!
Eric