Deployment issue with EntLib

Topics: Logging Application Block
Jan 22, 2009 at 5:42 AM
Hi,

I've run into a problem with deploying my application that uses Ent Lib 4.0, when i deploy the site it comes up with:

************* Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Logging.Logger' threw an exception. ---> Request for ConfigurationPermission failed while attempting to access configuration section 'enterpriseLibrary.ConfigurationSource'. To allow all callers to access the data for this section, set section attribute 'requirePermission' equal 'false' in the configuration file where this section is declared. ---> Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at TimeLogService.SubmitTimeLog(SubmitTimeLogRequest SubmitTimeLogRequest)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at WebServiceStudio.MainForm.InvokeWebMethod()
   at WebServiceStudio.MainForm.buttonInvoke_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I've been looking for relevant threads to find a fix but have been unable to find anything that works, can anyone help?!

i've installed the entlib dll's to the production server and registered them all in the GAC but still no joy!

Thanks
JC
Jan 22, 2009 at 6:31 AM
Hi,

Have you configured the permission properly? 


Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com
Jan 22, 2009 at 11:37 PM

Which permissions would those be? permissions to write to the eventlog? or the web application permissions?


Jan 23, 2009 at 3:20 AM
I"m not sure but I don't think this has something to do with EntLib.  Anyway, found this blog, see if it helps..
http://www.west-wind.com/WebLog/posts/101584.aspx


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Jan 23, 2009 at 4:56 AM
Thanks for the link Sarah, unfortunately i've tried the 'requirePermission=false' for all references to the entlib <section> and still no joy...i've got a new error now of:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter, null]) failed: The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Data.Database, TimesheetEntities]) failed: Unable to find the requested .Net Framework Data Provider.  It may not be installed. (Strategy type Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy, index 2) (Strategy type Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy, index 2) ---> The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Data.Database, TimesheetEntities]) failed: Unable to find the requested .Net Framework Data Provider.  It may not be installed. (Strategy type Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy, index 2) ---> Unable to find the requested .Net Framework Data Provider.  It may not be installed.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at TimeLogService.SubmitTimeLog(SubmitTimeLogRequest SubmitTimeLogRequest)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

could the issue be related to i'm running a sharepoint site on the same IIS website? and my application is in a virtualise folder in that site?
Jan 23, 2009 at 5:22 AM
Edited Jan 23, 2009 at 5:26 AM
I don't think so but still, I'm not sure, there are quite number of results if you try to google your error (Unable to find the requested .Net Framework Data Provider.  It may not be installed.),  here's one of them, might be worth the look.. 
http://blogs.msdn.com/wriju/archive/2007/03/08/orcas-march-2007-ctp-error-unable-to-find-the-requested-net-framework-data-provider-it-may-not-be-installed.aspx
From what I've seen so far, the error occured under different circumstances, some are typos in the configuration file.  Might as well look what's the nearest to your case.


By the way, you're getting a different error now so the 'requirePermission=false' fixed your initial problem.


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com