Wednesday, March 28, 2012

System.IO.IOException

Hi all,

Yesterday we upgraded our server to the 1.1 Framework. (from 1.0)
Our project was also converted in Visual Studio to 1.1

Since we have uploaded the project, we are getting an error with one of our
pages which is trying to read a list of files from a network share and
populate a dropdownlist.

The error is:

System.IO.IOException: The specified network name is no longer available.

OR

System.IO.IOException: The specified network password is not correct.

The code is:

Dim fileEntries As String() = Directory.GetFiles(targetDirectory)

where targetdirectory is "\\192.168.1.1\data\General\Documents\"

If we try to view the page on our own machines ie http://localhost the page
works fine!!

So is there any fixes/ideas why this is happening!!

Thanks!How would you get TWO different error messages from the same code?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.

"Krissy" <krissi___@.hotmail.com> wrote in message
news:3f27704b@.quokka.wn.com.au...
> Hi all,
> Yesterday we upgraded our server to the 1.1 Framework. (from 1.0)
> Our project was also converted in Visual Studio to 1.1
> Since we have uploaded the project, we are getting an error with one of
our
> pages which is trying to read a list of files from a network share and
> populate a dropdownlist.
> The error is:
> System.IO.IOException: The specified network name is no longer available.
> OR
> System.IO.IOException: The specified network password is not correct.
>
> The code is:
> Dim fileEntries As String() = Directory.GetFiles(targetDirectory)
> where targetdirectory is "\\192.168.1.1\data\General\Documents\"
>
> If we try to view the page on our own machines ie http://localhost the
page
> works fine!!
> So is there any fixes/ideas why this is happening!!
> Thanks!
"Kevin Spencer" <kevin@.takempis.com> wrote in message
news:ONRU7dpVDHA.2316@.TK2MSFTNGP09.phx.gbl...
> How would you get TWO different error messages from the same code?
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> http://www.takempis.com
> Complex things are made up of
> lots of simple things.
> "Krissy" <krissi___@.hotmail.com> wrote in message
> news:3f27704b@.quokka.wn.com.au...
> > Hi all,
> > Yesterday we upgraded our server to the 1.1 Framework. (from 1.0)
> > Our project was also converted in Visual Studio to 1.1
> > Since we have uploaded the project, we are getting an error with one of
> our
> > pages which is trying to read a list of files from a network share and
> > populate a dropdownlist.
> > The error is:
> > System.IO.IOException: The specified network name is no longer
available.
> > OR
> > System.IO.IOException: The specified network password is not correct.
> > The code is:
> > Dim fileEntries As String() = Directory.GetFiles(targetDirectory)
> > where targetdirectory is "\\192.168.1.1\data\General\Documents\"
> > If we try to view the page on our own machines ie http://localhost the
> page
> > works fine!!
> > So is there any fixes/ideas why this is happening!!
> > Thanks!

If I knew that then I wouldn't have the problem ;)

0 comments:

Post a Comment