Click here to Skip to main content
15,899,313 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionIssue related to uploading of large files or large running process. Pin
lokeshgupta1321-Dec-06 2:01
lokeshgupta1321-Dec-06 2:01 
AnswerRe: Issue related to uploading of large files or large running process. Pin
Guffa21-Dec-06 2:58
Guffa21-Dec-06 2:58 
GeneralRe: Issue related to uploading of large files or large running process. Pin
lokeshgupta1321-Dec-06 19:21
lokeshgupta1321-Dec-06 19:21 
GeneralRe: Issue related to uploading of large files or large running process. Pin
Guffa21-Dec-06 21:15
Guffa21-Dec-06 21:15 
GeneralRe: Issue related to uploading of large files or large running process. Pin
lokeshgupta1322-Dec-06 19:40
lokeshgupta1322-Dec-06 19:40 
GeneralRe: Issue related to uploading of large files or large running process. Pin
Guffa22-Dec-06 19:45
Guffa22-Dec-06 19:45 
GeneralRe: Issue related to uploading of large files or large running process. Pin
lokeshgupta1322-Dec-06 20:56
lokeshgupta1322-Dec-06 20:56 
Questionnot able to write to file in asp.net. Pin
rama charan21-Dec-06 2:00
rama charan21-Dec-06 2:00 
i am using vs2003

i want to write some text into an existing file present at server side using asp.net but it gives me an exception named
----->System.UnauthorizedAccessException: <------


so i need how to get permission to write file to server
any suggestions are also welcome


the code i used is given below---

Dim fs As New FileStream("C:\Inetpub\wwwroot\wa_readfromcsv\textfile_as_csv.txt", FileMode.Create, FileAccess.Write)
Dim s As New StreamWriter(fs)
s.WriteLine("This is an example of using file handling concepts in VB.NET.")
s.WriteLine("This concept is interesting.")
s.Close()


------- the exact error shown is ---------
' Exception Details: System.UnauthorizedAccessException:
' Access to the path "C:\Inetpub\wwwroot\wa_readfromcsv\textfile_as_csv.txt" is denied.

'ASP.NET is not authorized to access the requested resource.
'Consider granting access rights to the resource to the ASP.NET request identity.
'ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5
'or Network Service on IIS 6) that is used if the application is
'not impersonating. If the application is impersonating via <identity impersonate="true">,
'the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

'To grant ASP.NET write access to a file, right-click the file in Explorer,
'choose "Properties" and select the Security tab.
'Click "Add" to add the appropriate user or group.
' Highlight the ASP.NET account, and check the boxes for the desired access.

thanks in advance for your help and time...
AnswerRe: not able to write to file in asp.net. Pin
Pete O'Hanlon21-Dec-06 2:08
mvePete O'Hanlon21-Dec-06 2:08 
GeneralRe: not able to write to file in asp.net. Pin
Colin Angus Mackay21-Dec-06 2:21
Colin Angus Mackay21-Dec-06 2:21 
GeneralRe: not able to write to file in asp.net. Pin
rama charan21-Dec-06 2:24
rama charan21-Dec-06 2:24 
GeneralRe: not able to write to file in asp.net. Pin
Pete O'Hanlon21-Dec-06 2:29
mvePete O'Hanlon21-Dec-06 2:29 
GeneralRe: not able to write to file in asp.net. Pin
rama charan21-Dec-06 6:48
rama charan21-Dec-06 6:48 
QuestionT-SQL transaction vs ADO.NET transactions Pin
Dinuraj21-Dec-06 1:28
Dinuraj21-Dec-06 1:28 
AnswerRe: T-SQL transaction vs ADO.NET transactions Pin
Pete O'Hanlon21-Dec-06 2:06
mvePete O'Hanlon21-Dec-06 2:06 
Questionhow to encrypt password in web.config? Pin
samerh21-Dec-06 1:23
samerh21-Dec-06 1:23 
AnswerRe: how to encrypt password in web.config? Pin
Sebastian M21-Dec-06 2:25
Sebastian M21-Dec-06 2:25 
AnswerRe: how to encrypt password in web.config? Pin
enjoycrack21-Dec-06 19:23
enjoycrack21-Dec-06 19:23 
QuestionRequiredfieldValidator Pin
smruti_ranjan21-Dec-06 1:13
smruti_ranjan21-Dec-06 1:13 
AnswerRe: RequiredfieldValidator Pin
MY120121-Dec-06 9:19
MY120121-Dec-06 9:19 
QuestionRegular Expression needed... Pin
just3ala221-Dec-06 0:59
just3ala221-Dec-06 0:59 
AnswerRe: Regular Expression needed... Pin
smruti_ranjan21-Dec-06 1:31
smruti_ranjan21-Dec-06 1:31 
AnswerRe: Regular Expression needed... Pin
samerh21-Dec-06 1:38
samerh21-Dec-06 1:38 
GeneralRe: Regular Expression needed... Pin
just3ala221-Dec-06 1:49
just3ala221-Dec-06 1:49 
GeneralRe: Regular Expression needed... Pin
samerh21-Dec-06 1:56
samerh21-Dec-06 1:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.