Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...AJAX Web Services Issue- Michela Washington Pls readAJAX Web Services Issue- Michela Washington Pls read
Previous
 
Next
New Post
9/12/2008 12:00 PM
 

 I have developed a module using LINQ & AJAX web services (cascading dropdown sample using AjaxControlToolkit).

Setup: .asmx file deployed to root & its .vb file in App_Code folder

Issue: Everything works fine on localhost but on production the .vb file of the web service throws an exception. Cant seem to figure out the problem. Do we need to package & deploy ajax web services in a differet way? Do we need to use IWeb moduke instead to accomplish this? Is there a specific way to deploy LINQ & Ajax Web Services?

Any inputs will be appreciated.

 
New Post
9/12/2008 1:52 PM
 

This provides an example of using webservices with a DotNetNuke module:

http://dnnsilverlight.adefwebserver.com/Samples/SilverlightXAML/tabid/56/Default.aspx

Notice the .asmx is in the folder of the module not in the root of the website:

App_Code/IWebXAML

DesktopModules/IWebXAML



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
9/12/2008 7:42 PM
 

Michael: Are you recommending the webservice setup as above? Will it not work if the web service (.asmx) is in the root? Is that not recommended?

 
New Post
9/12/2008 8:20 PM
 

The reason it is not recommended for you put it in the root is that you want it in the directory for the module so you can easily create a module package in development and then install the module in production.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
9/21/2008 2:56 PM
 

Hi Michael,

  Thx for your suggestion. It worked partially only. Here is the issue: I have an accordion control with 5 panes. On page 1 I have 2 pairs of Ajax Cascading Dropdownlist for State & Cities (by State). When the page first loads the web service works fine. Here is the output from fiddler. The web service path is '~/DesktopModules/SmartLoans/SmartLoansService.asmx'

 USE CASE: It is live on www.IndiaSmartloans.com; Select 'Country of Residence' and click 'Start Request' button. It redirects to PropertyLoans Module which is where the issue occurs. Once you complete the first pane and click on 'Goto Pane 2" and now when you go back to Pane 1 the dropdownlists for State & Cities show 'Method Error 500'. See BAD REQUEST Section below.

Error Diagnosis:

If you notice here the web service URL for HTTP REQUEST for 'GetIndianStates' got transformed as below. The string highlighted in orange got appended to the web service call which caused the 'Method Error 500' as the path for web service is now incorrect. This causes a System.InvalidOperationException. This appears to be some sort of HTTP handler issue. It works fine on the dev (localhost) environment but throws this error in production. I have hit a dead end on this one and any direction will be appreciated.

FROM: (Good Request)

POST /DesktopModules/SmartLoans/SmartLoansService.asmx/GetIndianStates HTTP/1.1

TO: (Bad Request)

POST /Home/tabid/36/ctl/PropertyLoans/mid/382/CTRYID/d8cb0136-0957-449c-bef6-db9c456dbb17/PRODID/1/ResStatusID/4c630dc9-ed19-479f-984c-c4dd69a2c7eb/ProdTypeID/1/DesktopModules/SmartLoans/SmartLoansService.asmx/GetIndianStates HTTP/1.1

GOOD REQUEST:

HTTP Request: GetIndianStates Web Service Call using AJAX CascadingDropdown

POST /DesktopModules/SmartLoans/SmartLoansService.asmx/GetIndianStates HTTP/1.1
Accept: */*
Accept-Language: en-us
Referer: http://www.indiasmartloans.com/Home/tabid/36/ctl/PropertyLoans/mid/382/CTRYID/d8cb0136-0957-449c-bef6-db9c456dbb17/PRODID/1/ResStatusID/4c630dc9-ed19-479f-984c-c4dd69a2c7eb/ProdTypeID/1/Default.aspx
Content-Type: application/json; charset=utf-8
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; MS-RTC LM 8)
Host: www.indiasmartloans.com
Content-Length: 45
Connection: Keep-Alive
Pragma: no-cache
Cookie: .ASPXANONYMOUS=3tLsTUdGyQEkAAAAYzFmOWM4NmMtMGQ0MS00YWQ0LTgwY2QtZDMyY2ViNTU1ZDRh0; language=en-US

HTTP RESPONSE: GetIndianStates
HTTP/1.1 200 OK
Date: Sun, 21 Sep 2008 16:30:53 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: PleskWin
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: application/json; charset=utf-8
Content-Length: 5385

BAD REQUEST

If HTTP REQUEST: GETIndianStates
POST /Home/tabid/36/ctl/PropertyLoans/mid/382/CTRYID/d8cb0136-0957-449c-bef6-db9c456dbb17/PRODID/1/ResStatusID/4c630dc9-ed19-479f-984c-c4dd69a2c7eb/ProdTypeID/1/DesktopModules/SmartLoans/SmartLoansService.asmx/GetIndianStates
HTTP/1.1
Accept: */*
Accept-Language: en-us
Referer: http://www.indiasmartloans.com/Home/tabid/36/ctl/PropertyLoans/mid/382/CTRYID/d8cb0136-0957-449c-bef6-db9c456dbb17/PRODID/1/ResStatusID/4c630dc9-ed19-479f-984c-c4dd69a2c7eb/ProdTypeID/1/Default.aspx
Content-Type: application/json; charset=utf-8
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; MS-RTC LM 8)
Host: www.indiasmartloans.com
Content-Length: 45
Connection: Keep-Alive
Pragma: no-cache
Cookie: .ASPXANONYMOUS=3tLsTUdGyQEkAAAAYzFmOWM4NmMtMGQ0MS00YWQ0LTgwY2QtZDMyY2ViNTU1ZDRh0; language=en-US

