SecurityException when calling DLL while using a UNC share

S

Steve

Hello-

Platform:
- web server using IIS 6 connecting to UNC share on separate file
server
- Both servers are Windows 2003 with dotNetFramework 2.0


General:
- basic ASP.NET pages work fine in this situation
- However, if I'm calling a DLL (located in the bin directory), I get
the following error:


Error:
Security Exception
Description: The application attempted to perform an operation not
allowed by the security policy. To grant this application the
required permission please contact your system administrator or change
the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the
permission of type 'System.Web.AspNetHostingPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace
below.

_________

The Event Log shows the following:

Source: ASP.NET 2.0.50727.0
Event Id: 1310

Event code: 3008
Event message: A configuration error has occurred.
Event sequence: 11
Event occurrence: 5
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2908527797/Root/
forms-6-128231063458178510
Trust level: Full
Application Virtual Path: /forms
Application Path: \\servername\share\webapp\folder\

Process information:
Process ID: 2752
Process name: w3wp.exe
Account name: domain\IWAM_WEB

Exception information:
Exception type: ConfigurationErrorsException
Exception message: Request for the permission of type
'System.Web.AspNetHostingPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (\\servername
\share\webapp\folder\web.config line 18)

Request information:
Request URL: http://www.domain.com/folder/filename.aspx
Request path: /folder/filename.aspx
User:
Is authenticated: False
Authentication Type:
Thread account name: domain\IWAM_WEB

_________


Appropriate code (and source of error) in web.config:
<httpHandlers>
<add verb="GET" path="filename.aspx"
type="WebControlCaptcha.CaptchaImageHandler, WebControlCaptcha"/>
</httpHandlers>

_________

The Event Log seems to confirm I have a full trust to the UNC on the
file server. However, I'm not using impersonation. (Is this needed?)

This application works fine in a single-server testing environment,
(with no UNC share). Your help is greatly appreciated.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top