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

x
?
Solved

unable to connect to DB through asp config security wizard

Posted on 2006-04-10
7
Medium Priority
?
603 Views
Last Modified: 2008-01-09
   I've been trying to set up a website under VS 2005 and SQl Server Std 2005 to no avail.  I have followed all the steps said to be necessary.

from the security tab of the config mgr, I use the step by step configure wizard; I get the error.

An error was encountered. Please return to the previous page and try again.

The following message may help in diagnosing the problem: Unable to connect to SQL Server database. at System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership, String methodName, Object[] parameters, Type[] paramTypes) at ASP.security_wizard_wizardpermission_ascx.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


I've:

created users in sql and applied proper security.
configured IIS and set sharing and security on the web folder of the website
ran aspnet_regsql.exe -e -s localhost -a all -d adventureworks    (SQl Server std only)

current config file:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <connectionStrings>
      <add name="AdventureWorksConnectionString" connectionString="Data Source=COMP2-28;database=AdventureWorks;user id=SE;password=Zaq!xsw2"/>
                                                                   
    </connectionStrings>
  <system.web>
    <roleManager enabled="true" />
    <authentication mode="Forms">
      <forms name=".ASPXFORMSAUTH" />
    </authentication>
    <authorization>
      <deny users="?" />
    </authorization>
    <membership defaultProvider="SqlProvider"
      userIsOnlineTimeWindow="15">
      <providers>
        <clear/>
        <add name="SqlProvider"
          type="System.Web.Security.SqlMembershipProvider"
          connectionStringName="AdventureWorksConnectionString"
          applicationName="website2"
          enablePasswordRetrieval="true"
          enablePasswordReset="true"
          passwordFormat="Encrypted"
          requiresQuestionAndAnswer="true" />
      </providers>
    </membership>

    <profile defaultProvider="SqlProvider">
      <providers>
        <clear />
        <add name="SqlProvider"
          type="System.Web.Profile.SqlProfileProvider"
          connectionStringName="AdventureWorksConnectionString"
          applicationName="website2"
          description="SqlProfileProvider for website2" />
      </providers>

    </profile>
  </system.web>
</configuration>

I've researched this and can not come up with a plausible cause and solution.

AAAAGGGGHHHGGG  !!!!!   what am I missing??
0
Comment
Question by:Steve7423
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:pbocanegra
ID: 16421356
add in web.config , after </system.web>


  <appSettings>
    <!--   User application and configured property settings go here.-->
    <!--   Example: <add key="settingName" value="settingValue"/> -->
    <add key="conn_peic.ConnectionString" value="Provider=MSDAORA.1;Password=xxxxxxxx;User ID=pres_form;Data Source=TORTI.acp"/>
           <add key="apps_peic.AppsTitle" value="Sistema Automatizado de Presupuesto (SISPRE)"/>
     </appSettings>



      <add name="AdventureWorksConnectionString" connectionString="Data Source=COMP2-28;database=AdventureWorks;user id=SE;password=Zaq!xsw2"/>


      <add key="AdventureWorksConnectionString" value="Data Source=COMP2-28;database=AdventureWorks;user id=SE;password=Zaq!xsw2"/>

0
 
LVL 4

Expert Comment

by:pbocanegra
ID: 16421373
<AppSettings>
<add key="AdventureWorksConnectionString" value="Data Source=COMP2-28;database=AdventureWorks;user id=SE;password=Zaq!xsw2"/>
</AppSettings>
0
 

Author Comment

by:Steve7423
ID: 16421543
do i remove the connection string from the connection node?

Example

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <connectionStrings>
                                                                   
    </connectionStrings>
  <system.web>
        <AppSettings>
          <add key= "AdventureWorksConnectionString" value="Data          Source=COMP2-28;database=AdventureWorks;user id=SE;password=Zaq!xsw2"/>
        <AppSettings>
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Steve7423
ID: 16421675
Web.Config

<connectionStrings>
            <add name="AdventureWorksConnectionString" connectionString="Data Source=COMP2-28;database=AdventureWorks;user id=SE;password=Zaq!xsw2"/>
      </connectionStrings>
  <system.web>
        <AppSettings>
              <add key="AdventureWorksConnectionString" value="Data Source=COMP2-28;database=AdventureWorks;user id=SE;password=Zaq!xsw2"/>
        </AppSettings>

I tried it with and without the connectionstring node.  current error:
Unrecognized configuration section system.web/AppSettings. (C:\Documents and Settings\steve\My Documents\Visual Studio 2005\WebSites\WebSite2\web.config line 7)

0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16469108
Closed, 200 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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 anti-spam), the admin…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

810 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