Solved

Database retrieval is not visible in the webpage.

Posted on 2011-03-19
5
243 Views
Last Modified: 2012-08-13
Hi,
I could be able to connect to the database and the connection is success when ever I click the Test Database connection but it is not displaying any information from the DB tables.

I am getting this when I try to configure the ASP.NET  configuration.
----------------------------------------------------------------------------------------
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

but in fact I created the database connection and put the exact connection string but it is not displaying any information from the tables.

I have attached the web.config file code as well.
-------------------------------------

Thanks


<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
	<connectionStrings>
		<add name="BestDB" connectionString="Data Source=E-COM;Initial Catalog=BestDB;Persist Security Info=True;User ID=sa;Password=*********" providerName="System.Data.SqlClient"/>
</connectionStrings>
  <appSettings>
    <add key="SiteTitle" value="Best" />
    <add key="SiteDescription" />
    <add key="TimeOffset" value="-5" />
    <add key="DaylightSaving" value="true" />
    <add key="CopyrightMessage" value="Copyright@Best.com,All Rights Reserved, 2010" />
    <add key="Best" value="Best" />
  </appSettings>
	<system.web>
		<compilation debug="true" targetFramework="4.0"/>
		<authentication mode="Forms">
			
      <forms loginUrl="**************.aspx" defaultUrl="Default.aspx">
        <credentials passwordFormat="Clear">
          <user name="Admin" password="********"/>
        </credentials>
      </forms>
		</authentication>
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
      </providers>
    </membership>
    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
      </providers>
    </profile>
    <roleManager enabled="false">
      <providers>
        <clear/>
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
      </providers>
    </roleManager>
	</system.web>
	<system.webServer>
		<modules runAllManagedModulesForAllRequests="true"/>
	</system.webServer>
  <location path="********.master">
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="******.aspx">
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="*******************.aspx">
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="**********************.aspx">
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="**********************.aspx">
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="**********************.aspx">
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="*****************.aspx">
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="*****************.aspx">
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
 <location path="**************.aspx">
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
</configuration>

Open in new window

0
Comment
Question by:sivakugan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 3

Expert Comment

by:exceter
ID: 35171600
I suppose that your SQL server is 2005 or 2008.

Open Sql Server Configuration Manager -> Sql Server Network Configuration -> enable "Named pipes"
0
 

Author Comment

by:sivakugan
ID: 35171755
I done that as you advised but still I am getting the same thing. The information from db is not visible.
but I could see the static information in webpage. Further I am not getting any error also.
This is making me  hard to figure out the problem. The name pipe was disabled and I enabled it after u said but it didn't work out.
0
 

Assisted Solution

by:sivakugan
sivakugan earned 0 total points
ID: 35171996
Can anyone help me to resolve this issue plz?
0
 

Accepted Solution

by:
sivakugan earned 0 total points
ID: 35177395
I have resolved the problem myself. I didn't give enough permission to the SQL server login user.
thats why it didn't display any data from the database.
0
 

Author Closing Comment

by:sivakugan
ID: 35213341
I have resolved the problem myself. I didn't give enough permission to the SQL server login user.
thats why it didn't display any data from the database.
0

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

736 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question