Answered by:
Unable to add new WCf reference

Question
-
User-1825561198 posted
Hi!
My application was running just fine. Including my WCF services integration.
I was trying out something, where I clicked on Build - Publish
--> Selected File System
--> Target Location was Local IIS
Clciked on Publish Web Site.
After that, looks like my application broke. My wcf services are broke, when I click on update Service reference, I get this error
There was an error downloading 'https://localhost/my.Service/LibraryService.svc'. The request failed with the error message: -- <html> <head> <title>Configuration Error</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style> </head> <body bgcolor="white"> <span><H1>Server Error in '/my.Service' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>Configuration Error</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description: </b>An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. <br><br> <b> Parser Error Message: </b>An error occurred creating the configuration section handler for unity: An abstract InjectionMemberElement object cannot be created. Please specify a concrete type.<br><br> <b>Source Error:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code><pre> Line 346: <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> Line 347: </system.serviceModel> <font color=red>Line 348: <unity xmlns="http://schemas.microsoft.com/practices/2010/unity"> </font>Line 349: <assembly name="my.Core.Service" /> Line 350: <assembly name="my.Service" /></pre></code> </td> </tr> </table> <br> <b> Source File: </b> C:\TFS\DefaultCollection\Portal\Main Branch\my.Service\web.config<b> Line: </b> 348 <br><br> <hr width=100% size=1 color=silver> <b>Version Information:</b> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272 </font> </body> </html> <!-- [InvalidOperationException]: An abstract InjectionMemberElement object cannot be created. Please specify a concrete type. at Microsoft.Practices.Unity.Configuration.InjectionMemberElementCollection.CreateNewElement() in e:\Builds\Unity\UnityTemp\Compile\Unity\Unity.Configuration\Src\InjectionMemberElementCollection.cs:line 71 at System.Configuration.ConfigurationElementCollection.CallCreateNewElement(String elementName) at System.Configuration.ConfigurationElementCollection.Reset(ConfigurationElement parentElement) at System.Configuration.ConfigurationElement.Reset(ConfigurationElement parentElement) at System.Configuration.ConfigurationElementCollection.Reset(ConfigurationElement parentElement) at System.Configuration.ConfigurationElement.Reset(ConfigurationElement parentElement) at System.Configuration.ConfigurationElementCollection.Reset(ConfigurationElement parentElement) at System.Configuration.ConfigurationElement.Reset(ConfigurationElement parentElement) at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionImpl(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader) at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader) at System.Configuration.RuntimeConfigurationRecord.CreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader) at System.Configuration.BaseConfigurationRecord.CallCreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader, String filename, Int32 line) [ConfigurationErrorsException]: An error occurred creating the configuration section handler for unity: An abstract InjectionMemberElement object cannot be created. Please specify a concrete type. (C:\TFS\DefaultCollection\Portal\Main Branch\my.Service\web.config line 348) at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) at Microsoft.Practices.Unity.Configuration.UnityContainerExtensions.LoadConfiguration(IUnityContainer container) in e:\Builds\Unity\UnityTemp\Compile\Unity\Unity.Configuration\Src\UnityContainerExtensions.cs:line 63 at my.Core.Service.GlobalBase.InitContainer() in C:\TFS\DefaultCollection\Portal\Main Branch\my.Core.Service\GlobalBase.cs:line 46 at my.Core.Service.GlobalBase.Application_Start() in C:\TFS\DefaultCollection\Portal\Main Branch\my.Core.Service\GlobalBase.cs:line 28 [HttpException]: An error occurred creating the configuration section handler for unity: An abstract InjectionMemberElement object cannot be created. Please specify a concrete type. (C:\TFS\DefaultCollection\Portal\Main Branch\my.Service\web.config line 348) at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) [HttpException]: An error occurred creating the configuration section handler for unity: An abstract InjectionMemberElement object cannot be created. Please specify a concrete type. (C:\TFS\DefaultCollection\Portal\Main Branch\my.Service\web.config line 348) at System.Web.HttpRuntime.FirstRequestInit(HttpContext context) at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) --> --. Metadata contains a reference that cannot be resolved: 'https://localhost/my.Service/LibraryService.svc'. The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<html> <head> <title>Configuration Error</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style> </head> <body bgcolor="white"> <span><H1>Server Error in '/my.Service' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>Configur'. The remote server returned an error: (500) Internal Server Error. If the service is defined in the current solution, try building the solution and adding the service reference again.
Thank you,
Tuesday, February 12, 2013 3:06 PM
Answers
-
User-1825561198 posted
Hi!
IN IIS Manager.
Select the Default WebSite, and under Basic Settings, changed the Physical Path tp "%SystemDrive%\inetpub\wwwroot"
This solved all my problems.
Thank you,
sushma
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, February 13, 2013 2:37 PM
All replies
-
User2105156359 posted
Please check the Web.config file.
Wednesday, February 13, 2013 5:33 AM -
User-1825561198 posted
Hi!
IN IIS Manager.
Select the Default WebSite, and under Basic Settings, changed the Physical Path tp "%SystemDrive%\inetpub\wwwroot"
This solved all my problems.
Thank you,
sushma
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, February 13, 2013 2:37 PM