Hi Govardhan,
You can merge the configuration for both together into one web.config file, assuming that the configuration does not conflict with each other. If both your web application and web service use the same connection strings, then there shouldnt be a problem, they can just be specified once.
If they do use the same connection string names but different connection strings, you can specify the settings for each in a location tag to apply them to a specific url. For example:
<!-- global settings for the app -->
<connectionStrings>
...
</connectionStrings>
<!-- specific settings for the /webservice.asmx web service -->
<location path="webservice.asmx">
<connectionStrings>
...
</connectionStrings>
</location>
Provided that your code reads this configuration for the specific url, you can do this.
Alternatively, if your web app functionality or the webservice are in their own subdirectory, you can deploy the web.config to the subdirectory to have it apply to that subdirectory only.
I hope this is what you are asking for.
Thanks,
Mike Volodarsky
Program Manager
IIS Core Server
Visit mvolo.com for more inside information on IIS7, IIS and ASP.NET
This posting is provided "AS IS" with no warranties, and confers no rights.