This project is read-only.

Server 2008 R2 and IIS7 error 404 on verify

Feb 4, 2010 at 8:11 AM

Hello again,

We have decided to move our system onto Server 2008 R2 and the email to case part works well, but the notify and verification part is not. When the link is clicked to verify a new contact, we get a 404 error. locally on the server if we try, we get the following:

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.Diagnostics.EventLogPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:


Line 192:    Protected Sub Page_Error(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Error
Line 193:
Line 194:        LogHelper.Log("Error rendering UpdateClientInformation.", Context.Error, LogHelper.LogType.Exception)
Line 195:
Line 196:        ctlHeader.Visible = False
 

Source File: C:\CrmQueueManager\web\ClientInformation.aspx.vb    Line: 194

Stack Trace:


[SecurityException: Request for the permission of type 'System.Diagnostics.EventLogPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessPermission.Demand() +61
   System.Diagnostics.EventLog..ctor(String logName, String machineName, String source) +125
   System.Diagnostics.EventLog..ctor() +24
   QueueManager.Helper.LogHelper.Log(String Message, Exception Ex, LogType Type) in C:\Projects\CRMQueueManager\QueueManagerHelper\LogHelper.vb:16
   ClientInformation.Page_Error(Object sender, EventArgs e) in C:\CrmQueueManager\web\ClientInformation.aspx.vb:194
   System.Web.UI.TemplateControl.OnError(EventArgs e) +8690922
   System.Web.UI.Page.HandleError(Exception e) +84
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6776
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.clientinformation_aspx.ProcessRequest(HttpContext context) +37
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

Coordinator
Feb 5, 2010 at 1:02 PM

Hi,

I believe IIS 7.5 is a bit more locked down by default. You need to modify the trust level in web.config to allow the web site to lo access the event log. Please see e.g.

http://www.devx.com/codemag/Article/37396/0/page/4

- Måns

Feb 5, 2010 at 5:14 PM

Thanks, seems to have done the trick!