Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

My appliction tries to get the number of files on the share drive.
I am using Anonymous acess with the user IUSR_INFMY10296.
but problem is always my application returns path doesnt exists.

C#
Example:
path="\\productivefiles\adoy\urs"

if(Directory.Exists(path)
{
......
return count;
}
else
{
return "path doesn't exists";
}

the above path is valid and which contains files. but my application always return path doesn't exists.
Is they any special permission required to be set on the IIS 6.0

Please let me know how to solve this problem
Posted

"\\productivefiles\adoy\urs"
=> productivefiles == server name (doesn't look like one)
& adoy\urs == folder shared on the server that has access permissions.

If this is not the case then make sure you have correctly configured it. Path should be valid and permissions given.
 
Share this answer
 
Comments
fjdiewornncalwe 25-Feb-11 16:08pm    
I agree that \\productivefiles doesn't look like a server name.
As a thought, but not checked, is is possible that the "\\" resolves to "\" and that the application then is attempting to resolve a relative path?
Sandeep Mewara 26-Feb-11 0:04am    
Well, if we assume that '\\' becomes '\' then surely the new path does not looks like the one intended to be used... It would look like:"\productivefilesadoyurs" . What say?

Further, error clearly states the ultimate path formed/used has 'Not found' issue leading to wrong formation of this URL.
Have you checked if the Security settings are set so that your code can access that particular directory?

May this HELP !

Regards,
Rajeev
 
Share this answer
 
v2
Try using the IP insted of the computer name.
 
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