Ask a Question related to ASP.NET General, Design and Development.
-
Chad Crowder #1
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.
- Chad
Chad Crowder Guest
-
"File Not Found" error when file exists
Are you getting a HTTP Protocol 404 error or are you getting errors when you use a FileExists function? Do you have CF's global error template... -
"File Not Found" error when file exists
We get "File not found" on our login file every few weeks. We use Windows 2000 server with MX 6.1 This has been happening for 2 years. Modifying... -
Can't create PS file - "no desktop printer exists for this spool type"
I can create PDF files from Photoshop, Illustrator or from any eps file by dropping them on to Distiller, but I can't create a ps file. I don't have... -
File Not found 404 Error -- while the file exists and mostly loads.
There is an ASP page in my site which sometimes gives file not found error. This page which is suppossedly missing exists on the server and... -
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... -
Natty Gur #2
Re: System.IO.IOException: Cannot create a file when that file already exists.
Hi,
the default user that runs web application (system) don’t 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 [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
-
[MSFT]Allen #3
RE: System.IO.IOException: Cannot create a file when that file already exists.
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
[url]http://groups.google.com/groups?q=System.IO.IOException+asp.net&start=10&hl =[/url]
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? [url]http://www.gotdotnet.com[/url]
--------------------
| 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
|
|
|
[MSFT]Allen Guest
-
Chad Crowder #4
Re: System.IO.IOException: Cannot create a file when that file already exists.
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...[url]http://groups.google.com/groups?q=System.IO.IOException+asp.net&start=10&hl =[/url]> 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
>rights.> 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"> Got .Net? [url]http://www.gotdotnet.com[/url]
>
> --------------------
> | 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.s> &
> | 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 thebut> | drive is the failover drive. I can't imagine that could be a problem,says:> | 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 serverno> | 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> | other documentation on this.
> | - Chad
> |
> |
> |
>
Chad Crowder Guest
-
Chad Crowder #5
Re: System.IO.IOException: Cannot create a file when that file already exists.
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...the> Try creating a directory in your code under the folder where your web
> application resides. Does it works? In addition, you may want to verifyrights.> account your web application is running under. Please download tokedump
> written by Keith Brown from
> [url]http://msdn.microsoft.com/msdnmag/issues/01/11/security/default.aspx[/url]. It
> would show you what account the application is running under.
>
> -Allen
>
> Disclaimer:
> This posting is provided "AS IS" with no warranties, and confers nomicrosoft.public.dotnet.framework.aspnet:165699> Got .Net? [url]http://www.gotdotnet.com[/url]
>
> --------------------
> | 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.gblby> | 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[url]http://groups.google.com/groups?q=System.IO.IOException+asp.net&start=10&hl =[/url]> | > having no right to access network resources. Willy address a similar
> | > problem before. See
> | >
> |
>try> | > 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? [url]http://www.gotdotnet.com[/url]
> | >
> | > --------------------
> | > | 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 Iproblem,> | > | 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 abe> | 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'tfind> an
> | > | issue (i've even tried as domain admin)
> | > |
> | > | I would appreciate any help on this, as I'm out of ideas, and can> | no
> | > | other documentation on this.
> | > | - Chad
> | > |
> | > |
> | > |
> | >
> |
> |
> |
>
Chad Crowder Guest



Reply With Quote

