Problem updating web reference in Visual Studio 2005
-
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.
-
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.
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
-
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
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?
-
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?
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
-
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
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?
-
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?
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