solution1368
asked on
wcf issue
I have very simple wcf services with the following app.config built in vs 2008
View the attached error message.
When I built the .cs project, no error alerts. when I F5 /debug, I see the attached error message.
Need some experts to help me resolve this... Thanks
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
<customErrors mode="Off"></customErrors>
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="TheBindingConfig">
<security mode="None">
<message clientCredentialType="None "/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<serviceHostingEnvironment >
<baseAddressPrefixFilters>
<add prefix="http://www.domain.com/HostedInsuranceServices/InsuranceServiceLibrary.Service.svc"/>
</baseAddressPrefixFilters >
</serviceHostingEnvironmen t>
<services>
<service
name="InsuranceServiceLibr ary.Servic e"
>
<endpoint address="http://www.domain.com/HostedInsuranceServices/InsuranceServiceLibrary.Service.svc" binding="wsHttpBinding" contract="InsuranceService Library.IS ervice"
bindingConfiguration="TheB indingConf ig"
>
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchang e" />
<host>
<baseAddresses>
<add baseAddress="http://www.domain.com/HostedInsuranceServices/InsuranceServiceLibrary/Service/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True" />
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFa ults="Fals e"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
wcfIssue.png
View the attached error message.
When I built the .cs project, no error alerts. when I F5 /debug, I see the attached error message.
Need some experts to help me resolve this... Thanks
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
<customErrors mode="Off"></customErrors>
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="TheBindingConfig">
<security mode="None">
<message clientCredentialType="None
</security>
</binding>
</wsHttpBinding>
</bindings>
<serviceHostingEnvironment
<baseAddressPrefixFilters>
<add prefix="http://www.domain.com/HostedInsuranceServices/InsuranceServiceLibrary.Service.svc"/>
</baseAddressPrefixFilters
</serviceHostingEnvironmen
<services>
<service
name="InsuranceServiceLibr
>
<endpoint address="http://www.domain.com/HostedInsuranceServices/InsuranceServiceLibrary.Service.svc" binding="wsHttpBinding" contract="InsuranceService
bindingConfiguration="TheB
>
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchang
<host>
<baseAddresses>
<add baseAddress="http://www.domain.com/HostedInsuranceServices/InsuranceServiceLibrary/Service/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True" />
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFa
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
wcfIssue.png
ASKER
no error in visual studio express 2008 after adding the items you mentioned.
but it does not generate any svc file
but it does not generate any svc file
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
You must add a metadata behavior for the service, do the modifications below:
<service
name="InsuranceServiceLibr
>
{...}
</service>
<behavior name="DefaultBehavior">
{...}
</behavior>
Regards,
Mishu