Click here to Skip to main content
15,896,456 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All
I am trying to use href of asp.net to open a shared network folder on the new tab on the browser but getting an error.
This is what I am actually doing:


If i try it from the run prompt(\\10.0.10.89\UniServices) it works fine but not in the browser . Have also set the permission.
This is the error message that I am getting.

ASM
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.


Thanks in Advanced.
Posted
Comments
Sergey Alexandrovich Kryukov 2-Dec-13 20:40pm    
Who told you it should run in the browser? Don't mix UNC names with URLs. It could be:
file://///MachineName/UniServices
Your IP address does not have to be resolved, it does not have to be in DNS entry for UNC names.
Besides, this file can be accessible only inside LAN; it you try to access it from Internet, it should not work.
—SA
Member 9291223 2-Dec-13 21:30pm    
Well it is supposed to be working on intranet and not internet. There must be a way around it.
Sergey Alexandrovich Kryukov 3-Dec-13 0:11am    
I don't mind if you can access it in Intranet only :-). Does the URL in for form I suggested above works? You really need Windows machine name, not IP for such cases where UNC name is used.
—SA
Sergey Alexandrovich Kryukov 3-Dec-13 0:11am    
I don't mind if you can access it in Intranet only :-). Of course there is a way to access such files. Does the URL in for form I suggested above works? You really need Windows machine name, not IP for such cases where UNC name is used.
—SA

1 solution

Please see my comments to the answer. Do you want to know the workaround which always works? You need to run an HTTP and/or FTP server on the computers which serves up files. Then you can access the files like "http://10.0.10.89/UniServices" or "ftp://10.0.10.89/UniServices" on a uniform basis, exactly the same way you do it with WWW. Such server, or servers, can be really lightweight and consume insignificant fraction of system resources (memory, CPU time and traffic), no more then with file sharing services. If you switch to such architecture, you can use all the Web technologies of your choice in exact same way is in Internet. This is a whole idea behind Intranet, by the way. Just the LAN with file sharing in not yet the Intranet. Please see: http://en.wikipedia.org/wiki/Intranet[^].

Really, if you want to have Intranet, relying on the Windows file sharing services is just impractical, as this is extremely limiting technology. The mere fact that you even have your problem (even though it is easily resolvable) is a clear indication of that. If you use the browser, not file manager, you need HTTP and/or FTP. I remember the time when such sharing was popular just because people did not yet master Web and TCP/IP. My the way, in Intranet you can freely use custom TCP-based services as well. Another argument if the use of *NIX machine which can use SMB protocol (Samba) which is as limiting as file sharing itself, but with TCP/IP and application-level HTTP or FTP all connection would be OS-agnostic, as all those protocol are system-independent.

Optionally, you can also have your local DNS in your intranet. Then you would be able to use your local domain names.

—SA
 
Share this answer
 

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