|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Access to the path is denied - trying to write a fileHi;
I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images C:\Inetpub\wwwroot\RunReportASP is the directory of my virtual directory for my app. In it's properties I did check "Write" as a permission. What else do I need to do? -- thanks - dave Hi Dave,
Welcome to ASPNET newsgroup. Regarding on the "Access to the path denied..." error, it is a normal exception when there is unsufficient permission of the current ASP.NET process identity... What's your ASP.NET application's current IIS process identity setting and the web.config security setting? If you're using teh default process identity(Network Service) and dosn't using Impersonate in web.config, then the network service account dosn't have write/modify permissions to the IIS's default site's directory(or sub dirs) by default... And this permission is the NTFS file permission (not the IIS's virtual directory permission...). So you can using file explore to grant NTFS write/modify permission to the ASPNET process identity (network service) or the IIS_WPG group and test again.... Hope helps. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- Show quoteHide quote | Thread-Topic: Access to the path is denied - trying to write a file microsoft.public.dotnet.framework.aspnet:365185| thread-index: AcYBtprsF9LS7iE6QPyNBpbaVvNjDQ== | X-WBNR-Posting-Host: 199.45.247.98 | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam> | Subject: Access to the path is denied - trying to write a file | Date: Thu, 15 Dec 2005 12:32:02 -0800 | Lines: 13 | Message-ID: <E8613100-C5F0-4876-AE4C-22F5F1AEC***@microsoft.com> | MIME-Version: 1.0 | Content-Type: text/plain; | charset="Utf-8" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | Content-Class: urn:content-classes:message | Importance: normal | Priority: normal | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | Hi; | | I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But | when it tries to write a file I get: | Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images | | C:\Inetpub\wwwroot\RunReportASP is the directory of my virtual directory for | my app. In it's properties I did check "Write" as a permission. | | What else do I need to do? | | -- | thanks - dave | Hi;
I brought up My Computer, went to the images subdirectory, brought up sharing & security, selected the Security tab and gave full control to IIS_WPG(JASMINE\IISWPG). Now instead of the error my web pages comes up but it then brings up the dialog asking me to enter a username & password. When I click cancel it then shows me the image as the little box with the red x in it. So I think that for some reason it won't let me at that directory. The images directory is a sub directory of the asp, but is not a subdirectory of any of my websites. Do I need to create a website that maps ton my asp app? If you want to see, go to http://www.windwardreports.com/RunReportASP/ReportForm.aspx and select html as the format. -- Show quoteHide quotethanks - dave "Steven Cheng[MSFT]" wrote: > Hi Dave, > > Welcome to ASPNET newsgroup. > Regarding on the "Access to the path denied..." error, it is a normal > exception when there is unsufficient permission of the current ASP.NET > process identity... What's your ASP.NET application's current IIS process > identity setting and the web.config security setting? > > If you're using teh default process identity(Network Service) and dosn't > using Impersonate in web.config, then the network service account dosn't > have write/modify permissions to the IIS's default site's directory(or sub > dirs) by default... And this permission is the NTFS file permission (not > the IIS's virtual directory permission...). So you can using file explore > to grant NTFS write/modify permission to the ASPNET process identity > (network service) or the IIS_WPG group and test again.... > > Hope helps. Thanks, > > Steven Cheng > Microsoft Online Support > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > > > -------------------- > | Thread-Topic: Access to the path is denied - trying to write a file > | thread-index: AcYBtprsF9LS7iE6QPyNBpbaVvNjDQ== > | X-WBNR-Posting-Host: 199.45.247.98 > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam> > | Subject: Access to the path is denied - trying to write a file > | Date: Thu, 15 Dec 2005 12:32:02 -0800 > | Lines: 13 > | Message-ID: <E8613100-C5F0-4876-AE4C-22F5F1AEC***@microsoft.com> > | MIME-Version: 1.0 > | Content-Type: text/plain; > | charset="Utf-8" > | Content-Transfer-Encoding: 7bit > | X-Newsreader: Microsoft CDO for Windows 2000 > | Content-Class: urn:content-classes:message > | Importance: normal > | Priority: normal > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 > | Newsgroups: microsoft.public.dotnet.framework.aspnet > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl > | Xref: TK2MSFTNGXA02.phx.gbl > microsoft.public.dotnet.framework.aspnet:365185 > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet > | > | Hi; > | > | I created a virtual directory in IIS 6.0 and my asp.net app runs fine. > But > | when it tries to write a file I get: > | Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images > | > | C:\Inetpub\wwwroot\RunReportASP is the directory of my virtual directory > for > | my app. In it's properties I did check "Write" as a permission. > | > | What else do I need to do? > | > | -- > | thanks - dave > | > > Thanks for your quick response Dave,
Well, I've visisted that link and saw the problem when choose html/css report. I think it still something incorrect with the IIS's virtual directory security setting(since it's the static image file that is cause the problem) Is that image folder's IIS secuirty set as "allow anomymous"? You can view virutal directory's security setting (not NTFS permission) through IIS manager 's "Directory Security" tab ...... Also, there is no need to create a standalone site for a certain web application.... We can just deploy asp.net application in a virtual directory under website.... And here is some technet reference about deploying asp.net web application in IIS6 http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/6 4ac3577-7746-4fbd-a5e6-e50bdecf7a24.mspx In addition, you can also try posting in IIS group if you have any specific question about IIS virutal dir setting.... Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | Thread-Topic: Access to the path is denied - trying to write a file <rcajcXeAGHA.1***@TK2MSFTNGXA02.phx.gbl>| thread-index: AcYB+1ZrDdNPQxIaR16lrB57xeB/oQ== | X-WBNR-Posting-Host: 199.45.247.98 | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam> | References: <E8613100-C5F0-4876-AE4C-22F5F1AEC***@microsoft.com> Show quoteHide quote | Subject: RE: Access to the path is denied - trying to write a file TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA| Date: Thu, 15 Dec 2005 20:44:02 -0800 | Lines: 93 | Message-ID: <69029D79-6286-44FC-A2B1-EE6EF8483***@microsoft.com> | MIME-Version: 1.0 | Content-Type: text/plain; | charset="Utf-8" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | Content-Class: urn:content-classes:message | Importance: normal | Priority: normal | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 | Path: 03.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.framework.aspnet:365257Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | Hi; | | I brought up My Computer, went to the images subdirectory, brought up | sharing & security, selected the Security tab and gave full control to | IIS_WPG(JASMINE\IISWPG). | | Now instead of the error my web pages comes up but it then brings up the | dialog asking me to enter a username & password. When I click cancel it then | shows me the image as the little box with the red x in it. | | So I think that for some reason it won't let me at that directory. The | images directory is a sub directory of the asp, but is not a subdirectory of | any of my websites. Do I need to create a website that maps ton my asp app? | | If you want to see, go to | http://www.windwardreports.com/RunReportASP/ReportForm.aspx and select html | as the format. | | -- | thanks - dave | | | "Steven Cheng[MSFT]" wrote: | | > Hi Dave, | > | > Welcome to ASPNET newsgroup. | > Regarding on the "Access to the path denied..." error, it is a normal | > exception when there is unsufficient permission of the current ASP.NET | > process identity... What's your ASP.NET application's current IIS process | > identity setting and the web.config security setting? | > | > If you're using teh default process identity(Network Service) and dosn't | > using Impersonate in web.config, then the network service account dosn't | > have write/modify permissions to the IIS's default site's directory(or sub | > dirs) by default... And this permission is the NTFS file permission (not | > the IIS's virtual directory permission...). So you can using file explore | > to grant NTFS write/modify permission to the ASPNET process identity | > (network service) or the IIS_WPG group and test again.... | > | > Hope helps. Thanks, | > | > Steven Cheng | > Microsoft Online Support | > | > Get Secure! www.microsoft.com/security | > (This posting is provided "AS IS", with no warranties, and confers no | > rights.) | > | > | > -------------------- | > | Thread-Topic: Access to the path is denied - trying to write a file | > | thread-index: AcYBtprsF9LS7iE6QPyNBpbaVvNjDQ== | > | X-WBNR-Posting-Host: 199.45.247.98 | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam> | > | Subject: Access to the path is denied - trying to write a file | > | Date: Thu, 15 Dec 2005 12:32:02 -0800 | > | Lines: 13 | > | Message-ID: <E8613100-C5F0-4876-AE4C-22F5F1AEC***@microsoft.com> | > | MIME-Version: 1.0 | > | Content-Type: text/plain; | > | charset="Utf-8" | > | Content-Transfer-Encoding: 7bit | > | X-Newsreader: Microsoft CDO for Windows 2000 | > | Content-Class: urn:content-classes:message | > | Importance: normal | > | Priority: normal | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 | > | Newsgroups: microsoft.public.dotnet.framework.aspnet | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl | > | Xref: TK2MSFTNGXA02.phx.gbl | > microsoft.public.dotnet.framework.aspnet:365185 | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | > | | > | Hi; | > | | > | I created a virtual directory in IIS 6.0 and my asp.net app runs fine. | > But | > | when it tries to write a file I get: | > | Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images | > | | > | C:\Inetpub\wwwroot\RunReportASP is the directory of my virtual directory | > for | > | my app. In it's properties I did check "Write" as a permission. | > | | > | What else do I need to do? | > | | > | -- | > | thanks - dave | > | | > | > |
Other interesting topics
Anyone tried the design templates from MSDN?
CSS Question Please help me with FxCOP 1.32 and ASP.NET 2.0 CheckBoxList problem. Want to add some javascript to each checkbox Property Feature For Comparing DateTime Auto Mode FTP in .NET 1.1 Gripe: usability problems with directory listing in .Net 2 Poping up a window AND redirecting the page thtat triggered the po 2005 Differences in a nutshell? Getting Value out of a data repeater checkbox |
|||||||||||||||||||||||