Works on locaol Machine but doesn't work on live server

Last post 12-07-2006 12:35 PM by Keith Walton. 3 replies.

Sort Posts:

  • Works on locaol Machine but doesn't work on live server

    10-19-2006, 10:46 AM
    • Loading...
    • jcai
    • Joined on 10-18-2006, 7:33 PM
    • Posts 5

    I created an atlas page:

    <cc1:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True">

    <Services>

    <cc1:ServiceReference Path="AtlasServicestesting.asmx" Type="text/javascript" />

    </Services>

    </cc1:ScriptManager>

    <table border="0" cellspacing="0" cellpadding="0">

    <tr>

    <td align="left" valign="top" colspan="3" style="height: 8px"><img src="../../images/spacer.gif" width="329" height="8" /></td>

    </tr>

    <tr class="copy_bold">

    <td align="left" style="height: 13px; width: 135px" valign="top">

    <span><asp:Label ID="Label1" runat="server" Text="Available Dates"></asp:Label></span></td>

    <td align="left" style="height: 13px; width: 175px" valign="top">

    <span><asp:Label ID="Label2" runat="server" Text="Location"></asp:Label></span></td>

    <td align="left" style="height: 13px; width: 30px" valign="top">

    </td>

    </tr>

    <tr class="copy_standard">

    <td align="left" style="height: 13px; width: 135px" valign="top">

    <span><asp:Label ID="lblDates" runat="server" Text=""></asp:Label></span></td>

    <td align="left" style="height: 13px; width: 175px" valign="top">

    <span><asp:Label ID="lblLocation" runat="server" Text=""></asp:Label></span></td>

    <td align="left" style="height: 13px; width: 30px" valign="top">

    </td>

    </tr>

    </table>

    <br />

    <input id="T1" type="button" value="Testing" onclick="sayHelloFromWS();"/>

    </div>

    <script type="text/javascript">

    function sayHelloFromWS() {

    AtlasServicesTesting.HelloWorld(onComplete);

    }

    function onComplete(result) {

    var tb =result.getItem(0)

    var i=0;

    var strDates=""

    var strLocation=""

    var strReturn="<br />"

    for(i=0;i<tb.get_length();i++)

    {

    strDates+=tb.getItem(i).getProperty("Dates")+strReturn

    strLocation+=tb.getItem(i).getProperty("Lev")+strReturn

    }

    document.getElementById("lblDates").innerHTML=strDates

    document.getElementById("lblLocation").innerHTML=strLocation

    }

    </script>

    My Webservice Page just like:

    <WebMethod()> _

    Public Function HelloWorld() As DataSet

    Dim StrSql As String

    StrSql = "Select * from ref_SchoolLev where month(Actdates)=10 and Lev='G4'"

    Dim StrConn As String

    StrConn = "........"

    Dim myConn As New SqlConnection(StrConn)

    Dim myAdapter As SqlDataAdapter

    myAdapter = New SqlDataAdapter(StrSql, myConn)

    myConn.Open()

    Dim myDataset As New DataSet

    myAdapter.Fill(myDataset)

    myConn.Close()

    Return myDataset

    End Function

    I also change the web.configure file. And the page works well when I publish the whole site to local server. But it gives me error message like: "object doesn't support this property ot method and The server method 'HelloWorld' failed with the following error:" when I publish the site to live server. I don't know why. Please help!!!

  • Works on local server and https:// site but not work on live http:// site

    10-19-2006, 3:41 PM
    • Loading...
    • jcai
    • Joined on 10-18-2006, 7:33 PM
    • Posts 5

    I create an Atlas page with ASP.net 2.0 webservice. It works in local server. It also works in https:// live site. But in http:// live site, it doesn't work.

    Another strange thing is that even the http:// live site works on one of my co-worker's computer. We check the setting of browser and windows. But  we don't know what happen. Please help!!!

     

  • Re: Works on local server and https:// site but not work on live http:// site

    12-07-2006, 12:16 PM

    I am having the opposite problem. See the thread http://forums.asp.net/thread/1482244.aspx

    My test server does not use https, but production does. Maybe it has something to do with the way the asp.net ajax *.js files are cached the first time (secure vs. nonsecure). I'm going to try clearing my browsing history...

  • Re: Works on local server and https:// site but not work on live http:// site

    12-07-2006, 12:35 PM
    This didn't help.
Page 1 of 1 (4 items)
Microsoft Communities
Page view counter