Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 23rd, 2007, 12:03 PM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Security Exception Error

Hello All,

I had a application sending mail using jmail component in asp.net version 1.1 but then i recompiled the complete application to use version 2.0. But now i get the security exception error while sending mails using Jmail component:

Server Error in '/' Application.
--------------------------------------------------------------------------------

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.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:


Line 1014: 'Send a JMail with the quote
Line 1015: Dim JMail
Line 1016: JMail = Server.CreateObject("JMail.Message")
Line 1017: JMail.silent = True
Line 1018: JMail.Logging = True

Stack Trace:


[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Web.HttpServerUtility.CreateObject(String progID) +34
   ********._********.btnEmail_Click(Object sender, EventArgs e) in C:\Domains\********.com\wwwroot\********.aspx.vb:1 016
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
   System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +107
   System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +154
   System.Web.UI.Page.ProcessRequest() +86
   System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.pricequote_aspx.ProcessRequest(HttpContext context) +29
   System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +154
   System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +64
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210 net

Could anyone please help me to fix the issue?

Thanks,

Nici C.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Security Exception aliusmankhan ASP.NET 2.0 Professional 6 July 21st, 2008 11:21 AM
Security Exception Rubie .NET Framework 1.x 0 April 18th, 2006 01:34 PM
Security exception akibaMaila VB.NET 2002/2003 Basics 3 June 30th, 2005 01:29 PM
Security Exception skyler ASP.NET 1.0 and 1.1 Professional 0 June 24th, 2005 12:47 AM
Security Exception shahchi1 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 April 24th, 2005 07:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.