|
Hi. I keep getting a permission denied error on a dll that is being accessed from an ASP.NET web application . SCENARIO: ***************************************************** I have an ASP.NET web application that calls a middle-tier dll. This dll is set up for transactions and is therefore registered in COM+. The dll itself calls a data-tier dll (that is not setup for transactions and is not registered in COM+). PROBLEM: ***************************************************** 1. When testing the middle-tier & data-tier dlls from a VB.NET desktop application they work fine. 2. However, when running the ASP.NET application, I get the following error: Access to the registry key HKEY_CLASSES_ROOTIBankAdventure.Security is denied. 3. The error message then goes on to say: ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a _base_ process identity (typically {MACHINE}ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate= true /, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET write access to a file, right-click the file in Explorer, choose Properties and select the Security tab. Click Add to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access. OBSERVATIONS: ***************************************************** 1. The permission on the web application is IUSR_MACHINENAME (which it defaults to). 2. In the Web.config file I have the following: <authentication mode= Forms <forms loginUrl= Login.aspx / </authentication <authorization <deny users= ? / </authorization 3. I created a strong key file & referenced it in the AssemblyInfo.vb file (dll compiles & registers fine in COM+) so I don't believe that is an issue 4. I have tried both manual COM+ registration (regsvcs) & lazy COM+ registration (VS.NET does it when app first runs) QUESTION: ***************************************************** 1. Also, where is the <identity impersonate= true / to be found? This is mentioned in the above error message. It is not in the AssemblyInfo.vb file or Web.config file. The web application I am trying to get to work is straight from a WROX book and the only thing it says to do is add the above mentioned <authentication/ & <authorization/ info to the Web.config file ... 2. When I right click the file in Explorer (as it says to do above), I do NOT see a tab for Security . Is this because I am using Windows XP Pro instead of Windows 2000 Server? If so, WHERE do I set this permission at? SOFTWARE: ***************************************************** Windows XP Professional IIS 5.1 Visual Studio.NET 1.1 SQL Server 2000 (all service packs applied) ANY HELP WOULD BE GREATLY APPRECIATED. THANKS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|