M-Eazy Jo
M-Eazy Jo

Reputation: 1

Web Service Hosting

I coded web service using ASP.NET and host it in server but when I open in browser give me this :

<%@ WebService Language="C#" CodeBehind="WSAdmin.asmx.cs" Class="WebApplication1.WSAdmin" %>

and this my web.config :

<configuration>
       <system.web>
          <webServices>
             <protocols>
                <add name= " HttpGet"/>
             </protocols>
          </webServices>
             <compilation debug= "true"/>
        </system.web>
<connectionStrings>
<add name="data" connectionString= "My Connection String"
<providerName= "System.Data.SqlClient"/>

Upvotes: 0

Views: 49

Answers (1)

Madushan
Madushan

Reputation: 7428

It seems like your web server does not understand ASMX.

This is usually because the ASP.NET handler is not installed or configured correctly.

Type "turn Windows features on or off" into the start menu, and make sure .NET and ASP.NET under IIS is installed.

Configuring your system as below image is usually enough, though the exact features depend on which .NET framework and features you use. Also in IIS, make sure your site runs under the correct version of .NET.

windows features dialog

Upvotes: 1

Related Questions