Prev: what is default network credentials
Next: Excel how to tell if workbook is already open BEFORE you try to open it.
From: Zhuo Li on 3 May 2010 16:31 We are migrating a ASP.net project from XP to windows 7 64 bits. The asp.net project is using a COM object (32 bits) that retrieves data from database (Sybase SQL anywhere 11). We are using IIS 7.5. When it calls a COM object's function to return a plain data type, it works. However, if it calls the same COM object to return a ADO "recordset", I get the following error: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Please advise if you know anything on this. Thanks, Zhuo
From: Mr. Arnold on 3 May 2010 18:05 Zhuo Li wrote: > We are migrating a ASP.net project from XP to windows 7 64 bits. > > The asp.net project is using a COM object (32 bits) that retrieves data from > database (Sybase SQL anywhere 11). We are using IIS 7.5. > > When it calls a COM object's function to return a plain data type, it works. > However, if it calls the same COM object to return a ADO "recordset", I get > the following error: > > System.UnauthorizedAccessException: Access is denied. (Exception from > HRESULT: 0x80070005 (E_ACCESSDENIED)) > > Please advise if you know anything on this. Access is denied on what? Accessed is denied to what? Where is the stack trace? Anything that works on XP doesn't mean it's going to work on Win 7. And security implementation on Win 7 is not going to allow the same thing to happen like it did on the wide open XP O/S. Access denied means the account being used by the ASP.NET application usually the ASP.NET worker process account doesn't have the permissions. It may come done to you may have to do account impersonation using an account on Win 7 that has the permissions.
From: Zhuo Li on 4 May 2010 08:14 Thank you for your feedback. The stack trace just says access is denied on the com object. That doesn't make any sense because I changed the same function inside the com object to return any plain data type (widestring, integer) and it works. I supspect that this is something to do with the ADO assembly and the ADO being used by com object. Thanks, Zhuo "Mr. Arnold" <Arnold(a)Arnold.com> wrote in message news:OtZpYzw6KHA.6052(a)TK2MSFTNGP02.phx.gbl... > Zhuo Li wrote: >> We are migrating a ASP.net project from XP to windows 7 64 bits. >> >> The asp.net project is using a COM object (32 bits) that retrieves data >> from >> database (Sybase SQL anywhere 11). We are using IIS 7.5. >> >> When it calls a COM object's function to return a plain data type, it >> works. >> However, if it calls the same COM object to return a ADO "recordset", I >> get >> the following error: >> >> System.UnauthorizedAccessException: Access is denied. (Exception from >> HRESULT: 0x80070005 (E_ACCESSDENIED)) >> >> Please advise if you know anything on this. > > Access is denied on what? Accessed is denied to what? Where is the stack > trace? > > Anything that works on XP doesn't mean it's going to work on Win 7. And > security implementation on Win 7 is not going to allow the same thing to > happen like it did on the wide open XP O/S. > > Access denied means the account being used by the ASP.NET application > usually the ASP.NET worker process account doesn't have the permissions. > > It may come done to you may have to do account impersonation using an > account on Win 7 that has the permissions.
From: Mr. Arnold on 4 May 2010 10:16
Zhuo Li wrote: > Thank you for your feedback. The stack trace just says access is denied on > the com object. > That doesn't make any sense because I changed the same function inside the > com object to return > any plain data type (widestring, integer) and it works. > > I supspect that this is something to do with the ADO assembly and the ADO > being used by com object. I suspect it's Win 7 security, which is not like XP. |