Solved

Database retrieval is not visible in the webpage.

Posted on 2011-03-19
5
245 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

691 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