[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 445
  • Last Modified:

IO.File.CreateText Logon failure

Using ASP.Net/VB.Net 2, I am trying to write to a file from a WEB App.
When I use the code -
Dim oWrite As System.IO.StreamWriter
oWrite = IO.File.CreateText(CorrectFileAddress)
I get the following error -
Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)

Everything runs fine when on the LocalHost, but when it is deployed to the Live Web Server (IIS6), then I get the error.

Thanks
0
rangemaster
Asked:
rangemaster
1 Solution
 
TSmoothCommented:
Make sure that the account your asp.net service is running on has write access permission to the folder you are attempting to write to. Depending on your server's Configuration/OS, this could be the Network Service account or the ASP.NET account. You can see which user account it is using within the IIS management console.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now