oData service error
Hi, I'm trying to deploy an odata web service, and am getting the error listed below. It works locally, so I don't think it's something that I'm fundamentally doing wrong. Seems like it's something about the configuration up on appharbor. Not sure what setting it is in particular, but you can see it at this URL: http://p2plendingdata.com/lendingclubodata.svc
And for a repro case, all I did was add an entity framework model to the mvc project, then add a wcf data service and expose the entity context. Pretty much like this: http://www.vistadb.net/tutorials/entityframework-odata-wcf.aspx
Let me know if I can give you more info on this, thanks!
[FileLoadException: Filename:
\?\C:\websites\77\877\97419b06b7372591ff2dc4e51645e4e45bcf92f5_PublishedWebsites\Fin.Web\web.config
Line number: 122
Error: This configuration section cannot be used at this path. This
happens when the section is locked at a parent level. Locking is
either by default (overrideModeDefault="Deny"), or set explicitly
by a location tag with overrideMode="Deny" or the legacy
allowOverride="false".
] Microsoft.Web.Administration.Interop.IAppHostAdminManager.GetAdminSection(String bstrSectionName, String bstrPath) +0 Microsoft.Web.Administration.WebConfigurationManager.GetSectionInternal(String siteName, String virtualPath, String sectionPath, Type sectionType) +281 Microsoft.Web.Administration.WebConfigurationManager.GetSection(String siteName, String virtualPath, String sectionPath) +30
[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +251 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19 System.ServiceModel.WasHosting.WebConfigurationManagerWrapper.WebConfigGetSection(String siteName, String virtualPath, String sectionName) +106 System.ServiceModel.WasHosting.MetabaseSettingsIis7V2.ProcessBasicAuthentication(String siteName, String virtualPath, HostedServiceTransportSettings& transportSettings) +22 System.ServiceModel.WasHosting.MetabaseSettingsIis7V2.CreateTransportSettings(String relativeVirtualPath) +138 System.ServiceModel.Activation.MetabaseSettingsIis.GetTransportSettings(String virtualPath) +118 System.ServiceModel.Activation.MetabaseSettingsIis.GetAccessSslFlags(String virtualPath) +4 System.ServiceModel.Activation.MetabaseSettings.GetAllowSslOnly(String virtualPath) +10 System.ServiceModel.Activation.HttpHostedTransportConfiguration.GetBaseAddresses(String virtualPath) +87 System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetBaseAddresses(String virtualPath) +117 System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +538 System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +44 System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +615
[ServiceActivationException: The service '/lendingclubodata.svc' cannot be activated due to an exception during compilation. The exception message is: Exception has been thrown by the target of an invocation..] System.Runtime.AsyncResult.End(IAsyncResult result) +679246 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190 System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar) +300622 System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +8841540
Discussions are closed to public comments.
If you need help with AppHarbor please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by friism on Feb 04, 2011 @ 07:19 PM
Hi Joel
I'd like to take a look at you web.config. Could you either post it here or add support(a)appharbor.com as a collaborator on the app?
2 Posted by Vagif Abilov on Feb 04, 2011 @ 08:24 PM
It's interesting that just today I had exactly the same error after
deployment of my OData service on a machine (not AppHarbor) with tightly
configured IIS security. I haven't solved it yet, so I can't recommend
anything, but this seems to be OData-related configuration issue. That needs
of course to be solved, giving growning OData popularity.
Vagif
On Fri, Feb 4, 2011 at 4:06 AM, joelmartinez <
[email blocked]<tender%[email blocked]>
> wrote:
Support Staff 3 Posted by friism on Feb 04, 2011 @ 09:01 PM
I'm succesfully running an OData service on AppHarbor, so It can be done.
4 Posted by joelmartinez on Feb 04, 2011 @ 09:12 PM
I've added [email blocked] as a collaborator. Let me know if you see anything stand out, or even if you want to publish your working example, maybe I can spot the diff if you don't have time :-)
Support Staff 5 Posted by friism on Feb 04, 2011 @ 09:58 PM
Right, so your web.config overrides some
system.webServer
settings, but that's not allowed on AppHarbor web servers. I've commented out the system.webServer section and gotten the service to run here: http://localhost:2406/lendingclubodata.svc/Let me know if this works for you -- if so, I'll delete my version of your app.
6 Posted by Vagif Abilov on Feb 04, 2011 @ 10:01 PM
Then, as you suggested, it is interesting to look at web.config.
On Fri, Feb 4, 2011 at 10:01 PM, Michael Friis <
[email blocked]<tender%[email blocked]>
> wrote:
tt closed this discussion on Feb 05, 2011 @ 05:04 AM.
joelmartinez re-opened this discussion on Feb 05, 2011 @ 01:58 PM
7 Posted by joelmartinez on Feb 05, 2011 @ 01:58 PM
That did the trick! thanks! might be a good idea to inspect the the web.config during the deploy/build process and look for settings like this that we can't include. because I'm pretty sure I didn't explicitly add that, it must have been a part of the default template, or added by visual studio at some point :-)
joelmartinez closed this discussion on Feb 05, 2011 @ 01:58 PM.