Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 20th, 2004, 09:43 AM
Authorized User
 
Join Date: Jun 2003
Location: Northbrook, Illinois, USA.
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default File Permissions

I've written a asp.net program that I need to create and write to a text file on the server. When I try using System.IO.StreamWriter I get the error, Unknown user name or bad password. Does anyone have any idea how I can access and write to a file on the server?

Thanks,

Renee C. Walker
__________________
Renee C. Walker
  #2 (permalink)  
Old April 20th, 2004, 09:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

What folder are you writing to and who (what account) has permissions to write to it?

  #3 (permalink)  
Old April 20th, 2004, 11:13 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Does the ASPNET account have access to that server folder? It would be in the form of MACHINENAME\ASPNET, so your machine must have access...
  #4 (permalink)  
Old April 20th, 2004, 11:44 AM
Authorized User
 
Join Date: Jun 2003
Location: Northbrook, Illinois, USA.
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not sure how to do that.

Renee C. Walker
  #5 (permalink)  
Old April 20th, 2004, 12:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Right click the folder and go to properties. You should see a 'Security' tab. If you don't try this:

Open 'My Computer'. Click 'Tools' and then 'Folder Options'. Then click on the 'View' Tab and scroll all the way to the bottom. Uncheck 'Use Simple File Sharing(Recommended)' and click 'Ok' or 'Yes' to the warning.

Once that has been done you should be able to go the the folder where your file will be created and right click on the folder and give <machine name>\aspnet account write access to the folder.

You must be using NTFS and NOT FAT16 or FAT32.


  #6 (permalink)  
Old April 20th, 2004, 12:29 PM
Authorized User
 
Join Date: Jun 2003
Location: Northbrook, Illinois, USA.
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay, thanks.

Renee C. Walker


Similar Threads
Thread Thread Starter Forum Replies Last Post
File permissions windows 2000 rasheed.akr ASP.NET 1.0 and 1.1 Professional 0 September 15th, 2008 01:45 AM
How to change FTP File permissions malay mehta PHP How-To 0 October 29th, 2007 05:18 AM
Network File Permissions Pope ASP.NET 1.0 and 1.1 Professional 2 January 12th, 2006 12:42 PM
Security permissions of file eelisMX Pro VB.NET 2002/2003 0 October 4th, 2005 05:33 AM
File System Object Permissions kilika Classic ASP Basics 2 August 6th, 2003 09:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.