Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. I am not able to run the page on browser.

I am not able to run the page on browser.

Scheduled Pinned Locked Moved WCF and WF
csharpasp-netwcflinqdesign
2 Posts 2 Posters 15 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dinesh92
    wrote on last edited by
    #1

    Hi team, I have made a wcf service with asp.net website. service runs on localhost,but the page default.aspx which is linked to the service doesn't run. please help me in this regards. IService:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.ServiceModel;
    using System.Text;

    // NOTE: If you change the interface name "IService" here, you must also update the reference to "IService" in Web.config.
    [ServiceContract]
    public interface IService
    {
    [OperationContract]
    string hello(string m);

    }

    Service.cs:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.ServiceModel;
    using System.Text;

    // NOTE: If you change the class name "Service" here, you must also update the reference to "Service" in Web.config and in the associated .svc file.
    public class Service : IService
    {
    public string hello(string n)
    {
    return n;
    }

    }

    Default.aspx:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.ServiceModel;

    namespace MyWebSite
    {
    public partial class _Default : System.Web.UI.Page
    {
    //MyService.ServiceClient client = new MyWebSite.localhost.ServiceClient();
    localhost.Service cl = new MyWebSite.localhost.Service();
    protected void Page_Load(object sender, EventArgs e)
    {

        }
    
        protected void Button1\_Click(object sender, EventArgs e)
        {
            string name = TextBox1.Text;
    
            Response.Write("Hello....."+cl.hello(name));
        }
    }
    

    }

    L 1 Reply Last reply
    0
    • D Dinesh92

      Hi team, I have made a wcf service with asp.net website. service runs on localhost,but the page default.aspx which is linked to the service doesn't run. please help me in this regards. IService:

      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Runtime.Serialization;
      using System.ServiceModel;
      using System.Text;

      // NOTE: If you change the interface name "IService" here, you must also update the reference to "IService" in Web.config.
      [ServiceContract]
      public interface IService
      {
      [OperationContract]
      string hello(string m);

      }

      Service.cs:

      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Runtime.Serialization;
      using System.ServiceModel;
      using System.Text;

      // NOTE: If you change the class name "Service" here, you must also update the reference to "Service" in Web.config and in the associated .svc file.
      public class Service : IService
      {
      public string hello(string n)
      {
      return n;
      }

      }

      Default.aspx:

      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Web;
      using System.Web.UI;
      using System.Web.UI.WebControls;
      using System.ServiceModel;

      namespace MyWebSite
      {
      public partial class _Default : System.Web.UI.Page
      {
      //MyService.ServiceClient client = new MyWebSite.localhost.ServiceClient();
      localhost.Service cl = new MyWebSite.localhost.Service();
      protected void Page_Load(object sender, EventArgs e)
      {

          }
      
          protected void Button1\_Click(object sender, EventArgs e)
          {
              string name = TextBox1.Text;
      
              Response.Write("Hello....."+cl.hello(name));
          }
      }
      

      }

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Dinesh92 wrote:

      but the page default.aspx which is linked to the service doesn't run

      What do you mean by doesn't run?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups