aoa... i want to get data through webservice on iis....but it is giving following error..
as it is working fine in local host...
error is:
The exception message is 'Cannot open database "bcounts" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'
webconfig.file is:
<configuration>
<connectionstrings>
<add name="bcountsdb" connectionstring="Data Source=123-PC;Initial Catalog=bcounts;Integrated Security=True" providername="System.Data.SqlClient">
<system.web>
<compilation debug="true" targetframework="4.0">
<system.servicemodel>
<bindings>
<wshttpbinding>
<binding name="CustomAuthentication">
<security mode="Message">
<message clientcredentialtype="UserName">
<services>
<service name="test.ipadservice" behaviorconfiguration="servicebehavior">
<endpoint address="" binding="webHttpBinding" contract="test.Iipadservice" behaviorconfiguration="web">
<endpoint address="mex" binding="mexHttpBinding">
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseaddress="http://localhost/">
</baseAddresses>
<behaviors>
<servicebehaviors>
<behavior name="servicebehavior">
<!-- 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">
<servicecredentials>
<!-- <servicecertificate findvalue="MyWebSite">
storeLocation="LocalMachine"
storeName="My"
x509FindType="FindBySubjectName" />-->
<usernameauthentication usernamepasswordvalidationmode="Custom" customusernamepasswordvalidatortype="test.usernamepassvalidator,test">
<endpointbehaviors>
<behavior name="web">
<webhttp automaticformatselectionenabled="false">
defaultBodyStyle="Wrapped" defaultOutgoingResponseFormat="Json"
helpEnabled="true" />
<servicehostingenvironment multiplesitebindingsenabled="false">
<system.webserver>
<modules runallmanagedmodulesforallrequests="true">
kindly help me soon :(