Showing posts with label systemioioexception. Show all posts
Showing posts with label systemioioexception. Show all posts

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 ;)

System.IO.IOException: Cannot create a file when that file already exists.

Getting the following error on my production server whether the file exists
or not:

"System.IO.IOException: Cannot create a file when that file already exists."

Here's the code generating the error (seems to be happening when I try
creating a directory)

If dirmgr.Exists("s:\blah\" & txt_name.Text) Then
lblerror.Text = lblerror.Text & "Unable to build physical path. " &
txt_name.Text & " & Contact Dev Team.<BR>"
Else
dirmgr.CreateDirectory("s:\blah\" & txt_name.Text)

This code runs fine on my development server (only the path is c:\blah\blah
instead of S). Also, my production server has failover cluser, and the s
drive is the failover drive. I can't imagine that could be a problem, but
thought I would mention it.

Asside from that, the only other thing I can think of is that the framework
version on my dev box says 1.1, and the one on my production server says:
1.0.37 - surely that's not the cause is it? Permissions shouldn't be an
issue (i've even tried as domain admin)

I would appreciate any help on this, as I'm out of ideas, and can find no
other documentation on this.
- ChadHi,

the default user that runs web application (system) dont has rights to
access network resources.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
I agree with Natty. The problem you are having is most likely caused by
having no right to access network resources. Willy address a similar
problem before. See
http://groups.google.com/groups?q=S...et&start=10&hl=
en&lr=&ie=UTF-8&oe=UTF-8&selm=OELVHLBNCHA.2460%40tkmsftngp04&rnum=20.

HTH,
-Allen

Disclaimer:
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com

-------
| From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
| Subject: System.IO.IOException: Cannot create a file when that file
already exists.
| Date: Wed, 6 Aug 2003 17:08:27 -0400
| Lines: 29
|
| Getting the following error on my production server whether the file
exists
| or not:
|
| "System.IO.IOException: Cannot create a file when that file already
exists."
|
| Here's the code generating the error (seems to be happening when I try
| creating a directory)
|
| If dirmgr.Exists("s:\blah\" & txt_name.Text) Then
| lblerror.Text = lblerror.Text & "Unable to build physical path. "
&
| txt_name.Text & " & Contact Dev Team.<BR>"
| Else
| dirmgr.CreateDirectory("s:\blah\" & txt_name.Text)
|
| This code runs fine on my development server (only the path is
c:\blah\blah
| instead of S). Also, my production server has failover cluser, and the s
| drive is the failover drive. I can't imagine that could be a problem, but
| thought I would mention it.
|
| Asside from that, the only other thing I can think of is that the
framework
| version on my dev box says 1.1, and the one on my production server says:
| 1.0.37 - surely that's not the cause is it? Permissions shouldn't be an
| issue (i've even tried as domain admin)
|
| I would appreciate any help on this, as I'm out of ideas, and can find no
| other documentation on this.
| - Chad
|
|
|
Thanks for the response.

I understand that, but I'm trying to create a directory on the local drive.
This isn't a mapped share. The drive is physically present on the web
server, and if that web server fails, the other system physically takes over
the drive (ie, a cluster). I've also added the local ASPNET account to the
NTFS permissions on the folder, and it still fails.

- Chad

"[MSFT]Allen" <yweng@.online.microsoft.com> wrote in message
news:j1MRYHMXDHA.2108@.cpmsftngxa06.phx.gbl...
> I agree with Natty. The problem you are having is most likely caused by
> having no right to access network resources. Willy address a similar
> problem before. See
http://groups.google.com/groups?q=S...et&start=10&hl=
> en&lr=&ie=UTF-8&oe=UTF-8&selm=OELVHLBNCHA.2460%40tkmsftngp04&rnum=20.
> HTH,
> -Allen
> Disclaimer:
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Got .Net? http://www.gotdotnet.com
> -------
> | From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
> | Subject: System.IO.IOException: Cannot create a file when that file
> already exists.
> | Date: Wed, 6 Aug 2003 17:08:27 -0400
> | Lines: 29
> |
> | Getting the following error on my production server whether the file
> exists
> | or not:
> |
> | "System.IO.IOException: Cannot create a file when that file already
> exists."
> |
> | Here's the code generating the error (seems to be happening when I try
> | creating a directory)
> |
> | If dirmgr.Exists("s:\blah\" & txt_name.Text) Then
> | lblerror.Text = lblerror.Text & "Unable to build physical path.
"
> &
> | txt_name.Text & " & Contact Dev Team.<BR>"
> | Else
> | dirmgr.CreateDirectory("s:\blah\" & txt_name.Text)
> |
> | This code runs fine on my development server (only the path is
> c:\blah\blah
> | instead of S). Also, my production server has failover cluser, and the
s
> | drive is the failover drive. I can't imagine that could be a problem,
but
> | thought I would mention it.
> |
> | Asside from that, the only other thing I can think of is that the
> framework
> | version on my dev box says 1.1, and the one on my production server
says:
> | 1.0.37 - surely that's not the cause is it? Permissions shouldn't be an
> | issue (i've even tried as domain admin)
> |
> | I would appreciate any help on this, as I'm out of ideas, and can find
no
> | other documentation on this.
> | - Chad
> |
> |
> |
It doesn't work creating folders under the same directory as the web
application... same issue.

I'm going to try figuring out why that server is showing that it's running
version 1.03 of the dotnet framework. It shows that v1.1 was installed.

Thanks,
Chad

"[MSFT]Allen" <yweng@.online.microsoft.com> wrote in message
news:RT0i6ZXXDHA.2184@.cpmsftngxa06.phx.gbl...
> Try creating a directory in your code under the folder where your web
> application resides. Does it works? In addition, you may want to verify
the
> account your web application is running under. Please download tokedump
> written by Keith Brown from
> http://msdn.microsoft.com/msdnmag/i...ty/default.aspx. It
> would show you what account the application is running under.
> -Allen
> Disclaimer:
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Got .Net? http://www.gotdotnet.com
> -------
> | From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
> | References: <uaJhi7FXDHA.1900@.TK2MSFTNGP10.phx.gbl>
> <j1MRYHMXDHA.2108@.cpmsftngxa06.phx.gbl>
> | Subject: Re: System.IO.IOException: Cannot create a file when that file
> already exists.
> | Date: Thu, 7 Aug 2003 08:11:44 -0400
> | Lines: 78
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> | Message-ID: <exrIT0NXDHA.1204@.TK2MSFTNGP12.phx.gbl>
> | Newsgroups: microsoft.public.dotnet.framework.aspnet
> | NNTP-Posting-Host: 12.108.244.117
> | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet:165699
> | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> |
> | Thanks for the response.
> |
> | I understand that, but I'm trying to create a directory on the local
> drive.
> | This isn't a mapped share. The drive is physically present on the web
> | server, and if that web server fails, the other system physically takes
> over
> | the drive (ie, a cluster). I've also added the local ASPNET account to
> the
> | NTFS permissions on the folder, and it still fails.
> |
> | - Chad
> |
> |
> | "[MSFT]Allen" <yweng@.online.microsoft.com> wrote in message
> | news:j1MRYHMXDHA.2108@.cpmsftngxa06.phx.gbl...
> | > I agree with Natty. The problem you are having is most likely caused
by
> | > having no right to access network resources. Willy address a similar
> | > problem before. See
> | >
> |
http://groups.google.com/groups?q=S...et&start=10&hl=
> | > en&lr=&ie=UTF-8&oe=UTF-8&selm=OELVHLBNCHA.2460%40tkmsftngp04&rnum=20.
> | >
> | > HTH,
> | > -Allen
> | >
> | > Disclaimer:
> | > This posting is provided "AS IS" with no warranties, and confers no
> | rights.
> | > Got .Net? http://www.gotdotnet.com
> | >
> | > -------
> | > | From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
> | > | Subject: System.IO.IOException: Cannot create a file when that file
> | > already exists.
> | > | Date: Wed, 6 Aug 2003 17:08:27 -0400
> | > | Lines: 29
> | > |
> | > | Getting the following error on my production server whether the file
> | > exists
> | > | or not:
> | > |
> | > | "System.IO.IOException: Cannot create a file when that file already
> | > exists."
> | > |
> | > | Here's the code generating the error (seems to be happening when I
try
> | > | creating a directory)
> | > |
> | > | If dirmgr.Exists("s:\blah\" & txt_name.Text) Then
> | > | lblerror.Text = lblerror.Text & "Unable to build physical
> path.
> | "
> | > &
> | > | txt_name.Text & " & Contact Dev Team.<BR>"
> | > | Else
> | > | dirmgr.CreateDirectory("s:\blah\" & txt_name.Text)
> | > |
> | > | This code runs fine on my development server (only the path is
> | > c:\blah\blah
> | > | instead of S). Also, my production server has failover cluser, and
> the
> | s
> | > | drive is the failover drive. I can't imagine that could be a
problem,
> | but
> | > | thought I would mention it.
> | > |
> | > | Asside from that, the only other thing I can think of is that the
> | > framework
> | > | version on my dev box says 1.1, and the one on my production server
> | says:
> | > | 1.0.37 - surely that's not the cause is it? Permissions shouldn't
be
> an
> | > | issue (i've even tried as domain admin)
> | > |
> | > | I would appreciate any help on this, as I'm out of ideas, and can
find
> | no
> | > | other documentation on this.
> | > | - Chad
> | > |
> | > |
> | > |
> | >
> |
> |
> |
Chad, was the problem resolved? It seems that you installed both v1.03 and
v1.1 on the same web server. If so, it might be helpful to look at the
article "Compatibility Considerations and Version Changes" on
http://www.gotdotnet.com/team/changeinfo/default.aspx. Try configuring your
web application to run V1.03 and V1.1 specifically to see how it works.

-Allen

Disclaimer:
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com

-------
| From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
| References: <uaJhi7FXDHA.1900@.TK2MSFTNGP10.phx.gbl>
<j1MRYHMXDHA.2108@.cpmsftngxa06.phx.gbl>
<exrIT0NXDHA.1204@.TK2MSFTNGP12.phx.gbl>
<RT0i6ZXXDHA.2184@.cpmsftngxa06.phx.gbl>
| Subject: Re: System.IO.IOException: Cannot create a file when that file
already exists.
| Date: Mon, 11 Aug 2003 01:16:22 -0400
| Lines: 141
|
|
| It doesn't work creating folders under the same directory as the web
| application... same issue.
|
| I'm going to try figuring out why that server is showing that it's running
| version 1.03 of the dotnet framework. It shows that v1.1 was installed.
|
| Thanks,
| Chad
|
| "[MSFT]Allen" <yweng@.online.microsoft.com> wrote in message
| news:RT0i6ZXXDHA.2184@.cpmsftngxa06.phx.gbl...
| > Try creating a directory in your code under the folder where your web
| > application resides. Does it works? In addition, you may want to verify
| the
| > account your web application is running under. Please download tokedump
| > written by Keith Brown from
| > http://msdn.microsoft.com/msdnmag/i...ty/default.aspx. It
| > would show you what account the application is running under.
| >
| > -Allen
| >
| > Disclaimer:
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > Got .Net? http://www.gotdotnet.com
| >
| > -------
| > | From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
| > | References: <uaJhi7FXDHA.1900@.TK2MSFTNGP10.phx.gbl>
| > <j1MRYHMXDHA.2108@.cpmsftngxa06.phx.gbl>
| > | Subject: Re: System.IO.IOException: Cannot create a file when that
file
| > already exists.
| > | Date: Thu, 7 Aug 2003 08:11:44 -0400
| > | Lines: 78
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <exrIT0NXDHA.1204@.TK2MSFTNGP12.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 12.108.244.117
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.framework.aspnet:165699
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Thanks for the response.
| > |
| > | I understand that, but I'm trying to create a directory on the local
| > drive.
| > | This isn't a mapped share. The drive is physically present on the
web
| > | server, and if that web server fails, the other system physically
takes
| > over
| > | the drive (ie, a cluster). I've also added the local ASPNET account
to
| > the
| > | NTFS permissions on the folder, and it still fails.
| > |
| > | - Chad
| > |
| > |
| > | "[MSFT]Allen" <yweng@.online.microsoft.com> wrote in message
| > | news:j1MRYHMXDHA.2108@.cpmsftngxa06.phx.gbl...
| > | > I agree with Natty. The problem you are having is most likely caused
| by
| > | > having no right to access network resources. Willy address a similar
| > | > problem before. See
| > | >
| > |
| >
|
http://groups.google.com/groups?q=S...et&start=10&hl=
| > | >
en&lr=&ie=UTF-8&oe=UTF-8&selm=OELVHLBNCHA.2460%40tkmsftngp04&rnum=20.
| > | >
| > | > HTH,
| > | > -Allen
| > | >
| > | > Disclaimer:
| > | > This posting is provided "AS IS" with no warranties, and confers no
| > | rights.
| > | > Got .Net? http://www.gotdotnet.com
| > | >
| > | > -------
| > | > | From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
| > | > | Subject: System.IO.IOException: Cannot create a file when that
file
| > | > already exists.
| > | > | Date: Wed, 6 Aug 2003 17:08:27 -0400
| > | > | Lines: 29
| > | > |
| > | > | Getting the following error on my production server whether the
file
| > | > exists
| > | > | or not:
| > | > |
| > | > | "System.IO.IOException: Cannot create a file when that file
already
| > | > exists."
| > | > |
| > | > | Here's the code generating the error (seems to be happening when I
| try
| > | > | creating a directory)
| > | > |
| > | > | If dirmgr.Exists("s:\blah\" & txt_name.Text) Then
| > | > | lblerror.Text = lblerror.Text & "Unable to build physical
| > path.
| > | "
| > | > &
| > | > | txt_name.Text & " & Contact Dev Team.<BR>"
| > | > | Else
| > | > | dirmgr.CreateDirectory("s:\blah\" & txt_name.Text)
| > | > |
| > | > | This code runs fine on my development server (only the path is
| > | > c:\blah\blah
| > | > | instead of S). Also, my production server has failover cluser,
and
| > the
| > | s
| > | > | drive is the failover drive. I can't imagine that could be a
| problem,
| > | but
| > | > | thought I would mention it.
| > | > |
| > | > | Asside from that, the only other thing I can think of is that the
| > | > framework
| > | > | version on my dev box says 1.1, and the one on my production
server
| > | says:
| > | > | 1.0.37 - surely that's not the cause is it? Permissions shouldn't
| be
| > an
| > | > | issue (i've even tried as domain admin)
| > | > |
| > | > | I would appreciate any help on this, as I'm out of ideas, and can
| find
| > | no
| > | > | other documentation on this.
| > | > | - Chad
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|
Allen,

Thanks for the followup. I actually got my program working late last night.
The problem was the framework version.

I tried simply configuring the web application to use version 1.1, but that
didn't help. I also tried uninstalling then reinstalling framework version
1.1, but that also didn't get IIS to start using version 1.1 by default. I
consequently uninstalled versions 1.1 *and* version 1.03, then only
reinstalled version 1.1 again, and this took care of the problem.

Thanks again for all the help everyone!

- Chad

"[MSFT]Allen" <yweng@.online.microsoft.com> wrote in message
news:hNsBh8sYDHA.2352@.cpmsftngxa06.phx.gbl...
> Chad, was the problem resolved? It seems that you installed both v1.03 and
> v1.1 on the same web server. If so, it might be helpful to look at the
> article "Compatibility Considerations and Version Changes" on
> http://www.gotdotnet.com/team/changeinfo/default.aspx. Try configuring
your
> web application to run V1.03 and V1.1 specifically to see how it works.
> -Allen
> Disclaimer:
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Got .Net? http://www.gotdotnet.com
> -------
> | From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
> | References: <uaJhi7FXDHA.1900@.TK2MSFTNGP10.phx.gbl>
> <j1MRYHMXDHA.2108@.cpmsftngxa06.phx.gbl>
> <exrIT0NXDHA.1204@.TK2MSFTNGP12.phx.gbl>
> <RT0i6ZXXDHA.2184@.cpmsftngxa06.phx.gbl>
> | Subject: Re: System.IO.IOException: Cannot create a file when that file
> already exists.
> | Date: Mon, 11 Aug 2003 01:16:22 -0400
> | Lines: 141
> |
> |
> | It doesn't work creating folders under the same directory as the web
> | application... same issue.
> |
> | I'm going to try figuring out why that server is showing that it's
running
> | version 1.03 of the dotnet framework. It shows that v1.1 was installed.
> |
> | Thanks,
> | Chad
> |
> | "[MSFT]Allen" <yweng@.online.microsoft.com> wrote in message
> | news:RT0i6ZXXDHA.2184@.cpmsftngxa06.phx.gbl...
> | > Try creating a directory in your code under the folder where your web
> | > application resides. Does it works? In addition, you may want to
verify
> | the
> | > account your web application is running under. Please download
tokedump
> | > written by Keith Brown from
> | > http://msdn.microsoft.com/msdnmag/i...ty/default.aspx.
It
> | > would show you what account the application is running under.
> | >
> | > -Allen
> | >
> | > Disclaimer:
> | > This posting is provided "AS IS" with no warranties, and confers no
> | rights.
> | > Got .Net? http://www.gotdotnet.com
> | >
> | > -------
> | > | From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
> | > | References: <uaJhi7FXDHA.1900@.TK2MSFTNGP10.phx.gbl>
> | > <j1MRYHMXDHA.2108@.cpmsftngxa06.phx.gbl>
> | > | Subject: Re: System.IO.IOException: Cannot create a file when that
> file
> | > already exists.
> | > | Date: Thu, 7 Aug 2003 08:11:44 -0400
> | > | Lines: 78
> | > | X-Priority: 3
> | > | X-MSMail-Priority: Normal
> | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> | > | Message-ID: <exrIT0NXDHA.1204@.TK2MSFTNGP12.phx.gbl>
> | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
> | > | NNTP-Posting-Host: 12.108.244.117
> | > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
> | > | Xref: cpmsftngxa06.phx.gbl
> | microsoft.public.dotnet.framework.aspnet:165699
> | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> | > |
> | > | Thanks for the response.
> | > |
> | > | I understand that, but I'm trying to create a directory on the local
> | > drive.
> | > | This isn't a mapped share. The drive is physically present on the
> web
> | > | server, and if that web server fails, the other system physically
> takes
> | > over
> | > | the drive (ie, a cluster). I've also added the local ASPNET account
> to
> | > the
> | > | NTFS permissions on the folder, and it still fails.
> | > |
> | > | - Chad
> | > |
> | > |
> | > | "[MSFT]Allen" <yweng@.online.microsoft.com> wrote in message
> | > | news:j1MRYHMXDHA.2108@.cpmsftngxa06.phx.gbl...
> | > | > I agree with Natty. The problem you are having is most likely
caused
> | by
> | > | > having no right to access network resources. Willy address a
similar
> | > | > problem before. See
> | > | >
> | > |
> | >
> |
http://groups.google.com/groups?q=S...et&start=10&hl=
> | > | >
> en&lr=&ie=UTF-8&oe=UTF-8&selm=OELVHLBNCHA.2460%40tkmsftngp04&rnum=20.
> | > | >
> | > | > HTH,
> | > | > -Allen
> | > | >
> | > | > Disclaimer:
> | > | > This posting is provided "AS IS" with no warranties, and confers
no
> | > | rights.
> | > | > Got .Net? http://www.gotdotnet.com
> | > | >
> | > | > -------
> | > | > | From: "Chad Crowder" <chad.crowder@.gis.leica-geosystems.com>
> | > | > | Subject: System.IO.IOException: Cannot create a file when that
> file
> | > | > already exists.
> | > | > | Date: Wed, 6 Aug 2003 17:08:27 -0400
> | > | > | Lines: 29
> | > | > |
> | > | > | Getting the following error on my production server whether the
> file
> | > | > exists
> | > | > | or not:
> | > | > |
> | > | > | "System.IO.IOException: Cannot create a file when that file
> already
> | > | > exists."
> | > | > |
> | > | > | Here's the code generating the error (seems to be happening when
I
> | try
> | > | > | creating a directory)
> | > | > |
> | > | > | If dirmgr.Exists("s:\blah\" & txt_name.Text) Then
> | > | > | lblerror.Text = lblerror.Text & "Unable to build
physical
> | > path.
> | > | "
> | > | > &
> | > | > | txt_name.Text & " & Contact Dev Team.<BR>"
> | > | > | Else
> | > | > | dirmgr.CreateDirectory("s:\blah\" & txt_name.Text)
> | > | > |
> | > | > | This code runs fine on my development server (only the path is
> | > | > c:\blah\blah
> | > | > | instead of S). Also, my production server has failover cluser,
> and
> | > the
> | > | s
> | > | > | drive is the failover drive. I can't imagine that could be a
> | problem,
> | > | but
> | > | > | thought I would mention it.
> | > | > |
> | > | > | Asside from that, the only other thing I can think of is that
the
> | > | > framework
> | > | > | version on my dev box says 1.1, and the one on my production
> server
> | > | says:
> | > | > | 1.0.37 - surely that's not the cause is it? Permissions
shouldn't
> | be
> | > an
> | > | > | issue (i've even tried as domain admin)
> | > | > |
> | > | > | I would appreciate any help on this, as I'm out of ideas, and
can
> | find
> | > | no
> | > | > | other documentation on this.
> | > | > | - Chad
> | > | > |
> | > | > |
> | > | > |
> | > | >
> | > |
> | > |
> | > |
> | >
> |
> |
> |

System.IO.IOException: The filename, directory name, or volume label syntax is incorrect.

System.IO.IOException: The filename, directory name, or volume label
syntax is incorrect.

I have hit a problem for which I can find no solutions. Has anyone any
ideas?

I am writing XML into a Memory STream and using a Transform to make
HTML. This works fine normally, but I have no the above stated error.

I did get some odd chars in the HTML name which caused a problem,
which I corrected. The current error seems to random. I am wondering
if memory is the problem, or disk space.

Last Trace - html 2-->../Grohe/Grohe-Sundries-Handles-Handles-Automatic-2000-47255000.html<--
shows the filename

Code:

string HTMLName = xmlName;

Trace.Warn ("html--" + HTMLName);

string thisManNameDir = thisManName;
thisManNameDir = thisManNameDir.Replace(" ","");

HTMLName = "../" + thisManNameDir + "/" + HTMLName;
Trace.Warn ("html 2-->" + HTMLName + "<--");
//Trace.Warn("writing html" + HTMLName );
XmlUrlResolver resolver = new XmlUrlResolver();

string thisURL1 = Request.Url.ToString();
Trace.Warn("header " + thisURL1);
thisURL1 = thisURL1.Replace("/myxml/Xml1.aspx","");
string thisURL = thisURL1.Replace("http://","");

thisURL1 = thisURL1.Replace(".co.uk","");
thisURL1 = thisURL1.Replace(".com","");
thisURL1 = thisURL1.Replace(".biz","");

thisURL1 = thisURL1.Replace("http://www.","");
string thisDomain = thisURL1.Replace("http://","");

NetworkCredential cred = new
NetworkCredential(thisDomain,"pwd",thisURL);

thisStream.Position = 0;
Trace.Warn("a");
//XmlTextReader myTxtReader = new XmlTextReader (thisStream);

Trace.Warn("a1");
string xslPath = Server.MapPath("myXSL.xsl");
Trace.Warn("a2");
string htmlPath = Server.MapPath(HTMLName);
Trace.Warn("a3");
XPathDocument aXPathDocument = new XPathDocument(thisStream);
Trace.Warn("a4");
XslTransform transform = new XslTransform();
Trace.Warn("a5");
transform.Load(xslPath, resolver);

StreamWriter aStreamWriter = new StreamWriter(htmlPath);

Trace.Warn("a6");

transform.Transform(aXPathDocument,null,aStreamWri ter, resolver);

aStreamWriter.Flush();
aStreamWriter.Close();

Trace.Warn("a7");
//Trace.Warn("ending html");

}I solved this.

"Trevor" <sales@.logicians.com> wrote in message
news:88a9861a.0407260251.53f2d587@.posting.google.c om...
> System.IO.IOException: The filename, directory name, or volume label
> syntax is incorrect.
>
> I have hit a problem for which I can find no solutions. Has anyone any
> ideas?
> I am writing XML into a Memory STream and using a Transform to make
> HTML. This works fine normally, but I have no the above stated error.
> I did get some odd chars in the HTML name which caused a problem,
> which I corrected. The current error seems to random. I am wondering
> if memory is the problem, or disk space.
> Last Trace - html
2-->../Grohe/Grohe-Sundries-Handles-Handles-Automatic-2000-47255000.html<--
> shows the filename
> Code:
> string HTMLName = xmlName;
> Trace.Warn ("html--" + HTMLName);
>
> string thisManNameDir = thisManName;
> thisManNameDir = thisManNameDir.Replace(" ","");
> HTMLName = "../" + thisManNameDir + "/" + HTMLName;
> Trace.Warn ("html 2-->" + HTMLName + "<--");
> //Trace.Warn("writing html" + HTMLName );
> XmlUrlResolver resolver = new XmlUrlResolver();
>
> string thisURL1 = Request.Url.ToString();
> Trace.Warn("header " + thisURL1);
> thisURL1 = thisURL1.Replace("/myxml/Xml1.aspx","");
> string thisURL = thisURL1.Replace("http://","");
> thisURL1 = thisURL1.Replace(".co.uk","");
> thisURL1 = thisURL1.Replace(".com","");
> thisURL1 = thisURL1.Replace(".biz","");
> thisURL1 = thisURL1.Replace("http://www.","");
> string thisDomain = thisURL1.Replace("http://","");
> NetworkCredential cred = new
> NetworkCredential(thisDomain,"pwd",thisURL);
>
> thisStream.Position = 0;
> Trace.Warn("a");
> //XmlTextReader myTxtReader = new XmlTextReader (thisStream);
>
> Trace.Warn("a1");
> string xslPath = Server.MapPath("myXSL.xsl");
> Trace.Warn("a2");
> string htmlPath = Server.MapPath(HTMLName);
> Trace.Warn("a3");
> XPathDocument aXPathDocument = new XPathDocument(thisStream);
> Trace.Warn("a4");
> XslTransform transform = new XslTransform();
> Trace.Warn("a5");
> transform.Load(xslPath, resolver);
> StreamWriter aStreamWriter = new StreamWriter(htmlPath);
> Trace.Warn("a6");
>
> transform.Transform(aXPathDocument,null,aStreamWri ter, resolver);
> aStreamWriter.Flush();
> aStreamWriter.Close();
>
>
> Trace.Warn("a7");
> //Trace.Warn("ending html");
> }
Hello. I know it's been almost 3 years since this post, but I'm experiencing the same problem that you had and you're the only person who seems to have an idea on how to fix it. Do you remember what your problem was and how you resolved it?

Thanks in advance.

From http://www.developmentnow.com/g/8_2...-incorrect-.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
"IIT Guy" <nospam@.developmentnow.comwrote in message
news:c2456389-6c48-41fc-b787-4447eefa6d17@.developmentnow.com...

Quote:

Originally Posted by

Hello. I know it's been almost 3 years since this post, but I'm
experiencing the same problem that you had and you're the only person who
seems to have an idea on how to fix it. Do you remember what your problem
was and how you resolved it?
>

The '..' characters are not allowed.

System.IO.IOException: The filename, directory name, or volume label syntax is incorr

System.IO.IOException: The filename, directory name, or volume label
syntax is incorrect.
I have hit a problem for which I can find no solutions. Has anyone any
ideas?
I am writing XML into a Memory STream and using a Transform to make
HTML. This works fine normally, but I have no the above stated error.
I did get some odd chars in the HTML name which caused a problem,
which I corrected. The current error seems to random. I am wondering
if memory is the problem, or disk space.
Last Trace - html 2-->../Grohe/Grohe-Sundries-Handles-Handles-Automatic-2000
-47255000.html<--
shows the filename
Code:
string HTMLName = xmlName;
Trace.Warn ("html--" + HTMLName);
string thisManNameDir = thisManName;
thisManNameDir = thisManNameDir.Replace(" ","");
HTMLName = "../" + thisManNameDir + "/" + HTMLName;
Trace.Warn ("html 2-->" + HTMLName + "<--");
//Trace.Warn("writing html" + HTMLName );
XmlUrlResolver resolver = new XmlUrlResolver();
string thisURL1 = Request.Url.ToString();
Trace.Warn("header " + thisURL1);
thisURL1 = thisURL1.Replace("/myxml/Xml1.aspx","");
string thisURL = thisURL1.Replace("http://","");
thisURL1 = thisURL1.Replace(".co.uk","");
thisURL1 = thisURL1.Replace(".com","");
thisURL1 = thisURL1.Replace(".biz","");
thisURL1 = thisURL1.Replace("http://www.","");
string thisDomain = thisURL1.Replace("http://","");
NetworkCredential cred = new
NetworkCredential(thisDomain,"pwd",thisURL);
thisStream.Position = 0;
Trace.Warn("a");
//XmlTextReader myTxtReader = new XmlTextReader (thisStream);
Trace.Warn("a1");
string xslPath = Server.MapPath("myXSL.xsl");
Trace.Warn("a2");
string htmlPath = Server.MapPath(HTMLName);
Trace.Warn("a3");
XPathDocument aXPathDocument = new XPathDocument(thisStream);
Trace.Warn("a4");
XslTransform transform = new XslTransform();
Trace.Warn("a5");
transform.Load(xslPath, resolver);
StreamWriter aStreamWriter = new StreamWriter(htmlPath);
Trace.Warn("a6");
transform. Transform(aXPathDocument,null,aStreamWri
ter, resolver);
aStreamWriter.Flush();
aStreamWriter.Close();
Trace.Warn("a7");
//Trace.Warn("ending html");
}I solved this.
"Trevor" <sales@.logicians.com> wrote in message
news:88a9861a.0407260251.53f2d587@.posting.google.com...
> System.IO.IOException: The filename, directory name, or volume label
> syntax is incorrect.
>
> I have hit a problem for which I can find no solutions. Has anyone any
> ideas?
> I am writing XML into a Memory STream and using a Transform to make
> HTML. This works fine normally, but I have no the above stated error.
> I did get some odd chars in the HTML name which caused a problem,
> which I corrected. The current error seems to random. I am wondering
> if memory is the problem, or disk space.
> Last Trace - html
2-->../Grohe/Grohe-Sundries-Handles-Handles-Automatic-2000-47255000.html<--
> shows the filename
> Code:
> string HTMLName = xmlName;
> Trace.Warn ("html--" + HTMLName);
>
> string thisManNameDir = thisManName;
> thisManNameDir = thisManNameDir.Replace(" ","");
> HTMLName = "../" + thisManNameDir + "/" + HTMLName;
> Trace.Warn ("html 2-->" + HTMLName + "<--");
> //Trace.Warn("writing html" + HTMLName );
> XmlUrlResolver resolver = new XmlUrlResolver();
>
> string thisURL1 = Request.Url.ToString();
> Trace.Warn("header " + thisURL1);
> thisURL1 = thisURL1.Replace("/myxml/Xml1.aspx","");
> string thisURL = thisURL1.Replace("http://","");
> thisURL1 = thisURL1.Replace(".co.uk","");
> thisURL1 = thisURL1.Replace(".com","");
> thisURL1 = thisURL1.Replace(".biz","");
> thisURL1 = thisURL1.Replace("http://www.","");
> string thisDomain = thisURL1.Replace("http://","");
> NetworkCredential cred = new
> NetworkCredential(thisDomain,"pwd",thisURL);
>
> thisStream.Position = 0;
> Trace.Warn("a");
> //XmlTextReader myTxtReader = new XmlTextReader (thisStream);
>
> Trace.Warn("a1");
> string xslPath = Server.MapPath("myXSL.xsl");
> Trace.Warn("a2");
> string htmlPath = Server.MapPath(HTMLName);
> Trace.Warn("a3");
> XPathDocument aXPathDocument = new XPathDocument(thisStream);
> Trace.Warn("a4");
> XslTransform transform = new XslTransform();
> Trace.Warn("a5");
> transform.Load(xslPath, resolver);
> StreamWriter aStreamWriter = new StreamWriter(htmlPath);
> Trace.Warn("a6");
>
> transform. Transform(aXPathDocument,null,aStreamWri
ter, resolver);
> aStreamWriter.Flush();
> aStreamWriter.Close();
>
>
> Trace.Warn("a7");
> //Trace.Warn("ending html");
> }

System.IO.IOException: The filename, directory name, or volume label syntax is in

Hello. I know it's been almost 3 years since this post, but I'm experiencin
g the same problem that you had and you're the only person who seems to have
an idea on how to fix it. Do you remember what your problem was and how yo
u resolved it?
Thanks in advance.
From http://www.developmentnow.com/g/8_2...-incorrect-.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com"IIT Guy" <nospam@.developmentnow.com> wrote in message
news:c2456389-6c48-41fc-b787-4447eefa6d17@.developmentnow.com...
> Hello. I know it's been almost 3 years since this post, but I'm
> experiencing the same problem that you had and you're the only person who
> seems to have an idea on how to fix it. Do you remember what your problem
> was and how you resolved it?
>
The '..' characters are not allowed.