Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Configuration Error

Configuration Error

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netwindows-adminsecurityhelp
11 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MS Lee
    wrote on last edited by
    #1

    hi , when i run my asp.net page from IIS, it shows the following configuration error how could to resolve..? Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Source Error: Line 43: ASP.NET to identify an incoming user. Line 44: --> Line 45:authentication mode="Windows" Line 46:

    V 1 Reply Last reply
    0
    • M MS Lee

      hi , when i run my asp.net page from IIS, it shows the following configuration error how could to resolve..? Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Source Error: Line 43: ASP.NET to identify an incoming user. Line 44: --> Line 45:authentication mode="Windows" Line 46:

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      Explain the Steps you took when deploying your application

      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswam@its.co.za

      M 1 Reply Last reply
      0
      • V Vimalsoft Pty Ltd

        Explain the Steps you took when deploying your application

        Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswam@its.co.za

        M Offline
        M Offline
        MS Lee
        wrote on last edited by
        #3

        previously i went to IIS tree, right-click the Default Web Site item and choose New -> Virtual Directory gave alias name,then physical directory path,and gave virtual directory access path,and finished. then i delete the virtual directory and configure again with the same process, i dont know how the things went wrong previously, now my index page is working, here am getting user name and login, when i give signin button am getting error as Server Error in '/MySweethomes' Application. Cannot open database "test" requested by the login. The login failed. Login failed for user 'SOFTWARE\ASPNET'.--------------> here my database name is 'SOFTWARE\test' 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.Data.SqlClient.SqlException: Cannot open database "test" requested by the login. The login failed. Login failed for user 'SOFTWARE\ASPNET'. Source Error: Line 23: { Line 24: SqlConnection conn = new SqlConnection(ConnStr); Line 25: conn.Open(); Line 26: string MyQuery = "SELECT USERNAME,PASSWORD FROM LoginDB " + "WHERE USERNAME = '" + UName + "' AND PASSWORD = '" + Pass + "'"; Line 27: SqlDataAdapter Sda = new SqlDataAdapter(MyQuery, conn); Source File: F:\SweetHomes\SweetHomes\Login.cs Line: 25

        self confidence+hard work=SUCCESS

        V 1 Reply Last reply
        0
        • M MS Lee

          previously i went to IIS tree, right-click the Default Web Site item and choose New -> Virtual Directory gave alias name,then physical directory path,and gave virtual directory access path,and finished. then i delete the virtual directory and configure again with the same process, i dont know how the things went wrong previously, now my index page is working, here am getting user name and login, when i give signin button am getting error as Server Error in '/MySweethomes' Application. Cannot open database "test" requested by the login. The login failed. Login failed for user 'SOFTWARE\ASPNET'.--------------> here my database name is 'SOFTWARE\test' 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.Data.SqlClient.SqlException: Cannot open database "test" requested by the login. The login failed. Login failed for user 'SOFTWARE\ASPNET'. Source Error: Line 23: { Line 24: SqlConnection conn = new SqlConnection(ConnStr); Line 25: conn.Open(); Line 26: string MyQuery = "SELECT USERNAME,PASSWORD FROM LoginDB " + "WHERE USERNAME = '" + UName + "' AND PASSWORD = '" + Pass + "'"; Line 27: SqlDataAdapter Sda = new SqlDataAdapter(MyQuery, conn); Source File: F:\SweetHomes\SweetHomes\Login.cs Line: 25

          self confidence+hard work=SUCCESS

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          This tells me that your Connection string in your web.config is poiting to an incorrect database or path. Post your Connection String in your Web.Config and let us see

          Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswam@its.co.za

          M 1 Reply Last reply
          0
          • V Vimalsoft Pty Ltd

            This tells me that your Connection string in your web.config is poiting to an incorrect database or path. Post your Connection String in your Web.Config and let us see

            Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswam@its.co.za

            M Offline
            M Offline
            MS Lee
            wrote on last edited by
            #5

            do you want all lines from that,,? i coded only as appsettings add key="MyConnection" value="Data Source=SOFTWARE;Initial Catalog=test;Integrated Security=True;" /> add/appsettings authentication mode="Windows"

            self confidence+hard work=SUCCESS

            V M 2 Replies Last reply
            0
            • M MS Lee

              do you want all lines from that,,? i coded only as appsettings add key="MyConnection" value="Data Source=SOFTWARE;Initial Catalog=test;Integrated Security=True;" /> add/appsettings authentication mode="Windows"

              self confidence+hard work=SUCCESS

              V Offline
              V Offline
              Vimalsoft Pty Ltd
              wrote on last edited by
              #6

              Where is the Username and Password ? That is why it gives errors, try to write it like this

              <add key="MyConnection" value="User id = sa;Password=mypass;Server=SOFTWARE;Database= test" />

              If you are working with SQL Server you must always pass the username and password

              Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswam@its.co.za

              M 1 Reply Last reply
              0
              • M MS Lee

                do you want all lines from that,,? i coded only as appsettings add key="MyConnection" value="Data Source=SOFTWARE;Initial Catalog=test;Integrated Security=True;" /> add/appsettings authentication mode="Windows"

                self confidence+hard work=SUCCESS

                M Offline
                M Offline
                MS Lee
                wrote on last edited by
                #7

                i solve this problem i execute the following query and now its working exec sp_grantdbaccess N'SOFTWARE\ASPNET', N'ASPNET' exec sp_addrolemember N'db_owner', N'ASPNET' and .... !! after successfully login am showing a page and in that am updating a content of text in to text file, now when i try to update the text content am getting as Could not find a part of the path 'C:\windows\system32\SweetHomes\Documents\SweetHomes.txt'. 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.DirectoryNotFoundException: Could not find a part of the path 'C:\windows\system32\SweetHomes\Documents\SweetHomes.txt'. Source Error: Line 43: string fname = "SweetHomes\\Documents\\SweetHomes.txt"; Line 44: string readcontent; Line 45: StreamReader Srdr = new StreamReader(fname); Line 46: readcontent = Srdr.ReadToEnd(); Line 47: Srdr.Close(); Source File: F:\SweetHomes\SweetHomes\AdminInfo.aspx.cs Line: 45

                self confidence+hard work=SUCCESS

                M 1 Reply Last reply
                0
                • V Vimalsoft Pty Ltd

                  Where is the Username and Password ? That is why it gives errors, try to write it like this

                  <add key="MyConnection" value="User id = sa;Password=mypass;Server=SOFTWARE;Database= test" />

                  If you are working with SQL Server you must always pass the username and password

                  Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswam@its.co.za

                  M Offline
                  M Offline
                  MS Lee
                  wrote on last edited by
                  #8

                  there is no user name and password.. and i execute exec sp_grantdbaccess N'SOFTWARE\ASPNET', N'ASPNET' exec sp_addrolemember N'db_owner', N'ASPNET' this commands and now its working,

                  self confidence+hard work=SUCCESS

                  V 1 Reply Last reply
                  0
                  • M MS Lee

                    there is no user name and password.. and i execute exec sp_grantdbaccess N'SOFTWARE\ASPNET', N'ASPNET' exec sp_addrolemember N'db_owner', N'ASPNET' this commands and now its working,

                    self confidence+hard work=SUCCESS

                    V Offline
                    V Offline
                    Vimalsoft Pty Ltd
                    wrote on last edited by
                    #9

                    You execute this in SQL ? If yes, then before you execute this, you must first login in order to run Commands, so that user name and password that you use to log in there , is what is needed.

                    Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswam@its.co.za

                    1 Reply Last reply
                    0
                    • M MS Lee

                      i solve this problem i execute the following query and now its working exec sp_grantdbaccess N'SOFTWARE\ASPNET', N'ASPNET' exec sp_addrolemember N'db_owner', N'ASPNET' and .... !! after successfully login am showing a page and in that am updating a content of text in to text file, now when i try to update the text content am getting as Could not find a part of the path 'C:\windows\system32\SweetHomes\Documents\SweetHomes.txt'. 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.DirectoryNotFoundException: Could not find a part of the path 'C:\windows\system32\SweetHomes\Documents\SweetHomes.txt'. Source Error: Line 43: string fname = "SweetHomes\\Documents\\SweetHomes.txt"; Line 44: string readcontent; Line 45: StreamReader Srdr = new StreamReader(fname); Line 46: readcontent = Srdr.ReadToEnd(); Line 47: Srdr.Close(); Source File: F:\SweetHomes\SweetHomes\AdminInfo.aspx.cs Line: 45

                      self confidence+hard work=SUCCESS

                      M Offline
                      M Offline
                      MS Lee
                      wrote on last edited by
                      #10

                      actually i create a folder in my application and create a text file in that, through the coding am showing content and updating the contents to the file. now when i run this page from IIS and try to show the contents it shows the cannot find the path it takes the path from C:\windows\system32\SweetHomes\Documents\SweetHomes.txt but mine in F:\SweetHomes\Documents\SweetHomes.txt i could not find solution to change the path !!

                      self confidence+hard work=SUCCESS

                      M 1 Reply Last reply
                      0
                      • M MS Lee

                        actually i create a folder in my application and create a text file in that, through the coding am showing content and updating the contents to the file. now when i run this page from IIS and try to show the contents it shows the cannot find the path it takes the path from C:\windows\system32\SweetHomes\Documents\SweetHomes.txt but mine in F:\SweetHomes\Documents\SweetHomes.txt i could not find solution to change the path !!

                        self confidence+hard work=SUCCESS

                        M Offline
                        M Offline
                        MS Lee
                        wrote on last edited by
                        #11

                        when specifying the path i give server.mappath("filename") now my problem solved... :)

                        self confidence+hard work=SUCCESS

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups