Hi,
I am in the process of writing my first .net application. My application runs with asp.net and c#. The c# code calls a dll called 'MapPointApp.dll'. When the code calls the dll I get the following error message.
--------------------------------------------------------------------------------------
Exception Details: System.UnauthorizedAccessException: Access is denied.
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.
-------------------------------------------------------------------------------------
I understand that the ASPNET user does not have the permission to call the dll, but I cannot work out how to grant the account the permissions required, as described in the last line of the error message, as I have no securities tab as described in the error message. (I am running IIS on XP pro).
I have tried using <identity impersonate="true"/> in the web.config file, the system then works fine if you’re accessing the application from the server machine, but if you are on a different machine you are requested to enter a password when you reach the point in the application that call the dll.
Don’t honestly know if this is important but I also have the following lines in the web.config file and I am using MobileFormsAuthentication for the application.
<authentication mode="Forms">
<forms name=".theDefault"
loginUrl="~/logon.aspx"
path="/"
protection="All"
timeout="15" >
</forms>
</authentication>
If anyone has any ideas or could recommend any reading material please reply, as any help would be most appreciated
Cheers and thanks again for any help
I am in the process of writing my first .net application. My application runs with asp.net and c#. The c# code calls a dll called 'MapPointApp.dll'. When the code calls the dll I get the following error message.
--------------------------------------------------------------------------------------
Exception Details: System.UnauthorizedAccessException: Access is denied.
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.
-------------------------------------------------------------------------------------
I understand that the ASPNET user does not have the permission to call the dll, but I cannot work out how to grant the account the permissions required, as described in the last line of the error message, as I have no securities tab as described in the error message. (I am running IIS on XP pro).
I have tried using <identity impersonate="true"/> in the web.config file, the system then works fine if you’re accessing the application from the server machine, but if you are on a different machine you are requested to enter a password when you reach the point in the application that call the dll.
Don’t honestly know if this is important but I also have the following lines in the web.config file and I am using MobileFormsAuthentication for the application.
<authentication mode="Forms">
<forms name=".theDefault"
loginUrl="~/logon.aspx"
path="/"
protection="All"
timeout="15" >
</forms>
</authentication>
If anyone has any ideas or could recommend any reading material please reply, as any help would be most appreciated
Cheers and thanks again for any help