new to all this web service stuff... well i've just made one real quick in .net 2003 usin c#.
| namespace WebService { public class Service1 : System.Web.Services.WebService { public Service1(){ InitializeComponent(); } #region Component Designer generated code private IContainer components = null; private void InitializeComponent(){ } protected override void Dispose( bool disposing ){ if(disposing && components != null) { components.Dispose(); } base.Dispose(disposing); } #endregion [WebMethod] public string logOn() { return "Logged On!";} [WebMethod] public string tokenID(){ return Guid.NewGuid ().ToString();} [WebMethod] public string password(string password){ if(password == "pass"){ return "password ok";} else{ return "incorrect password";} } } } |
So then i create the proxy using "wsdl /l:CS /protocol:SOAP http://localhost/WebService/Service1.asmx WSDL" in the visual studio cmd. Before i compile it to a dll, i changed the following line in notepad;
public Service1() {
this.Url = "http://*my ip*/WebService/Service1.asmx";
}
Then i use this to create the .dll to include:
csc /t:library /r:System.Web.Services.dll /r:System.Xml.dll Service1.cs
Right now when i browse to that from a computer on the network i can download the file or my friends get this:
<%@ WebService Language="c#" Codebehind="Service1.asmx.cs" Class="WebService.Service1" %>
Now i know somethings not up because the client programs i'm testing it with are all throwing errors :\
"An unhandled exception of type 'System.Net.WebException' occurred in system.web.services.dll
Additional information: The request failed with HTTP status 405: Method not allowed."
So my question would be how do i go aboot making officially public for my clients to access, i have IIS setup on a local machine if that helps.

Web Service access.
Tom416
Preim,
Did you happen to figure this problem out, as I'm stuck with the same situation Any help will be appreciated!
Thanks in advance
Rumi
DWalker
hi,
can u plz share how u solved the problem as even i am having the same problem... and i am not able to resolve what in the hell is going wrong! i have already spent 2 sleepless nights for this problem. search over internet has not been much of help as well...
so can any of u guys help me out on this.. i will really appreciate the concern.
JohnHenderson
I am getting the "The request failed with HTTP status 405: Method not allowed" error when trying to access a web service from my site.
I noticed that you had faced the same issue earlier. Can you please tell me how you had solved this issue
Thanks,
gokul
SonOfPirate
I am having the same problem with a Windows Communication Foundation Web Service. Was this issue resolved and if so how
Thanks,
Joe
JFox
Daniel Roth
Mats Johansson