Request format is unrecognized for URL unexpectedly ending in '/Login'

S

Simon

Hi,

I'm beginner on WebServices, I have developed an WebService with some
methods.
I have used vs2005 to build the web application and Microsoft Web Deployment
project to compile the web application to publish on the web site.
When I call the method Login using a post form on my computer (localhost)
work fine, but when I can try to call the webservice locate on company web
site I have this error:
Request format is unrecognized for URL unexpectedly ending in '/Login'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Request format is
unrecognized for URL unexpectedly ending in '/Login'.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Request format is unrecognized for URL
unexpectedly ending in '/Login'.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type
type, HttpContext context, HttpRequest request, HttpResponse response)
+490982
System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext
context, String verb, String url, String filePath) +104
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
+175
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+120
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +155



I call from this html form:
<html>
<head>
<link rel="alternate" type="text/xml"
href="http://site/dir1/dir2/WebServices/ServicesWS.asmx?disco" />
</head>
<body>
<form target="_blank"
action='http://site/dir1/dir2/WebServices/ServicesWS.asmx/Login'
method="POST">
<table cellspacing="0" frame=box width=400px>
<tr>
<td colspan=2>Login</td>
</tr>
<tr>
<td >Account:</td>
<td><input type="text" name="account"></td>
</tr>
<tr>
<td>password:</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td align="right" colspan=2><input type="submit" value="Invoke"
class="button"></td>
</tr>
</table>
</form>
</html>

Is possible calling the webservice throw a post form or not?
If no, How I do to calling the webservice?

Thanks in advance

Simon
 
S

Serkan DIRIARIN

hi simon... your problem sourcing from url that you're using...
http://site/dir1/dir2/WebServices/ServicesWS.asmx/Login is invalid
webservice method call url...

you have to use
http://site/dir1/dir2/WebServices/ServicesWS.asmx?op=webmethodname
its mean for example...
http://site/dir1/dir2/WebServices/ServicesWS.asmx?op=login

good works.....

Simon said:
Hi,

I'm beginner on WebServices, I have developed an WebService with some
methods.
I have used vs2005 to build the web application and Microsoft Web
Deployment project to compile the web application to publish on the web
site.
When I call the method Login using a post form on my computer (localhost)
work fine, but when I can try to call the webservice locate on company web
site I have this error:
Request format is unrecognized for URL unexpectedly ending in '/Login'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Request format is
unrecognized for URL unexpectedly ending in '/Login'.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Request format is unrecognized for URL
unexpectedly ending in '/Login'.]

System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type
type, HttpContext context, HttpRequest request, HttpResponse response)
+490982

System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext
context, String verb, String url, String filePath) +104
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, VirtualPath path, String pathTranslated, Boolean
useAppConfig) +175

System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+120
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +155



I call from this html form:
<html>
<head>
<link rel="alternate" type="text/xml"
href="http://site/dir1/dir2/WebServices/ServicesWS.asmx?disco" />
</head>
<body>
<form target="_blank"
action='http://site/dir1/dir2/WebServices/ServicesWS.asmx/Login'
method="POST">
<table cellspacing="0" frame=box width=400px>
<tr>
<td colspan=2>Login</td>
</tr>
<tr>
<td >Account:</td>
<td><input type="text" name="account"></td>
</tr>
<tr>
<td>password:</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td align="right" colspan=2><input type="submit" value="Invoke"
class="button"></td>
</tr>
</table>
</form>
</html>

Is possible calling the webservice throw a post form or not?
If no, How I do to calling the webservice?

Thanks in advance

Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top