GridWeb - CustomCommandButton's images get broken after grid command

Hi,

I am reproducing the issue using a simple demo with the following GridWeb:

<acw:GridWeb ID=“GridWeb1” runat=“server” Width=“100%” Height=“100%” ShowLoading=“true” XhtmlMode=“true” OnCustomCommand=“GridWeb1_CustomCommand” PresetStyle=“Standard” EnableAJAX=“true” EnableAsync=“true” RenderHiddenRow=“true”>

<acw:CustomCommandButton Command=“MainMenu” ImageUrl=“Images/MainMenu.png”>
</acw:CustomCommandButton>

</acw:GridWeb>

It works perfectly while running on visual studio. However it gets a strange behavior when deployed.The CustomCommandButton’s image appears when the page first opens or when it is refreshed, but when I click on any of the command buttons the image gets broken.

If I look at the source I see that the path changed to ‘…/Images/MainMenu.png’.

I don’t have any code changing the Image path, but every time an action is performed over the gridweb the path changes to an nonexistent one.

Is there some configuration I am missing?

I appreciate any help you could provide.

Thanks.

@virginia.nascimento,
Thank you for your query.

Could you please share the compilable simple Visual Studio solution which can be used to reproduce the issue here. It will help us to reproduce the issue here and provide assistance accordingly.

GridWeb_13-Feb-2018.zip (5.2 MB)

Here, I attached the project. Thanks for the quick reply.

@virginia.nascimento,
Thank you for the sample solution. I am afraid that I could not run this project in my environment, however, the GridWeb project here works fine. Is it possible for you to download the sample solution and modify it to reproduce the issue here? If it is not feasible for you, please provide us with the steps to make this project run here to observe the issue. Also, share your environment details where this solution is working without errors.

Thanks for your reply.

I use Visual Studio 2017. I modified the sample project. However it is too big to attach here.
Is it possible for you to add the page I created to reproduce the problem in you running project? I used the folder Examples_GridWeb\CSharp:
TestProblemWebgrid.aspx.zip (1.2 KB)

I simply add a GridWeb and a CustomCommandButton with an image that already exists in the project. While running in Visual Studio it works fine.
Then I publish the website using the FileSystem method (with Precompile during publishing checked).

When I open the deployed page, it shows the images correctly.
image.png (3.6 KB)

However if I click one of the buttons or double click a cell, the images get broken.
image.png (4.6 KB)

Inspecting the page source I see that an extra ‘…/’ was added to the image url.
image.png (5.2 KB)

I wonder if there is some configuration I am missing.

Thanks for your help.

@virginia.nascimento,
Please spare us little time to analyze your issue. We will write back here soon to share our feedback.

@virginia.nascimento,
I have added the page into my project and tried the scenario through Visual Studio 2019 . This project was tested by IIS Express and no issue is observed. The same application is deployed on IIS using Visual Studio 2019 which also does not raise any problem in the custom button icon while clicking on multiple places in the grid.

I tried the same scenario by publishing the application to file system and then deploying it on IIS server. I am afraid that when I try to open your page in the browser, it is raising some error which was not faced while deploying it through Visual Studio 2019.

I need to dig out this issue, therefore, it is requested that you may upload the compilable solution to some public file sharing server and share the download link here. You may also publish the project and upload that folder also separately on file-sharing server and share the download link. We will download the solution and analyze it for our reference.

You may also try to deploy the solution on IIS server using Visual Studio 2019 and share the feedback.

Hi,

Thanks for the reply.

I used various projects and obtained the same result when deployed on my IIS, while on Visual Studio works well. I had issues with the acw_client_path too which worked on Visual Studio but not on my IIS.
So I’m assuming there is something wrongly configured on my IIS.

Anyway, I end up not using the Ajax mode on the WebGrid due to other issues with our project, so the problem stop happening.

Once again thank you for your help.

@virginia.nascimento,
Thank you for the feedback. Please feel free to write us back if you have any other query related to Aspose.Cells. We will be happy to provide you assistance at the earliest.

Hi,
I am now creating a new page with much bigger grids and it is really necessary to use EnableAjax=“true”. However, with version 20.10 of Aspose.Cells I am still getting this behavior.

Everything works well while running on Visual Studio 2017, but when published the image path seems to be wrongly interpreted every time an even occurs on the grid.

Here is an example:

When the page is first open:
00 Open page.jpg (56.3 KB)

When I double click on the grid:
01 After clicking button.jpg (59.1 KB)

I have the custom command configured as follows:
<acw:CustomCommandButton Command=“MainMenu” CommandType=“CommandButton”
ImageUrl=“~/img/local.png” Width=“40px” ToolTip=“Execute”>
</acw:CustomCommandButton>

On the browser console I can see that after I click on the grid it is assuming http:\localhost\img\local.png when the correct path is http:\localhost\DemoAspose\img\local.png.
I experimented changing the path to DemoAspose/img/local.png and got the opposite behavior. The image is broken when the page is first open, and starts showing after I click on the grid.

Is there a more correct way to define the image path?

Here is the configuration of the Application Pool:
Application Pool.jpg (136.1 KB)

Here is the configuration of the publish profile:
Publish configuration.jpg (74.9 KB)

Here is the demo ready to deploy:
https://drive.google.com/file/d/13smoWKnVHozqmfvFqIWip7VoT6m5k1zp/view?usp=sharing

Here is the demo project:
https://drive.google.com/file/d/19mFPVSS5WHaWwp7dckV6qOjel5PRfdGT/view?usp=sharing

I appreciate any help you could provide.

Thanks.

@virginia.nascimento,
Please spare us little time to investigate this issue and share our feedback.

@virginia.nascimento,
I have tried your sample project but couldn’t observe any issue. Could you please ensure that correct project is shared here. Following is the video of the running application.
Screen Recording 2020-11-06 at 12.32.29 PM.mp4.zip (163.9 KB)

I, as I explain earlier, everything works well while running on visual studio.
The problem occurs when the site is deployed on IIS. I published the site to two different servers and got the issue.
Is there any server/deployment/publish configuration that might affect this control?
I have no issues with all other asp.net controls as well as DevExpress controls. And this control also works well if I use EnableAjax=‘False’.

@virginia.nascimento,
We are analyzing this scenario and will share our feedback soon.

@virginia.nascimento,
We are having issue while deploying your published package on IIS as the default page is not displayed. Please provide detailed steps or a video which shows the steps which you perform to deploy this package on IIS. We will reproduce the issue here and share our feedback accordingly.