{"knownCategoryValues":"","category":"State"}

HTTP RESPONSE

HTTP/1.1 500 Internal Server Error
Date: Sun, 21 Sep 2008 16:32:13 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: PleskWin
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 5696

<html>
    <head>
        <title>No web service found at: /Home/tabid/36/ctl/PropertyLoans/mid/382/CTRYID/d8cb0136-0957-449c-bef6-db9c456dbb17/PRODID/1/ResStatusID/4c630dc9-ed19-479f-984c-c4dd69a2c7eb/ProdTypeID/1/DesktopModules/SmartLoans/SmartLoansService.asmx.</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

            <h2> <i>No web service found at: /Home/tabid/36/ctl/PropertyLoans/mid/382/CTRYID/d8cb0136-0957-449c-bef6-db9c456dbb17/PRODID/1/ResStatusID/4c630dc9-ed19-479f-984c-c4dd69a2c7eb/ProdTypeID/1/DesktopModules/SmartLoans/SmartLoansService.asmx.</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description: </b>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.

            <br><br>

            <b> Exception Details: </b>System.InvalidOperationException: No web service found at: /Home/tabid/36/ctl/PropertyLoans/mid/382/CTRYID/d8cb0136-0957-449c-bef6-db9c456dbb17/PRODID/1/ResStatusID/4c630dc9-ed19-479f-984c-c4dd69a2c7eb/ProdTypeID/1/DesktopModules/SmartLoans/SmartLoansService.asmx.<br><br>

            <b>Source Error:</b> <br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code>

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.</code>

                  </td>
               </tr>
            </table>

            <br>

            <b>Stack Trace:</b> <br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>

[InvalidOperationException: No web service found at: /Home/tabid/36/ctl/PropertyLoans/mid/382/CTRYID/d8cb0136-0957-449c-bef6-db9c456dbb17/PRODID/1/ResStatusID/4c630dc9-ed19-479f-984c-c4dd69a2c7eb/ProdTypeID/1/DesktopModules/SmartLoans/SmartLoansService.asmx.]
   System.Web.Script.Services.WebServiceData.GetWebServiceData(HttpContext context, String virtualPath, Boolean failIfNoData, Boolean pageMethods, Boolean inlineScript) +917
   System.Web.Script.Services.RestHandler.CreateHandler(HttpContext context) +105
   System.Web.Script.Services.RestHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +105
   System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +145
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +175
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +161
</pre></code>

                  </td>
               </tr>
            </table>

            <br>

            <hr width=100% size=1 color=silver>

            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

            </font>

    </body>
</html>
<!--
[InvalidOperationException]: No web service found at: /Home/tabid/36/ctl/PropertyLoans/mid/382/CTRYID/d8cb0136-0957-449c-bef6-db9c456dbb17/PRODID/1/ResStatusID/4c630dc9-ed19-479f-984c-c4dd69a2c7eb/ProdTypeID/1/DesktopModules/SmartLoans/SmartLoansService.asmx.
   at System.Web.Script.Services.WebServiceData.GetWebServiceData(HttpContext context, String virtualPath, Boolean failIfNoData, Boolean pageMethods, Boolean inlineScript)
   at System.Web.Script.Services.RestHandler.CreateHandler(HttpContext context)
   at System.Web.Script.Services.RestHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
   at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--><!--
This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...AJAX Web Services Issue- Michela Washington Pls readAJAX Web Services Issue- Michela Washington Pls read


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out