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

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

unknown user name or bad password for connection

Logon failure: unknown user name or bad password.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.IOException: Logon failure: unknown user name or bad password.

Source Error:


Line 32:         Label1.Text = dir.ToString
Line 33:         'Holds files returned from dir object
Line 34:         Dim files As IO.FileInfo() = dir.GetFiles("*.exe")
Line 35:
Line 36:         Dim fileName As IO.FileInfo
 
=========================================================
 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        Dim dir As New IO.DirectoryInfo("\\loncommon\ddgmemd")

        Label1.Text = dir.ToString
        'Holds files returned from dir object
        Dim files As IO.FileInfo() = dir.GetFiles("*.exe")

        Dim fileName As IO.FileInfo
        For Each fileName In files
            Listbox1.Items.Add(fileName.Name)
        Next

    End Sub
Somehow I have to put the username and password.

==============================================
Source File: C:\Inetpub\wwwroot\LegacyDB\ReportApp.aspx.vb    Line: 34

Stack Trace:
0
mathieu_cupryk
Asked:
mathieu_cupryk
  • 3
1 Solution
 
SandeepRRCommented:
Hi
have i tried this
<identity impersonate="true"/>

just add the username and password to it

<identity impersonate="true" userName="Username" password="pwd"/>


mention the ADministrator username and password in that for trial



SandeepRR
0
 
mathieu_cuprykAuthor Commented:
I cannot add it to the code?

0
 
SandeepRRCommented:
it is supposed to be added to the web.config

u can add it above the line

</system.web>

SandeepRR
0
 
SandeepRRCommented:
and where i mention the UserName and password it is case sensitive and u have to add the user name and password of the privileged users like the person who has the network acess rights.

<identity impersonate="true" userName="username" password="pwd"/>

this is exact entry for the identity tag


SandeepRR
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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