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. Web Development
  3. ASP.NET
  4. Problem updating web reference in Visual Studio 2005

Problem updating web reference in Visual Studio 2005

Scheduled Pinned Locked Moved ASP.NET
helpcsharpvisual-studiosysadminquestion
6 Posts 3 Posters 0 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.
  • C Offline
    C Offline
    Cyrilix
    wrote on last edited by
    #1

    Yesterday, I started creating my web service, and essentially, I have a few projects: -web service project -application that calls web service web methods -common class library From the application, I added a web reference to the web service in the web service project. Today, when I try to update it by right clicking on the web reference, and then going to "Update Web Reference", I get the following error: "There was an error downloading 'http://localhost:2276/NewWebService.asmx'. Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:2276 I'm not too sure why it was working fine yesterday but not now. Is there something that I need to restart, perhaps? Thanks.

    P 1 Reply Last reply
    0
    • C Cyrilix

      Yesterday, I started creating my web service, and essentially, I have a few projects: -web service project -application that calls web service web methods -common class library From the application, I added a web reference to the web service in the web service project. Today, when I try to update it by right clicking on the web reference, and then going to "Update Web Reference", I get the following error: "There was an error downloading 'http://localhost:2276/NewWebService.asmx'. Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:2276 I'm not too sure why it was working fine yesterday but not now. Is there something that I need to restart, perhaps? Thanks.

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Is the web service running? Was there any firewall changes since yesterday?

      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

      C 1 Reply Last reply
      0
      • P Paul Conrad

        Is the web service running? Was there any firewall changes since yesterday?

        "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

        C Offline
        C Offline
        Cyrilix
        wrote on last edited by
        #3

        Isn't Visual Studio supposed to do this for you? Under the web tab for the web service project, I have it set to Use Visual Studio Development Server, and have it assigned to that specific port. I don't know if I have to actually "run" anything to run it though. EDIT: So after hearing you mention that, I just tried to run the web service project itself... and it seems like you have to do that in order to get anything started. In the meantime though, I have another question about web services and web methods (but I'll just reuse this existing thread). I have a web method that takes in a class WebObject (something that I created).

        public class WebObject
        {
        public WebObject(int x, int y, int z)
        {
        this.x = x;
        this.y = y;
        this.z = z;
        }

        private WebObject()
        {
        }
        
        public void SetX(int x)
        {
        	this.x = x;
        }
        
        int x;
        int y;
        int z;
        

        }

        The web method, looks like this:

        [WebMethod]
        public WebObject AnalyzeObject(WebObject obj)
        {
        return obj;
        }

        What's happening though, is that behind the scenes, in some Reference.cs file generated by this web service, the WebObject is being transformed into this:

        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1433")]
        [System.SerializableAttribute()]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
        [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
        public partial class ODPOObject {}

        This new empty class makes it so that I cannot call the web method with my int x, int y, int z constructor, and if I attempt to create THAT WebObject, it complains that I'm passing in the wrong type. I don't understand this concept at all... would anyone be able to please clarify?

        P 1 Reply Last reply
        0
        • C Cyrilix

          Isn't Visual Studio supposed to do this for you? Under the web tab for the web service project, I have it set to Use Visual Studio Development Server, and have it assigned to that specific port. I don't know if I have to actually "run" anything to run it though. EDIT: So after hearing you mention that, I just tried to run the web service project itself... and it seems like you have to do that in order to get anything started. In the meantime though, I have another question about web services and web methods (but I'll just reuse this existing thread). I have a web method that takes in a class WebObject (something that I created).

          public class WebObject
          {
          public WebObject(int x, int y, int z)
          {
          this.x = x;
          this.y = y;
          this.z = z;
          }

          private WebObject()
          {
          }
          
          public void SetX(int x)
          {
          	this.x = x;
          }
          
          int x;
          int y;
          int z;
          

          }

          The web method, looks like this:

          [WebMethod]
          public WebObject AnalyzeObject(WebObject obj)
          {
          return obj;
          }

          What's happening though, is that behind the scenes, in some Reference.cs file generated by this web service, the WebObject is being transformed into this:

          [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1433")]
          [System.SerializableAttribute()]
          [System.Diagnostics.DebuggerStepThroughAttribute()]
          [System.ComponentModel.DesignerCategoryAttribute("code")]
          [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
          public partial class ODPOObject {}

          This new empty class makes it so that I cannot call the web method with my int x, int y, int z constructor, and if I attempt to create THAT WebObject, it complains that I'm passing in the wrong type. I don't understand this concept at all... would anyone be able to please clarify?

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          Cyrilix wrote:

          Isn't Visual Studio supposed to do this for you?

          When you run the web service from VS, yes. But without VS, you need to have it in IIS. At least I think so ( I use the casini web server and it works fine there )...

          "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

          C 1 Reply Last reply
          0
          • P Paul Conrad

            Cyrilix wrote:

            Isn't Visual Studio supposed to do this for you?

            When you run the web service from VS, yes. But without VS, you need to have it in IIS. At least I think so ( I use the casini web server and it works fine there )...

            "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

            C Offline
            C Offline
            Cyrilix
            wrote on last edited by
            #5

            Since you already replied, and I was a little late in editing, I'll add the other part of my last post to this reply: I have a web method that takes in a class WebObject (something that I created).

            public class WebObject
            {
            public WebObject(int x, int y, int z)
            {
            this.x = x;
            this.y = y;
            this.z = z;
            }

            private WebObject()
            {
            }
            
            public void SetX(int x)
            {
            	this.x = x;
            }
            
            int x;
            int y;
            int z;
            

            }

            The web method, looks like this:

            [WebMethod]
            public WebObject AnalyzeObject(WebObject obj)
            {
            return obj;
            }

            What's happening though, is that behind the scenes, in some Reference.cs file generated by this web service, the WebObject is being transformed into this:

            [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1433")]
            [System.SerializableAttribute()]
            [System.Diagnostics.DebuggerStepThroughAttribute()]
            [System.ComponentModel.DesignerCategoryAttribute("code")]
            [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
            public partial class ODPOObject {}

            This new empty class makes it so that I cannot call the web method with a web object created using my int x, int y, int z constructor, and if I attempt to create THAT WebObject, it complains that I'm passing in the wrong type. I don't understand this concept at all... would anyone be able to please clarify?

            N 1 Reply Last reply
            0
            • C Cyrilix

              Since you already replied, and I was a little late in editing, I'll add the other part of my last post to this reply: I have a web method that takes in a class WebObject (something that I created).

              public class WebObject
              {
              public WebObject(int x, int y, int z)
              {
              this.x = x;
              this.y = y;
              this.z = z;
              }

              private WebObject()
              {
              }
              
              public void SetX(int x)
              {
              	this.x = x;
              }
              
              int x;
              int y;
              int z;
              

              }

              The web method, looks like this:

              [WebMethod]
              public WebObject AnalyzeObject(WebObject obj)
              {
              return obj;
              }

              What's happening though, is that behind the scenes, in some Reference.cs file generated by this web service, the WebObject is being transformed into this:

              [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1433")]
              [System.SerializableAttribute()]
              [System.Diagnostics.DebuggerStepThroughAttribute()]
              [System.ComponentModel.DesignerCategoryAttribute("code")]
              [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
              public partial class ODPOObject {}

              This new empty class makes it so that I cannot call the web method with a web object created using my int x, int y, int z constructor, and if I attempt to create THAT WebObject, it complains that I'm passing in the wrong type. I don't understand this concept at all... would anyone be able to please clarify?

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              Strange! Code shows your WebObject class is not marked as serializable. To pass the object to webservice, it should be marked as [Serializable]

              Navaneeth How to use google | Ask smart questions

              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