GroupDocs.Signature UI Application IIS hosting

Hello GroupDocs team!


I try to run <span class=“final-path” style=“box-sizing: border-box; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Helvetica, Arial, sans-serif, “Apple Color Emoji”, “Segoe UI Emoji”, “Segoe UI Symbol”; font-size: 16px; background-color: rgb(255, 255, 255);”>Signature.Net.Sample.Mvc<span class=“final-path” style=“box-sizing: border-box; font-weight: 600; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Helvetica, Arial, sans-serif, “Apple Color Emoji”, “Segoe UI Emoji”, “Segoe UI Symbol”; font-size: 16px; background-color: rgb(255, 255, 255);”> <span class=“final-path” style=“box-sizing: border-box; font-weight: 600; font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Helvetica, Arial, sans-serif, “Apple Color Emoji”, “Segoe UI Emoji”, “Segoe UI Symbol”; font-size: 16px; background-color: rgb(255, 255, 255);”>(GitHub - groupdocs-signature/GroupDocs.Signature-for-.NET: GroupDocs.Signature for .NET examples, plugins and showcase projects)

It works nice with IIS Express.
But when I run it in Visual Studio on Local IIS with virtual directory there are many errors in console of Google Chrome.
Url for images and other resources are incorrect.
For example: " http://localhost/gd-signature/embedded/images/mainbg.png 404 (Not Found)"
There is no virtual directory name after http://localhost/.
I researched that variables related to url creation are located in _Layout.cshtml (gdSignatureHostUrl ,ViewContext.AppPath, etc)
But i can not manage how to set them values in correct way.

Could you help me with that, please?


Hi,


Thanks for taking interest in GroupDocs.Signature for .NET.
What I infer from your question is, you are trying to run the project on your local IIS and you are facing some issues. Let’s address them gradually:
1- But when I run it in Visual Studio on Local IIS with virtual directory there are many errors in console of Google Chrome.
Url for images and other resources are incorrect.
For example: " http://localhost/gd-signature/embedded/images/mainbg.png 404 (Not Found)"
We
are able to reproduce this issue at our end. Hence, it has been logged here.
You can keep track of the issue’s status by following the above mentioned link. Moreover, we will inform you as soon as we get any update on this issue
from the concerned team.

As far as your second question is concerned:
There is no virtual directory name after http://localhost/.
I researched that variables related to url creation are located in _Layout.cshtml (gdSignatureHostUrl ,ViewContext.AppPath, etc)
But i can not manage how to set them values in correct way.
Can
you please elaborate it a bit more? Did you create a virtual directory while configuring the site to use local IIS with some project URL instead of IIS express?

Best Regards
Hi Rida,

Thank you for response.
We are interested in your product.
Actually to start development I have to demonstrate Signature.Net.Sample.Mvc hosted on IIS for possible clients.

Here are details about my second question.
You are right. In Visual Studio in properties of project to run Signature.Net.Sample.Mvc on Local IIS I write virtual directory name in Project URL field(see attached screen)

gdSignatureHostUrl from _Layout.cshtml is used in JavaScript funcions in DocViewer.all.part1.js and DocViewer.all.part2.js
Also those code snippets affects URL creating in JS:

var gdSignaturePrefix ='gd-signature';
ViewContext.AppPath = '/gd-signature/signature2/';
ViewContext.PortalServiceHost = '/gd-signature/signature2/';
var gdSignatureHostUrl = '';

Best regards

Hi,

Thanks for coming back.

While running the
project on my local IIS, it appends the project URL(and the virtual directory’s path) to the base address
like “http://localhost/ProjectURL” (please have a look at this screenshot), So, we are not able to reproduce this issue at our end.
However, we have added the
information you have provided to the issue logged already and the concerned team
will investigate it. We will try to resolve the issue at our earliest and will update you on the issue’s status as soon
as possible.

Best Regards

Hi,


Thank you for informing me
I didn`t say that project URL in web browser is incorrect
It was about URLs of images and resources (in console of Google Chrome)
Thank you for willing to help

Best regards

Hi,

I apologize for the confusion. When I said we weren’t able to reproduce the issue I was referring to the second question from your initial post where you said and I quote “There is no virtual directory name after http://localhost/.”. We are getting the virtual directory name at our end. Please let me know if I misunderstood your concern.
Now about the image URLs being incorrect, we really appreciate the research you have done and the points you have mentioned about the reasons behind the URL. Since this issue has been reproduced at our end we will try to resolve it at our earliest.<br style=“color: rgb(0, 0, 0); font-family: “Times New Roman”; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;”><br style=“color: rgb(0, 0, 0); font-family: “Times New Roman”; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;”><div style=“color: rgb(0, 0, 0); font-family: “Times New Roman”; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;”>

Best Regards

Hi,

It's ok. Never mind.
I should have written that there is only one single issue about Image URLs

Best regards
Hi,

Is there any progress on this issue?
I will appreciate your help with this situation.

Best regards

Hi,

Sorry for being late in responding.

We have investigated the issue and reached at the conclusion that in the project we are referencing the static files using URLs like this: /images/file.jpg. Since your site is a virtual directory rather than an application in IIS, IIS will be looking in the “C:/inetpub/wwwroot” folder(The Default Website’s folder) for those static files and hence return a 404 error.

Now there can be a number of ways to handle this issue, the simplest one is explained here:
1- Change the Project Url to http://localhost/
2- You might get a message saying that localhost is mapped to a different folder and do you want to change it, select "Yes"
3- Now when you run the project, you can see the images(you can change the project url and append a name to it afterwards too)

What happens is that now you have changed the physical path of the default website running on local IIS and it now points towards your project’s directory instead of wwwroot. Another solution can be adding a new website using IIS Manager, with a physical address pointing towards your project’s path and having bound at some port other than 80, in this case you need to use a project URL like http://localhost:1024/name where 1024 must be the port that is bound to the new website(port number may vary)

Hope this solves your issue, in case it doesn’t, feel free to ask again.
Looking forward to hear from you.

Best Regards,