R – webservice deployment error in IIS

netweb services

I created a sample webservice which contain default 'HelloWorld' function as 'webmethod'

when tried to deploy webservice i gave web.config,app_data,app_code,.asmx file and Bin file in IIS .but i am getting this error

Server Error in '/WebSite1' Application.
Configuration Error
Description: 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.
Parser Error Message: Unrecognized configuration section 'connectionStrings'
Source Error:
Line 10:
Line 11:
Line 12:
Line 13:
Line 14:

this is my webconfig file

Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
–>

section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
–>

section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
        <error statusCode="403" redirect="NoAccess.htm" />
        <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    -->
</system.web>

Best Answer

It could be that IIS is trying to use the wrong version of .NET. In IIS, go to your web site's (or virtual directory's) properties. Go to the ASP.NET tab, and select version 2.x.

If it's not an option, you may need to run this command from a command window:

aspnet_regiis -i