CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: NewsGroup Date Entered: 7/3/2007 7:41:40 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 33 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
Andy T
Asp.Net User
Web part and sql configuration7/3/2007 7:41:40 PM

0/0

I want to try out a simple web part site.

I create a project with the required webpartmanager and a few web parts. I also configured my SQL Server 2005  based on the following article:

http://www.aquesthosting.com/HowTo/Sql2005/Providers.aspx

When I run my app, I get the following error:

 

Server Error in '/AspCustomization' Application.

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

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.

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:

  1. If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist.
  2. If the applications App_Data directory already exists, the web server account only requires read and write access to the applications App_Data directory. This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the applications App_Data directory. Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists. This will cause an error when the provider attempts to create a duplicate of an already existing database. Write access is required because the web server accounts credentials are used when creating the new database.
  3. Sql Server Express must be installed on the machine.
  4. The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts.

 Here is my config file:

 

<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
	<appSettings/>
  <connectionStrings>
    <remove name="AvtConnectionString"/>
    <add name="AvtConnectionString"
         connectionString="server=localhost\sql05;database=AVT_ASP20;integrated security=sspi;"/>
  </connectionStrings>
  <system.web>
    <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
    <compilation debug="true"/>
    <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
    <authentication mode="Windows"/>
    <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <membership>
      <providers>
        <remove name="AspNetSqlMembershipProvider" />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider,
           System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
          connectionStringName="AvtConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true"
          applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
          minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
      </providers>
    </membership>

    <profile>
      <providers>
        <remove name="AspNetSqlProfileProvider" />
        <add name="AspNetSqlProfileProvider" connectionStringName="AvtConnectionString"
           applicationName="/" type="System.Web.Profile.SqlProfileProvider,System.Web, Version=2.0.0.0, Culture=neutral,                   
             PublicKeyToken=b03f5f7f11d50a3a" />
      </providers>
    </profile>
    <roleManager>
      <providers>
        <remove name="AspNetSqlRoleProvider" />
        <add name="AspNetSqlRoleProvider" connectionStringName="AvtConnectionString" applicationName="/"
           type="System.Web.Security.SqlRoleProvider,System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
      </providers>
    </roleManager>
  </system.web>
  

  
</configuration>

  How do I get it to work?

Thanks !
 

Nai-Dong Jin -
Asp.Net User
Re: Web part and sql configuration7/5/2007 4:41:56 AM

0/0

Hi,

First, from the error message it indicated that the SQL Server doesn't allow remote connections. In the SQL Management Studio, RightClick the SQL server instance, Choose Properties, and under Select a Page list, click Connections. Now you should see a checkbox labelled "Allow Remote Connections to This Server". Make sure it is checked. More information,see: http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

Second, in your connection, you are using Integrated Security, before using this kind of authentication, be sure that the current role has the permission to visit SQL Server database. Also, you can use SQL Server authentication in your connection string instead of windows authenticaton.

Thanks.


Sincerely,
Michael Jin.
Microsoft Online Community Support

?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?
leedale
Asp.Net User
Re: Web part and sql configuration1/7/2008 9:57:26 AM

0/0

HI there,

For WebPart personaliztion to use a custom sql database you need to specify the following config section

<webParts>
            <personalization defaultProvider="SqlPersonalizationProvider">
                <providers>
                    <add name="SqlPersonalizationProvider"
                            type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider"
                            connectionStringName="LeeWebPartTest"
                            applicationName="/" />               
                </providers>             
            </personalization>         
</webParts>
 


MCAD .Net
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Pro SQL Server 2005: Thomas ... [et Al.]. Authors: Thomas Rizzo, Adam Machanic, Robin Dewson, Louis Davidson, Julian Skinner, Jan D. Narkiewicz, Joseph Sack, Rob Walters, Pages: 674, Published: 2005
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Microsoft SharePoint 2003 Unleashed Authors: Lynn Langfeld, Colin Spence, Mike Noel, Michael Noel, Pages: 800, Published: 2004
MCTS: Microsoft Office SharePoint Server 2007 Configuration: Exam 70-630 Authors: James Pyles, Pages: 617, Published: 2008
Creating Client Extranets with Sharepoint 2003 Authors: Mark E. Gerow, Pages: 216, Published: 2006
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Microsoft Sharepoint: Building Office 2007 Solutions in VB 2005 Authors: Scot P. Hillier, Pages: 552, Published: 2007

