Last post Jul 17, 2007 07:07 PM by HCBMRDD
Jun 20, 2007 10:37 AM|dileepnr|LINK
This is the error which am getting randomly while sending mails with attachment or not using asynchronous method.
The asp.net has full control on the attachment folder.
<trust level="Full"> is given in web config.
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
The action that failed was:
The type of the first permission that failed was:
The Zone of the assembly that failed was:
Jun 20, 2007 01:51 PM|benderm|LINK
you might have to 'impersonate' the web app to access files or set the permissions for the asp.new process
Jul 17, 2007 07:07 PM|HCBMRDD|LINK
<identity impersonate="true" userName="TypeUsernameHere" password="TypePasswordHere"/>
I added the above code to the system.web section of the weg.config. It removed the error and I was able to build the site. If I remove the webform that uses AJAX, and remove the identity impersonate (see above), it also builds. When I am in VS 2005, I don't
get the Intellisense for AJAX controls and get an error saying:
Element 'HoverMenuExtender' is not a known element. This can occur if there is a compilation error in the Web site.
The page works when I open it in Explorer. Here is the code:
I added VsWebSite.Interop.dll to my "bin" directory. It fixed the error caused by the following code in the web.config:
Version=22.214.171.124, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
The case I am trying to make is that I have been searching a lot on this issue...
I want VS to recognize the control and I want to use Intellisense with the AJAXToolKit.