473,396 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SecurityException when calling DLL while using a UNC share

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

May 9 '07 #1
0 2069

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Zak Taemur | last post by:
Whenever I try to run my application I get the following error: "An unhandled exception of type 'System.Security.SecurityException' occured in WorkFlow-Projects.exe Additional information:...
2
by: David Lindgren | last post by:
Hello! When I am trying to run my .NET application from a network drive a System.Security.SecurityException exception is thrown. Why is that? How do I prevent it? Thanks! /David.
0
by: Brian A | last post by:
I have code that calls some Win32 code. My library is accessed via remoting from a client. In version 1.0 of the framework I had no problems. With 1.1 I consitently get the securityException: ...
1
by: edge | last post by:
hi, here it is my problem. My console app, reads a text file where it grabs username/password. Next, my app creates a .BAT file to trigger the command ftp:\\user:password@ftphomeaddress. ...
2
by: jwgoerlich | last post by:
I wrote a simple VB.Net console application. It accepts command line parameters and creates a folder structure. It works on the local file system without a problem If I run the console app from...
2
by: Jason | last post by:
I have written a VB app using the RS323.vb code from the VB resource kit. When I try to run the code from a network drive I get a securityexception error. If I copy the file to the local c drive...
0
by: José Nunes | last post by:
Hi, I'm developing a Windows Control Library to use as Smart Client in a ASP.NET application and one of the tasks of my custom control is call a WebService. So, when i try to call the WebService...
1
by: Phillip Taylor | last post by:
Hi The Visual Basic 2003 application that I wrote was installed on Windows 2003 Server and we are trying to acess it across the network from Windows XP Pro but we are getting An Exception...
4
by: =?iso-8859-1?q?Eir=EDkur_Fannar_Torfason?= | last post by:
I'm wrestling with a problem that I'm hoping someone can help me with. I have a web application written in VS.2003 and running on version 1.1 of the .NET Framework on XP pro and Windows server...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.