[RESOLVED]SlideShowExtender not working in production server

SlideShowExtender gets images list from webservice. This works fine on localhost in VS2008 but doesnot work on the production hosting server. Hosting is a shared hosting provider. I have tried a simple ‘Hello World’ webservice and this works fine in both
environments. The webservice is getting a list of image files from a folder in the website file system. i have been trawling google and forums for over a day now and while people have had problems no one has provided a solution. Output from the invoke button
in localhost is:

<ArrayOfSlide>
<Slide>
<ImagePath>../images/show/01_Clinic2.jpg</ImagePath>
<Name>01_Clinic2.jpg</Name>
<Description/>
</Slide>
<Slide>
<ImagePath>../images/show/02_banner_01.jpg</ImagePath>
<Name>02_banner_01.jpg</Name>
<Description/>
</Slide>
</ArrayOfSlide>

etc;

Does any one have any ideas? Where to start? It would be helpful if I could see the webservice output?

Thanks in advance.

Hi

If it is working locally then there will be problem image path. Please check that img path. or test with some hardcoded URL .

 

Thanks chandradev1 for replying

I have tried with the imagepaths hard coded and still does not work.
Do you know of a way that I can see what the output on the production environment is, so that I can see what image path it is serving?

The following is the webservice function thaty I am using, I can’t see any reason why it should be different to the local path.

<WebMethod()> _
    Public Function GetSlides() As AjaxControlToolkit.Slide()
        Dim imagenames As String() = System.IO.Directory.GetFiles(Server.MapPath("~/images/show"))
        Dim photos As AjaxControlToolkit.Slide() = New AjaxControlToolkit.Slide(imagenames.Length – 1) {}
        For i As Integer = 0 To imagenames.Length – 1
            Dim file As String() = imagenames(i).Split("")
            photos(i) = New AjaxControlToolkit.Slide("../images/show/" & file(file.Length – 1), file(file.Length – 1), "")
         Next
        Return photos
    End Function

code for the aspx file includes

<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    <Services>
    <asp:ServiceReference Path="~/WebServices/NameService.asmx" />
    <asp:ServiceReference Path="~/WebServices/ShowSlides.asmx" />
    </Services>
    </asp:ScriptManagerProxy>

 <asp:SlideShowExtender ID="sseHome" runat="server" AutoPlay="True" Loop="True"

                TargetControlID="imgSlides" SlideShowServiceMethod="GetSlides"
                PlayInterval="1000" SlideShowServicePath="~/WebServices/ShowSlides.asmx">
    </asp:SlideShowExtender>         
     <asp:Image ID="imgSlides" runat="server" Height="326" Width="830" ImageUrl="~/images/show/01_Clinic2.jpg" ImageAlign="Middle" />

Thanks

Hi,

Make sure you install the correct version of the AjaxControlToolkit:

Version 3.0.20229 2008-02-29 release of the AJAX Control Toolkit targets the official release of .NET Framework 3.5 and Visual Studio 2008.

Version 1.0.20229 You can also download the Toolkit for .NET Framework 2.0, ASP.NET AJAX 1.0 and Visual Studio 2005.

Version 3.0.40412

April 12, 2010 release of the AJAX Control Toolkit for ASP.NET 3.5 Service Pack 1 and Visual Studio 2008 SP1.

Version 4.1.51116.0

Nov 16 2011 release of the AJAX Control Toolkit for ASP.NET 4.0 and Visual Studio 2010

Then you could add the Ajax Control Toolkit to the VS Toolbox step by step at:http://www.asp.net/ajaxlibrary/act.ashx.

Hi

That can be surely a file reference issue. Check this post for some explanation-

http://forums.asp.net/p/1742058/4695188.aspx/1?Re+CSS+couldn+t+be+retrieve+

thanks
chetan.sarode

I have installed

.Net Framework 3.5 SP1
Visual Studio 2008 Pro SP1 (KB9451401)
AjaxControlToolkit.dll         File version: 3.5.50927.0

Hi

Yes, you can check like this, Type the path of Img folder on browser then you will get all images available in that folder. like this

http://localhost:51002/Frame_In_Asp/img/

Here i have kept for local machine.

If ajax other control is working fine on production server then there is no problem with ajax dll.

I m sure your problem is related with image path.

 

 

Hi all, thanks for your continued input.

I have consumed the output from GetSlides on Production Server into a gridview

these are what I expected (hardcoded in webservice for testing), so why does the SlideShowExtender not like these ImagePaths?
I have also check my local and production web.config files and they both are the same (except for the usually reconfigurations)
I hard coded the above imagepaths into a image container in the aspx page and they displayed fine.

I have deduced that Ajax Toolkit is not working, so I’ll pursue that line and come but to this post when I’ve resolved it.

Thanks to all.

Hi

In production server, what ever image URL you are getting, That image is not getting on server. So you have to give exact path, where the image is availabe on server.

For example

You have kept in Images folder then in subfolder show.

Then your path should be like this

http://yousitename.com/Images/show/1.jpg  then it will display on browser. You try to make your code dynamic in this formate

Hi all thanks for your inputs.

I deduced that the Ajax Control toolkit was not working properly. After reading numerous post elsewhere I added

EnablePartialRendering="true" CombineScripts="false" LoadScriptsBeforeUI="false"

to the <asp:ToolkitScriptManager tag
i.e.
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true" CombineScripts="false" LoadScriptsBeforeUI="false">
    </asp:ToolkitScriptManager>


and everything works perfectly. Apparently a bug in the Control Toolkit.

Cheers.

Leave a Reply