Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Database retrieval is not visible in the webpage.

Posted on 2011-03-19
5
Medium Priority
?
250 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

618 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