开发者

Drive Info Not Returned Correctly When Run As A WCF Service

I have a WCF service that returns the number of local drives reported on my local PC.

开发者_如何转开发

I have the following drives:

C: Local Disk D: DVD Drive X: Network Drive Y: Network Drive

When I run the WCF service using the WCF test client I get the correct drive count of 4 drives.

If I try to connect to the WCF service using Silverlight or VB.NET I only get 2 drives returned, the drives X: & Y: (network drives) are missing.

I have a sample of the code below, please can anyone help me with this problem?

Dim Info As DriveInfo

Dim Count As Integer

For Each Info In My.Computer.FileSystem.Drives

  Count = My.Computer.FileSystem.Drives.Count 

Next Info


When running as a service you don't have access to network drives - this is a rights/permission issue + security measure...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