Why doesn't a UNC Link in Pop Up display image?

8629
16
12-10-2015 02:30 PM
JamesLabate
New Contributor II

The test link seems active - when I hover over the image icon in the pop up I get icon indicating a live link but if I click I get nothing.

I've tried customizing the pop up (Custom Button in 3.7 Pop Up Configuration Tool) by adding the image tag and also the medias option. We're using Flex Viewer 3.7.

We have a lot of security here - do the images need to be local on the server where ArcGIS foor Server resides?

Again, I also tried to set height , and width attributes in the pop up custom tab html code. I read somewhere the "type" attribute needs to = "Image" I thought the medias tool was taking care of that..

Has anyone had this issue?

Thanks,

Jim

16 Replies
RobertScheitlin__GISP
MVP Emeritus

Jim,

   Over the years Adobe Flash Player has tightened the security restraints on client file access and UNC paths seems to be one of those areas. I know in years past UNC paths worked flawlessly, but even when they did UNC paths were not the recommended approach. As Flex is a web application you should always be using a actual url in your links. You should setup a virtual directory using the UNC patch and this will give you a true url to use in the link. If you are like others and will say "I am only going to use the app for intranet" then the advice is still the same it is still an app that uses web technology. If your concern is not wanting to open that UNC path to internet users then that is not an issue either if the URL address is not publicly accessible.

JamesLabate
New Contributor II

Robert,

Thanks very much for your advice. Although I have not created a Virtual Directory on our MS Server 2008 R2 before I'm game to try. Unfortunately, I don't have permissions to do so and out IT staff (who've always looked askance at our humble little one box ArGIS for Server Site) - and after a recent dressing down from network overlords are not looking to do any GIS favors for anyone soon.

That said, would simply copying the images to a location on the server eliminate the need for a virtual directory? If the path field in my photo location point file is pointing to a local directory on the server would that be stable and reliable - and display an image in the pop-up?

Or is there no choice but to request a virtual directory be created? If so, i don't quite follow this step in an MS explanation I see online referring to the Physical Path in the Add Virtual Directory Dialogue box: "Type or browse to the physical directory that contains the virtual directory."

Is this valid? How to: Create and Configure Virtual Directories in IIS 7.0

In other words, if the images are on machine A and the virtual directory is on the IIS Server Machine B - how does the virtual directory point to the images on machine A if you're inputting the physical directory that contains the virtual directory in the Add Directory Dialogue box? I don't see where the connection between the virtual directory and the actual physical location of the images is established.

Finally, the link above discusses Configuring a Virtual Directory. Is configuring a tuning exercise or something that if not done will result in the link simply not working?

Thanks in advance for all your help,

Jim

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jim,

  That link is fine. For how to add a virtual directory. No you can not just move the file to a directory on the server and have things work(unless that directory is already established as a virtual directory). You can establish a virtual directory using the UNC path you already have you do not have to use a physical path or drive on you web server. The configuring portion of that link is dealing with asp.net and can be ignored in you case.

0 Kudos
JamesLabate
New Contributor II

Robert,

When you say "You can establish a virtual directory using the UNC path you already have" I'm still not quite sure where the virtual and literal directories "meet"

Say my image files reside on machineA in multiple sub-directories (my operational point layer was generated by the Create Point File from Geotagged Images tool)

So those images are located:

\\machineA\gis\images\MainSt

From what I see in the link I have to name the virtual directoryon the server - machineB - with an alias.

Suppose I name it "Images" - How is that virtual directory standing in for - or as I heard it described, like a shortcut to - \\machineA\gis\images\MainSt?

I'm not seeing how that UNC is connected to the alias virtual directory.

Sorry to belabor this - hopefully it's apparent when I attempt it - if I'm granted the permissions to try.

OK - thanks again Robert. Now, if IT will be half as cooperative as you hopefully I'll get this there.

Much Obliged.

Jim

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jim,

   When you create the virtual directory in IIS  it will ask for an alias and physical path (as covered in the link). So as an example would be Alias: pics and for the physical path use your UNC: \\machineA\gis\images\MainS and once the virtual directory is created then the url that you will use is http://webservername/pics/yourimage.jpg. As long as the web server has access to the UNC path \\machineA\gis\images\MainS then you are good to go. Hopefully this clears things up for you.

JamesLabate
New Contributor II

Thanks for elaborating Robert. And again, thanks for taking the time.

Best Regards,

Jim

0 Kudos
MichaelVolz
Esteemed Contributor

Just to clarify on the IIS side

If I have a location such as \\machineA\gis\images that I assign to virtual directory pics

then the url would be

http://webservername/pics

how do I account for the final / and image name in the ESearch configuration

something like:

<b></b><a href='https://webservername/pics{Field_Name}' target='_blank'>View Feature</a> <br>

I get this message when I try to access this location:

Server Error in '/' Application.


Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->  <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->  <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration>

Any idea what the cause of this error would be as I check that the virtual directory can be accessed on the IIS server using Test Settings when I am in the Basic Settings for the virtual directory?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Michael,

So is your url suppose to use http or https protocol? You have both in your thread above. I would first test your virtual directory by using a known file name and append that to your virtual directory url and paste that in a browser to see if it works. If you test this url from the IIS machine then you will get a real error and not the useless info you got above,

0 Kudos
MichaelVolz
Esteemed Contributor

Robert:

I did as you recommended and I called a specific file in a browser on a remote machine and I was able to access the virtual directory.  Now when I make this same call through the application it cuts off the portion of the URL to the specific file and generates the following error:

Any  idea what would be causing this error?

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->  <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->  <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration>
0 Kudos