|
-
Oct 18th, 2007, 02:02 PM
#1
Thread Starter
Addicted Member
Access is Denied Error
I am in the middle of writing an ASP.NET application.
I am trying to access a component which is registered in the components manager.
When I come to the line of code to instantiate the object I get the following error:
**********************************************************
Server Error in '/TransDetail' Application.
--------------------------------------------------------------------------------
Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
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.
Source Error:
Line 22:
Line 23: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 24: Dim pf As New ProFormAPI.ProForm
**********************************************************
It is breaking out on that line and telling me that access is denied. I have been trying to work with this for the past 2 days with no luck. Does anyone have any ideas as to what I am supposed to be giving access to???
Thanks.
OS - Windows 2003 server
IIS - 6
ASP.net 1.1
ANY help would be greatly appreciated!
-
Oct 18th, 2007, 03:36 PM
#2
Fanatic Member
Re: Access is Denied Error
The problem is that you have to configure the folder security on the IIS box to allow ASPNET user account access to that folder/DLL. Otherwise, it will get that access denied error.
IIS doesn't run under the logged in user account, so that would be why it works if you build and run it thru Visual Studio (if you tried that). VS.NET runs stuff under your user account.
If your problem is solved, please use the Mark Thread As Resolved under Thread Tools!
Show Appreciation. Rate Posts!
-
Oct 19th, 2007, 01:34 PM
#3
Re: Access is Denied Error
What sort of a DLL is it? Is it a COM DLL or a .NET DLL? If it's a COM DLL, go into regsvr32, look in HKEY_CLASSES_ROOT for your DLL and give the ASP.NET worker process permissions on that key.
-
Oct 30th, 2007, 01:06 PM
#4
Thread Starter
Addicted Member
Re: Access is Denied Error
I tried everything and it is still not working.
Anyone have any ideas? I am really at a loss I have been spending so much time trying to figure this out without any luck.
Thanks.
-
Oct 31st, 2007, 06:34 AM
#5
Re: Access is Denied Error
So did you try what I said? Are you saying it's a COM DLL?
-
Oct 31st, 2007, 08:18 AM
#6
Thread Starter
Addicted Member
Re: Access is Denied Error
It is a COM+ component. I checked the registry and it did have proper permissions.
-
Oct 31st, 2007, 10:10 AM
#7
Re: Access is Denied Error
Very well, try giving permissions to IUSR_<machinename> and IWAM_<machinename> as well, using the same method.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|