Wrong connection strings returned - asp.net

I've written a WCF service application.
When the project is generated, visual studio creates 3 web config files.
I've finished the project and to date I've been using a hard coded connection string within my GetOpenConnection() function, so I now want to move the connection string to the web.config files.
The following call returns null.
ConnectionStringSettings csSettings = ConfigurationManager.ConnectionStrings["PulseWcfConnectionString"];
When I run the following code it doesn't return the string set in my web.debug.config file.
for(int idx = 0; idx < ConfigurationManager.ConnectionStrings.Count; idx++)
Debug.WriteLine(ConfigurationManager.ConnectionStrings[idx].ConnectionString);
it returns the following 2 items, 2nd one is an empty string. I don't recognise the first line, maybe it's a default one?
data source=.\SQLEXPRESS;Integrated Security=SSPI; AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
""
What am I missing please?
My web.debug.config contains the following which should be for a local sql server instance
<?xml version="1.0"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<connectionStrings>
<add
name="PulseWcfConnectionString"
connectionString="Data Source=WIN8-CLAIRE\SQLSRVDEV2008;Initial
Catalog=gcll;Persist Security Info=True;Integrated Security=True"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
</configuration>
For now my web.release.config contains the same thing (it's being published to it's destination tomorrow so I'll change the details for it then)
<?xml version="1.0"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<connectionStrings>
<add
name="PulseWcfConnectionString"
connectionString="Data Source=WIN8-CLAIRE\SQLSRVDEV2008;Initial
Catalog=gcll;Persist Security Info=True;Integrated Security=True"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
</configuration>
web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Windows" />
</system.web>
<system.serviceModel>
<services>
<service name ="pulse.smartcentre.wcf.service.app.PulseWebService"
behaviorConfiguration="ServiceBehavior">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:52478/Design_Time_Addresses/pulse.smartcentre.wcf.service.app/PulseWebService/" />
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding"
bindingConfiguration="wsHttpBinding"
contract="pulse.smartcentre.wcf.service.app.IPulseWebService">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<!-- CNH -->
<bindings>
<!-- Secure binding (to use) -->
<wsHttpBinding>
<binding name="wsHttpBinding" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true" transactionFlow="true">
<readerQuotas
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxDepth="2147483647"
maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647" />
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
<!-- 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 includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="Behaviors.EndpointBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>

If you use the transformation files, you need to add the transformation property, and specify what you would like to do, Insert, Remove, Replace...
I use to put the local connection in the master web.config and then transform it in the Release configuration, by Replacing the attributes of the defined connection string.
Check this article: Web.config Transformation Syntax for Web Project Deployment Using Visual Studio
If you want to use your way, just add xdt:Transform="Insert" in the <add> node.
You can test your transformation using this web tester: Web.config Transformation Tester

Related

Unable to Add Assembly reference in WCF Service Application in IIS 7.5

I've been trying to add a reference to an assembly named CAPI_PInvoke.dll (64 bit) in my wcf application. The dll is placed in my bin folder but when i access my service through https://localhost:port It gives following error
The IIS has permission to read/execute contents of the entire project directroy.
here's my web.config file
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/>
</appSettings>
<system.web>
<compilation targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding
maxReceivedMessageSize="2147483647"
>
<readerQuotas/>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="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 includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
I've studied several articles but unable to resolve the issue, Can anyone suggest a solution to this problem?

ASP.Net Class Library project accessing WCF

Existing Asp.Net project was consuming WCF WebService.
Working OK.
I decided to move the business logic into a class library. So now the Class library consumes the WCF web service and the Asp.net app has no reference to it.
On the first call into the class Library by the Asp.net web app (debugging) I get an error:
Could not find default endpoint element that references contract 'CouponParking.ICouponService'
in the ServiceModel client configuration section.
This might be because no configuration file was found for your application,
or because no endpoint element matching this contract could be found in the client element.
I have stared at the Class library app.config (which was created by the IDE when I first added a Service reference to the WCF service) and it looks OK to me.
Assuming it needs altering could someone please cast a critical eye over it and tell me what needs doing. My understanding of endpoints is rudimentary.
The asp.net web.config does have an empty servicemodel section. I assume this is correct as the service reference has been removed.
The class library app.config follows then the WCF web.config so you can see the other end.
The WCF has an additional JSON endpoint because it is also consumed by an Android device.
App.Config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SoapEndPoint" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8707/CouponParking.svc/SOAP"
binding="basicHttpBinding" bindingConfiguration="SoapEndPoint"
contract="CouponParking.ICouponService" name="SoapEndPoint" />
</client>
</system.serviceModel>
</configuration>
Web.Config:
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxxxx" >
<section name="CouponParkingWCF.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="basicHttp" />
</basicHttpBinding>
<webHttpBinding>
<binding name="JsonBinding" />
</webHttpBinding>
</bindings>
<services>
<service name="CouponParkingWCF.CouponService">
<endpoint name ="SoapEndPoint"
address="SOAP"
binding="basicHttpBinding"
contract="CouponParkingWCF.ICouponService" />
<endpoint name="JSON"
address="REST" behaviorConfiguration="JsonBehavior" binding="webHttpBinding"
contract="CouponParkingWCF.ICouponService" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="JsonBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
<applicationSettings>
<CouponParkingWCF.Properties.Settings>
<setting name="ServerIp" serializeAs="String">
<value>192.168.0.224</value>
</setting>
<setting name="Database" serializeAs="String">
<value>WgtnTickTrakTest</value>
</setting>
</CouponParkingWCF.Properties.Settings>
</applicationSettings>
</configuration>
Class libraries use the config file of their consuming application - they do not use their own. So you need to move the system.serviceModel portion from the library's app.congif to the web.config of the ASP.NET application:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SoapEndPoint" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8707/CouponParking.svc/SOAP"
binding="basicHttpBinding"
bindingConfiguration="SoapEndPoint"
contract="CouponParking.ICouponService"
name="SoapEndPoint" />
</client>
</system.serviceModel>
Now when you call into the class library from the ASP.NET application, it should pick up the binding and the client endpoint.

ASP.NET hosting WCF Services, needs to increase MaxStringContentLength, but how?

My ASP.NET server is providing a set of WCF services which are consumed by my WPF client. Everything was working just fine until the length of a string field exceeded 8K. This now generates the following exception on the ASP.NET server...
There was an error deserializing the object of type Project.ModelType.
The maximum string content length quota (8192) has been exceeded while
reading XML data. This quota may be increased by changing the
MaxStringContentLength property on the XmlDictionaryReaderQuotas
object used when creating the XML reader.
I have increased the value of the MaxStringContentLength to be 64K on the WPF app.config but this has not solved the issue. So I guess I need to increase this value on the ASP.NET side as well. But I do not have any values in the web.config to change! Here is my web.config to show this...
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Forms">
<forms name=".ASPXFTOAUTH"
timeout="10"
slidingExpiration="true"
cookieless="UseCookies"/>
</authentication>
<membership>
<providers>
<clear/>
</providers>
</membership>
<customErrors defaultRedirect="~/Error.htm" mode="RemoteOnly">
<error statusCode="404" redirect="~/404.aspx" />
</customErrors>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
So how do I update the server to indicate the higher MaxStringContentLength value? The app.config for my service looks like this...
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IAccess" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="131072" maxBufferPoolSize="524288" maxReceivedMessageSize="131072"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="65536" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IAccess"
contract="AccessService.IAccess"
name="BasicHttpBinding_IAccess" />
</client>
</system.serviceModel>
Any ideas?
UPDATE:
My services are defined by having a class 'Access.svc'
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Access : IAccess
{
// ...IAccess method implementations
}
...which has the following markup...
<%# ServiceHost Language="C#" Debug="true"
Service="Ecotech.AMS.WebServer.Access"
CodeBehind="Access.svc.cs" %>
...there is nothing specific about the service in the web.config, as noted in comments.
Try clicking "Add Service Reference" via the right-click menu of your Project. Doing it this way will add the necessary configuration information into your web.config file.
Once you do this, you can set the maxReceivedMessageSize property on your binding. Doing it this way will most accurately reflect what you are doing on the WCF service side of things.
The place where you need to work on is the web config, you need to add service behaviours where you can set the size of data. For example like this,
<behaviors>
<serviceBehaviors>
<behavior name="SilverlightWCFLargeDataApplication">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="SilverlightWCFLargeDataApplication">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
if that does not work, post your web config here.Hope it helps.

Error 302 returned while using WCF for Forms Authentication and Accessing Authentication_JSON_AppService.axd

I have a client and application which are set up to use the ClientFormAuthenticationMembershipProvider for authentication. On the client side, when the application boots up the system prompts for a username and password. The server is set up to accept this, and a Web Application is supposed to permit the application to work. We are in the midst of setting up a new environment, and something is not working on the server side (if we point the client at another server, it works fine). We've painstakingly gone over every detail we can think of, and the result is the same: The call to ValidateUser() throws an exception. I have downloaded a network sniffer, and under the hood I can see that a 302 message is being returned when I try to call Authentication_JSON_AppService.axd. On the server side, ProcMon registers attempts to read the Authentication_JSON_AppService.axd file from within the wwwroot/../Authentication_JSON_AppService.axd, which obviously does not exist.
Client Side Configuration:
From our FormMain.cs (which attempts to call the provider)
if (!System.Web.Security.Membership.ValidateUser(null, null))
System.Windows.Forms.Application.Exit();
else
{
DoStartUp();
....
}
From Our FormLogin.cs (which prompts for UserName and Pass) Note: class inherits
IClientFormsAuthenticationCredentialsProvider
public System.Web.ClientServices.Providers.ClientFormsAuthenticationCredentials GetCredentials()
{
if (this.ShowDialog() == DialogResult.OK)
{
return new ClientFormsAuthenticationCredentials(
textEditUsername.Text, textEditPassword.Text,
false);
}
else
{
return null;
}
}
From the app.config:
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<clear />
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="http://SERVERNAME/APPNAME/Authentication_JSON_AppService.axd" credentialsProvider="APPNAME.Windows.FormLogin, APPNAME.Windows" savePasswordHashLocally="False" />
</providers>
</membership>
On the server side:
IIS has been configured for this application for anonymous authentication and forms authentication. (we're running IIS 7.5, .NET 4.0, Windows Server 2008 R2). We have the WCF Activation and HTTP Activation features installed on the server. The ApplicationPool is set to v4.0 Framework, 32-bit Applications not enabled, Integrated PipelineMode, most other values set to default.
The web.config file:
<system.web.extensions>
<scripting>
<webServices>
<authenticationService enabled="true" />
<roleService enabled="true" />
</webServices>
</scripting>
</system.web.extensions>
<authentication mode="Forms">
<forms name=".MDPSApp" loginUrl="~/Connect/Login.aspx" slidingExpiration="true" timeout="600000">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<membership defaultProvider="XYZ">
<providers>
<add name="XYZ" type="APPNAME.Web.Providers.MembershipProvider, APPNAME.Web" />
</providers>
</membership>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="DisableAutoCookieManagement" maxReceivedMessageSize="2147483647" allowCookies="false">
<readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None" />
</binding>
</wsHttpBinding>
<behaviors>
<serviceBehaviors>
<behavior name="APPNAME.Application.Web.Services.AgenceMaster.ServiceAgenceMasterBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceAuthorization principalPermissionMode="None">
</serviceAuthorization>
</behavior>
<behavior name="APPNAME.Application.Web.Services.Agence.ServiceAgenceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="APPNAME.Application.Web.Services.AgenceMaster.ServiceAgenceMasterBehavior" name="APPNAME.Application.Web.Services.AgenceMaster.ServiceAgenceMaster">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="DisableAutoCookieManagement" contract="APPNAME.Services.AgenceMaster.IServiceAgenceMaster">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="APPNAME.Application.Web.Services.Agence.ServiceAgenceBehavior" name="APPNAME.Application.Web.Services.Agence.ServiceAgence">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="DisableAutoCookieManagement" contract="APPNAME.Services.Agence.IServiceAgence">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
The APPNAME.Web.Providers.MembershipProvider class extends System.Web.Security.MembershipProvider and overrides ValidateUser(string username, string password) with custom code. This class is not getting instantiated or called during the scenario.
Something isn't configured properly on the server side, or else the server would know how to resolve the Authentication_JSON_AppService.axd call properly (and it seems to me like it's not). Any thoughts or help are appreciated!
This was driving me bonkers. In FireFox - if I entered the URL for my *.aspx page that invoked my WCF REST call - everything worked fine. If I then did a shift-reload - I would get a 302 which redirected me to a non-existent forms login page.
In Safari and Chrome - no shift-reloaded needed. It would fail with the 302 on the first load.
I found the basic answer in the Alex on ASP.NET blog
Short answer: change the web.config to remove forms authentication:
<modules runAllManagedModulesForAllRequests="true">
<remove name="FormsAuthentication" />
</modules>

"An error occurred while getting provider information from the database" while deploying Code First

I'm getting the following error while deploying my ASP.NET MVC 4 application (Code First) to IIS:
"An error occurred while getting provider information from the database.
This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct."
I've been looking around for answers, but none of the situations matches mine:
I got 2 projects
BackEnd (DataAccess with Code First + WCF services)
FrontEnd MVC 4 application (only service references to WCF services)
On my local IIS + SQL Server 2008 it works fine. Even if I change connectionstring to production database everything works as espected.
The problem occurs when deploying the BackEnd + FrontEnd to IIS.
The only connection string that accesses db is located in my BackEnd application:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="fromMail" value="xxx#gmail.com" />
</appSettings>
<connectionStrings>
<add name="TTCWestelDbContext" connectionString="Data Source=192.168.2.14\SQLSERVER2008;Initial Catalog=TTCWestel001;Persist Security Info=True;User ID=XXX;Password=XXX" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="102400" executionTimeout="3600" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
</bindings>
<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 includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483646" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<directoryBrowse enabled="true" />
</system.webServer>
<system.diagnostics>
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"
propagateActivity="true">
<listeners>
<add name="traceListener"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData= "c:\Temp\WCFTracesTTCWestel.svclog" />
</listeners>
</source>
</sources>
</system.diagnostics>
</configuration>
Any help appreciated!!
Thanks
Micclo

Resources