Hi All!
Do not ask me why, but I need to have both asmx and wcf service from a single project. Nothing fancy about service itself. All configuration is pretty standard for both platforms.
With one caveat. If I request asmx first it works just fine. If first request hit svc, then I have following.
Code:
NullReferenceException: Object reference not set to an instance of an object.]
Spring.Util.HttpRuntimeEnvironment.get_CurrentVirtualPath() +64
Spring.Util.VirtualEnvironment.get_CurrentVirtualPath() +29
Spring.Util.VirtualEnvironment.get_CurrentVirtualPathAndQuery() +30
Spring.Context.Support.WebApplicationContext..ctor(String name, Boolean caseSensitive, IApplicationContext parentContext, String[] configurationLocations) +131
Spring.Context.Support.WebApplicationContext..ctor(String name, Boolean caseSensitive, String[] configurationLocations) +47
_dynamic_Spring.Context.Support.WebApplicationContext..ctor(Object[] ) +220
Spring.Reflection.Dynamic.SafeConstructor.Invoke(Object[] arguments) +42
Spring.Context.Support.RootContextInstantiator.InvokeContextConstructor(ConstructorInfo ctor) +241
Spring.Context.Support.ContextInstantiator.InstantiateContext() +168
Spring.Context.Support.ContextHandler.InstantiateContext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +152
Spring.Context.Support.WebContextHandler.InstantiateContext(IApplicationContext parent, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +399
Spring.Context.Support.ContextHandler.Create(Object parent, Object configContext, XmlNode section) +559
[ConfigurationErrorsException: Error creating context 'spring.root': Object reference not set to an instance of an object.]
System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) +202
System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) +1061
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +1431
System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission) +56
System.Configuration.BaseConfigurationRecord.GetSection(String configKey) +8
System.Web.Configuration.HttpConfigurationSystem.GetApplicationSection(String sectionName) +45
System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName) +49
System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey) +6
System.Configuration.ConfigurationManager.GetSection(String sectionName) +78
Spring.Util.ConfigurationUtils.GetSection(String sectionName) +151
Spring.Context.Support.ContextRegistry.InitializeContextIfNeeded() +110
Spring.Context.Support.ContextRegistry.GetContext() +71
Spring.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String reference, Uri[] baseAddresses) +80
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +11729164
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +42
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479
[ServiceActivationException: The service '/EDocumentPreferenceService.svc' cannot be activated due to an exception during compilation. The exception message is: Error creating context 'spring.root': Object reference not set to an instance of an object..]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +11599786
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +278
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Once WebContextHandler started everything works fine.
Is this doable at all?