Web:
Web part and sql configuration - ASP.NET Forums Web part and sql configuration. Last post 01-07-2008 4:57 AM by leedale. 2 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
Pete Orologas : Web Part Error - (SQL Network Interfaces, error ... To enable browser, First, Use net start or go to sql configuration manager(SSCM) , .... Following is part of web.config and web part page (default2.aspx) ...
SQL Configuration - SharePoint Reminder Manual Web Part Errors ... SharePoint Reminder Service - SQL Configuration. If you are using a separate Microsoft SQL Server to hold your configuration and content ...
Using Reporting Services SharePoint Web Parts in SQL Server 2000 ... Apr 25, 2005 ... SharePoint allows Web Part designers to restrict configuration ... the SP2 Web Parts to a pre-SP2 report server, or a SQL Server 2005 report ...
SQL Report Viewer Web Part and SSRS Configuration : Micorsoft, SQL ... I have a Report Server that contains a number of default CRM reports and the Report server was configured in native mode, NOT sharepoint integrated mode.
Developing a reusable SQL Data viewer Web Part for Sharepoint ... The next step is to register this assembly as safe in the web.config of the sharepoint ... This concludes part 1 of the reusable SQL data viewer Web Part. ...
SQL 2005 SP2 Reporting Service web part on WSS 3.0 - Prologika Forums I follow the RS Configuration tool and create new reportserver database ... Then I drop the RS web part again, and it asks me to "You must ...
The Ross Report: A Quick ASP.NET Web Parts Tutorial Using SQL ... NET Web Parts Tutorial Using SQL Server 2008. ... All of this configuration metadata would be placed in the web.config and, ultimately, added to the data in ...
Re: TDP for SQL configuration error... Subject: Re: TDP for SQL configuration error... From: Rainer Holzinger < rainer_holzinger AT WEB DOT DE>. To: ADSM-L AT VM.MARIST DOT EDU ...
SQL Configuration Manager what?! « Now here’s the worst part as I have discovered just recently when trying to connect ... that my SQL server installation didn’t have configuration manager. ...

Videos:
WAMP Installation & Configuration Part 1 of 2 Setup & run a windows server in less than 8 minutes! Install a Windows Server with the following: Apache, PHP, MySQL, Xmail, phpMyAdmin, and more wit...
SQL - Learning SQL Server 2000 System Administration Level 3 The SQL - Learning SQL Server 2000 System Administration Level 3 is part of KeyStone Learning Systems library of more than 1,200 CD-ROM and video-bas...
SQL - Learning SQL Server 2000 System Administration Level 3 The SQL - Learning SQL Server 2000 System Administration Level 3 is part of KeyStone Learning Systems library of more than 1,200 CD-ROM and video-bas...
SQL - Learning SQL Server 2000 System Administration Level 3 The SQL - Learning SQL Server 2000 System Administration Level 3 is part of KeyStone Learning Systems library of more than 1,200 CD-ROM and video-bas...
How to make a wow 2.3.3 server A easy guide on how to make a 2.3.3 server Links 1)For a Funserver doawnload the repack on this web http://www.megaupload.com/?d=ASYYVVXS -custom it...
SQL - Learning SQL Server 2000 System Administration Level 3 The SQL - Learning SQL Server 2000 System Administration Level 3 is part of KeyStone Learning Systems library of more than 1,200 CD-ROM and video-bas...
SQL - Learning SQL Server 2000 System Administration Level 3 The SQL - Learning SQL Server 2000 System Administration Level 3 is part of KeyStone Learning Systems library of more than 1,200 CD-ROM and video-bas...
WAMP Installation & Configuration Part 2 of 2 Setup & run a windows server in less than 8 minutes! Install a Windows Server with the following: Apache, PHP, MySQL, Xmail, phpMyAdmin, and more wit...
SQL - Learning SQL Server 2000 System Administration Level 3 The SQL - Learning SQL Server 2000 System Administration Level 3 is part of KeyStone Learning Systems library of more than 1,200 CD-ROM and video-bas...
SQL - Learning SQL Server 2000 System Administration Level 3 The SQL - Learning SQL Server 2000 System Administration Level 3 is part of KeyStone Learning Systems library of more than 1,200 CD-ROM and video-bas...




Search This Site:










datetime formatted to clients regional settings???

showing a diffrent menu depending on language ...

how to implement sftp

if else statement trouble...

primary key violation error

pagesize in datagrid

related to server problem (other post)

precompiling web application projects

problems with view state and different forms

dnn - windows authentication - diff internal domain name than external

sending email in beta2

invoking tostring in c#

when using replace only replace the string if another string replacement takes place

"events" button on "properties" window showing randomly

dnn site resource directory

create assemblies in .net2005

set web.config[location], global.asax.cs [begin_request->check auth], still can access files in sub-dirs

remove items from a select / drop down list in vb

createchildcontrols not being called in postback?

creating a simple form not using a details view

a portal site with different layouts?

convert binary data to ascii

change the time zone on "lastactivitydate" column in aspnet_users table

calendar day selection

module deployed on page twice, but page_load method getting called 8 times

advice on where to find great dotnetnuke hosting! - evaluation urls or magazines

please take a look at this

coding an asp message board

define container per module

received error on subsequent edit to text/html module

 
All Times Are GMT