Redian新闻
>
Directory.GetFiles() is not working on client computer
avatar
A*n
2
this question is weird for me, Code is below:
string FilePath = ConfigurationManager.AppSettings["PPLDownloadFilePath"];
if (Directory.Exists(FilePath))
{
string[] files = Directory.GetFiles(@FilePath,"*.*");
count.Text = files.Length.ToString() + " PPL file(s) in " + FilePath;
}
we deploy the website to the server, everything is working on my local when
I open the IE to check how many files on the folder, but it is not working
on my boss computer(always find 0 file). we use same user name, password and
same version IE for the website.
I check couple computers in our company, only 2 client side computers cannot
find the files, the others are ok.
any advice?
avatar
r*y
3
在walmart看见广告了

【在 k***g 的大作中提到】
: 有人看了么?感觉怎么样?
avatar
S*k
4
How many web servers do you have?Is it possible the request/response from
different servers?
Is it possible the code is related to some kind of client-side caching or
cookie?
Does the client computer set some ip/website mapping in host file?
avatar
A*n
5
Thanks

I don't think so, only one web server.
it doesn't work after reboot.
I am not sure what you talk about, the other computers don't set IP/
website mapping, but work.
I am not sure this is IE setting problem or folder permission problem(the
folder is normal folder).

【在 S***k 的大作中提到】
: How many web servers do you have?Is it possible the request/response from
: different servers?
: Is it possible the code is related to some kind of client-side caching or
: cookie?
: Does the client computer set some ip/website mapping in host file?

avatar
l*s
6
add try catch block and log if there is any exception then go from there.

when
and

【在 A*******n 的大作中提到】
: this question is weird for me, Code is below:
: string FilePath = ConfigurationManager.AppSettings["PPLDownloadFilePath"];
: if (Directory.Exists(FilePath))
: {
: string[] files = Directory.GetFiles(@FilePath,"*.*");
: count.Text = files.Length.ToString() + " PPL file(s) in " + FilePath;
: }
: we deploy the website to the server, everything is working on my local when
: I open the IE to check how many files on the folder, but it is not working
: on my boss computer(always find 0 file). we use same user name, password and

avatar
A*n
7
the question is no error, the function can find the folder and show "0 PPL
file(s) in .....".
if this is permission problem, I think the other clients should get same
info, just like above.
if no error happens, the log should be nothing, right?
avatar
A*n
8
the user cannot view the files from the webpage on his local, but he can
view the files on my local based on his account. So I think it is not an
user permission problem.
The point is we cannot view the files for my account and his account on his
local, but working for both accounts on my local.
I think the problem is in his computer local setting. but which setting?
avatar
s*o
9
Windows or Forms authentication?
If you are using Windows authentication, probably it has something to do
with ACL permissions. You could set that folder accessible to everyone and
see what happens.

his

【在 A*******n 的大作中提到】
: the user cannot view the files from the webpage on his local, but he can
: view the files on my local based on his account. So I think it is not an
: user permission problem.
: The point is we cannot view the files for my account and his account on his
: local, but working for both accounts on my local.
: I think the problem is in his computer local setting. but which setting?

avatar
A*n
10
still no file find

【在 s***o 的大作中提到】
: Windows or Forms authentication?
: If you are using Windows authentication, probably it has something to do
: with ACL permissions. You could set that folder accessible to everyone and
: see what happens.
:
: his

avatar
A*n
11
I think Spark got the point, Actually we have 2 web server, not 1 web server
.
you are the man. I find the problem.

【在 S***k 的大作中提到】
: How many web servers do you have?Is it possible the request/response from
: different servers?
: Is it possible the code is related to some kind of client-side caching or
: cookie?
: Does the client computer set some ip/website mapping in host file?

avatar
S*k
12
Good!!
I think it could be better to build a file server to hold those "shared"
files. Otherwise, you have to synchronize the folders in all servers.

server

【在 A*******n 的大作中提到】
: I think Spark got the point, Actually we have 2 web server, not 1 web server
: .
: you are the man. I find the problem.

avatar
A*n
13
I agree with you, but I am not boss. lol

【在 S***k 的大作中提到】
: Good!!
: I think it could be better to build a file server to hold those "shared"
: files. Otherwise, you have to synchronize the folders in all servers.
:
: server

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。