Click here to Skip to main content
15,888,157 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
We are using a NAS storage in our web application which is added as virtual directory in IIS 6.0 . If we are accessing files like www.mywebsite.com/Virtualdirectorypath/imagename.jpg we are able to view the image .
But when we access in local network with ip address and path like
123.4.5.6/Virtualdirectorypath/imagename.jpg it is not showing..
what could be the problem ?Is it a permission problem ?

Any help appreciated

Thanks in Advance...
Posted
Updated 12-Dec-12 17:15pm
v2

1 solution

Hi,

Its not a permission problem, because its is accessed through domain name.

Domain is nothing just a string to represent IP.

Checking :

1. Open command prompt
2. write ping www.mywebsite.com[^]
3. Copy ip and try with that ip.
 
Share this answer
 
Comments
ancymathew 13-Dec-12 1:08am    
Thanks Suvabrata ...for your response..

I tried the way that you specified ..with ip from command prompt..
even that is also not working ..there is a another directory(not nas storage) in same path which contains images...i can access that also..
only nas storage have problem..
Another thing is i tried by adding another website without domain..
In that case i can view the images through our local ip and path.
I dont know if it is related to some settings problem...

Thanks in advance
Suvabrata Roy 13-Dec-12 1:21am    
you should try in this format http://IP/Virtualdirectorypath/imagename.jpg

The IP which you get after pinging the Domain name

this should work.
ancymathew 13-Dec-12 2:06am    
Thanks Suvabrata for your quick response..:) we are using the same path which u mentioned ... As i mentioned with the ip which i got after pinging with directory which is not nas storage is accessible..this folder and nas storage are in same root.but if we specified nas storage directory it is not showing http://IP/Virtualdirectorypathofnasstorage/imagename.jpg not working http://IP/Virtualdirectorypathofcommondirectory/imagename.jpg Working Thanks
Suvabrata Roy 13-Dec-12 2:14am    
Virtualdirectorypathofnasstorage : is the path defined in you NAS if so then it will not work.

because if you typing Http then your request is running by default against network service so network service dose not have permission at that folder, but when you using VD (virtual directory) then your request sent to IIS then IIS request the defined user to access that particular file and getting back the stream and sending the same stream to the browser then Image is opening. :)
ancymathew 13-Dec-12 2:56am    
Thanks Suvabrata ..
Sorry ..I think my comment have some problem... By
"Virtualdirectorypathofnasstorage" I didnt mean it is the path in nas storage.
it is the path of virtual directory which is a nas storage folder...

And about your second comment can i give permission for network service
to this virtual directory ? .other virtual directory files can access like this.only this nas storage virtual directory have problem.
Even the same webiste i added in same server without host header. Then
also i can access these files with the ip(local) and path ...
Or did i miss something in ur comment ?

Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900