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

Discussion in 'ASP .Net Web Services' started by Simon, Feb 23, 2006.

  1. Simon

    Simon Guest

    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
    Simon, Feb 23, 2006
    #1
    1. Advertising

  2. 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" <nospam> wrote in message
    news:...
    > 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
    >
    >
    Serkan DIRIARIN, Feb 24, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. timmso

    Unrecognized database format

    timmso, Dec 13, 2003, in forum: ASP .Net
    Replies:
    7
    Views:
    3,800
  2. Rabbit
    Replies:
    1
    Views:
    1,435
    Rabbit
    May 3, 2006
  3. tesis
    Replies:
    2
    Views:
    313
    Saverio Tedeschi
    Nov 2, 2005
  4. TekCat

    ERROR: Request format is unrecognized

    TekCat, Nov 8, 2006, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    481
    TekCat
    Nov 9, 2006
  5. Damonica Miller
    Replies:
    4
    Views:
    163
    Damonica Miller
    Oct 9, 2007
Loading...

Share This Page