<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED) in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241091#M6225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I try to open a map from either my computer or from a shared folder on a server with IApplication, I got an error showed as "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)" .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is what I did. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private IApplication pParentApp; (Get this object from class constructor)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private String strPath = "C:\\Documents and Settings\My Documents\MyMap.mxd";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pParentApp.pParentApp.OpenDocument(strPath);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It worked before but not now.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can manually open the mxd by click on the file name with no problem.&amp;nbsp; I think (or guess) when I manually open it, system sees me as my log_in name, but when the above codes running, it may see the user as ArcObject or something as suspicious user. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Our system security might changed recently thats why it worked before but not anymore (again my guess).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea? any thought?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Aug 2010 16:57:01 GMT</pubDate>
    <dc:creator>SamLuo</dc:creator>
    <dc:date>2010-08-17T16:57:01Z</dc:date>
    <item>
      <title>Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241091#M6225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I try to open a map from either my computer or from a shared folder on a server with IApplication, I got an error showed as "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)" .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is what I did. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private IApplication pParentApp; (Get this object from class constructor)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private String strPath = "C:\\Documents and Settings\My Documents\MyMap.mxd";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pParentApp.pParentApp.OpenDocument(strPath);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It worked before but not now.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can manually open the mxd by click on the file name with no problem.&amp;nbsp; I think (or guess) when I manually open it, system sees me as my log_in name, but when the above codes running, it may see the user as ArcObject or something as suspicious user. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Our system security might changed recently thats why it worked before but not anymore (again my guess).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea? any thought?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 16:57:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241091#M6225</guid>
      <dc:creator>SamLuo</dc:creator>
      <dc:date>2010-08-17T16:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241092#M6226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you use the code as you have posted it, you might want to escape the folder seperator "\". You did after the drive letter, but not for the subfolders.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 06:16:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241092#M6226</guid>
      <dc:creator>JanDuske</dc:creator>
      <dc:date>2010-08-18T06:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241093#M6227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you use the code as you have posted it, you might want to escape the folder seperator "\". You did after the drive letter, but not for the subfolders.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply.&amp;nbsp; No, it is not an issue, in my code, i really use double backslash.&amp;nbsp; I think IApplication acts differently. after I did more test, I found something interesting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I got IApplication on ICommand Create event as&amp;nbsp; a hook.&amp;nbsp; It is ok when use that hook (IApplication) to open a document, but failed if I pass it to a new function (which in in a different project) to open the same document.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Aug 2010 15:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241093#M6227</guid>
      <dc:creator>SamLuo</dc:creator>
      <dc:date>2010-08-24T15:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241094#M6228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;When I try to open a map from either my computer or from a shared folder on a server with IApplication, I got an error showed as "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)" .&lt;BR /&gt;Here is what I did. &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private IApplication pParentApp; (Get this object from class constructor)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private String strPath = "C:\\Documents and Settings\My Documents\MyMap.mxd";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pParentApp.pParentApp.OpenDocument(strPath);&lt;BR /&gt;It worked before but not now.&amp;nbsp; &lt;BR /&gt;I can manually open the mxd by click on the file name with no problem.&amp;nbsp; I think (or guess) when I manually open it, system sees me as my log_in name, but when the above codes running, it may see the user as ArcObject or something as suspicious user. &lt;BR /&gt;Our system security might changed recently thats why it worked before but not anymore (again my guess).&lt;BR /&gt;Any idea? any thought?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem solved.&amp;nbsp; It was because the form that opens map document is modal and IApplication was passed from parent.&amp;nbsp; Solution: open map document after the form is closed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 12:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241094#M6228</guid>
      <dc:creator>SamLuo</dc:creator>
      <dc:date>2010-09-01T12:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241095#M6229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, luosa55!&amp;nbsp; I had the same issue and your suggestion resolved it.&amp;nbsp; I changed the from from modal to non-modal and it worked!&amp;nbsp; Thanks again, your post pointed me to the correct solution.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 13:47:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/access-is-denied-exception-from-hresult-0x80070005/m-p/241095#M6229</guid>
      <dc:creator>HectorCervantes</dc:creator>
      <dc:date>2013-01-22T13:47:50Z</dc:date>
    </item>
  </channel>
</rss>

