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: 3/26/2008 8:08:06 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 19 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
Shailen
Asp.Net User
Webparts connection with Sql server3/26/2008 8:08:06 AM

0/0

I have created web parts... and now i have applied user authentication to the site.
So the settings for a particular user should be saved in database...
but when i am trying to login i am getting following error...

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Here is the code for my web.config file...

Please see the connectionString settings.. i am little bit confused about it...

<?xml version="1.0"?>

<configuration>
 <configSections>
  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup,    System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
   <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions,     Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
   <section name="scriptResourceHandler"        type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions,       Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"       allowDefinition="MachineToApplication"/>
   <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup,    System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
     <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
     <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
     <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    </sectionGroup>
   </sectionGroup>
  </sectionGroup>
 </configSections>
 
  <connectionStrings>
    <clear/>
    <add name="LocalSqlServer" connectionString="data source=127.0.0.1;database=Database1;
    user id=sa ;password=sa"/>
  </connectionStrings>
 
 <system.web>
    <authentication mode="Forms"/>
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider"
          type="System.Web.Security.SqlMembershipProvider, System.Web,
          Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
          connectionStringName="LocalSqlServer"
          applicationName="/CustomConnections" />
      </providers>
    </membership>
   
  <webParts>
   <personalization>
    <authorization>
     <allow users="*" verbs="enterSharedScope"/>
    </authorization>
   </personalization>
  </webParts>

    <profile enabled="true" defaultProvider="TableProfileProvider">
      <providers>
        <clear/>
        <add name="TableProfileProvider"
         type="Microsoft.Samples.SqlTableProfileProvider"
         connectionStringName="LocalSqlServer"
         table="asdspnet_Profile"
          applicationName="/CustomConnections"/>
      </providers>
    </profile>
   
  <pages>
   <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
   </controls>
   <tagMapping>
    <add tagType="System.Web.UI.WebControls.WebParts.WebPartManager" mappedTagType="Sample.Web.UI.WebParts.WebPartManager, Sample.Web.UI.WebParts"/>
   </tagMapping>
  </pages>
  <!--
          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">
   <assemblies>
    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
  </compilation>
  <httpHandlers>
   <remove verb="*" path="*.asmx"/>
   <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
   <add verb="*" path="*.asmx" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
   <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
   <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
  </httpHandlers>
  <httpModules>
   <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </httpModules>
 </system.web>
 <system.web.extensions>
  <scripting>
   <webServices>
    <!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
    <!--
      <jsonSerialization maxJsonLength="500">
        <converters>
          <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
        </converters>
      </jsonSerialization>
      -->
    <!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
    <!--
        <authenticationService enabled="true" requireSSL = "true|false"/>
      -->
    <!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
           and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
           writeAccessProperties attributes. -->
    <!--
      <profileService enabled="true"
                      readAccessProperties="propertyname1,propertyname2"
                      writeAccessProperties="propertyname1,propertyname2" />
      -->
   </webServices>
   <!--
      <scriptResourceHandler enableCompression="true" enableCaching="true" />
      -->
  </scripting>
 </system.web.extensions>
 <system.webServer>
  <validation validateIntegratedModeConfiguration="false"/>
  <modules>
   <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </modules>
  <handlers>
   <remove name="WebServiceHandlerFactory-Integrated"/>
   <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
   <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
   <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </handlers>
 </system.webServer>
</configuration>

vinz
Asp.Net User
Re: Webparts connection with Sql server3/27/2008 12:12:58 AM

0/0

Check if you have ASPNETDB under your AppData Folder.. Basically webparts personalizations will be stored there.. If you have attached ASPNETDB  in your Database  then be sure that you have this in your webconfig file

<connectionStrings>
        <remove name="LocalSqlServer" />
        <add name="LocalSqlServer" connectionString="Data Source=<SERVER NAME>;Initial Catalog=ASPNET;Integrated Security=True;MultipleActiveResultSets=False;Packet Size=4096;Application Name=&quot;Microsoft SQL Server Management Studio Express&quot;" providerName="System.Data.SqlClient" />
       
</connectionStrings>


Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post fixed your problem.


2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro Sharepoint 2007 Development Techniques Authors: Margriet Bruggeman, Nikander Bruggeman, Pages: 484, Published: 2007
Access Cookbook: Solutions to Common User Interface & Programming Problems Authors: Ken Getz, Paul Litwin, Andy Baron, Microsoft Corporation, Pages: 810, Published: 2004
Special Edition Using Microsoft Office FrontPage 2003: Special Edition Authors: Jim Cheshire, Paul Colligan, Pages: 1080, Published: 2003
Special Edition Using Microsoft SharePoint Portal Server Authors: Jonathan Hassell, Robert Ferguson, Pages: 704, Published: 2002
Professional Web Parts and Custom Controls with ASP.NET 2.0 Authors: Peter Vogel, Pages: 449, Published: 2005
Beginning Sharepoint with Excel: From Novice to Professional Authors: Gini Courter, Annette Marquis, Pages: 253, Published: 2006
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Beginning Excel Services Authors: Liviu Asnash, Eran Megiddo, Craig Thomas, Pages: 404, Published: 2007
Beginning SharePoint Administration: Windows SharePoint Services and SharePoint Portal Server Authors: Göran Husman, Pages: 522, Published: 2006
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007

Web:
Help : SQL Server remote connection Error while running ... Help : SQL Server remote connection Error while running application with WebPart controls. Last post 06-16-2008 8:27 AM by Talib_dotnet. ...
Visual Studio .NET 2005 WebParts can't connect to SQL Server 2005 NET 2005 WebParts cant connect to SQL Server 2005 ... An error has occurred while establishing a connection to the server. ... connecting to SQL Server 2005 ...
What Are Web Parts? | O'Reilly Media Delete the Web Part Zone from the column and drag in a Catalog Zone. .... The connection string specifies a local Sql Server Express instance using a ...
Developing a reusable SQL Data viewer WebPart for Sharepoint -Part ... In Part III of the post, we will enhance this web part and add properties to the web part so that connection to SQL Server and the SQL statement can be ...
Connect Filter Web Parts to Excel Web Access - SharePoint Server ... Connect a SQL Server 2005 Analysis Services Filter Web Part to an Excel Web ... Save the connection information as an Office Data Connection (ODC) file ...
Visual Studio .NET 2005 WebParts can't connect to SQL Server 2005 NET 2005 WebParts cant connect to SQL Server 2005 ... An error has occurred while establishing a connection to the server. ... under the default settings ...
when I use webpart, I got sql connection error, what is wrong? - .NET when I create webpart, the code get from quickstart as follow: ... The connection string specifies a local Sql Server Express instance using a database ...
User Controls / Web Parts Web Parts Personalization and profile Jun 9, 2008 ... I am using ASP.net application with Web Parts Personalization and Profile ... The connection string specifies a local Sql Server Express ...
Office & SharePoint Pro - Web Part Connection - not filtering Filed under: customization, filtering, web part connection, ... NET, SQL Server and Windows Connections with over 250 in-depth sessions. ...
Enterprise .NET Community: Making SharePoint Web Parts Interact FIGURE 1—A high level view of the Web Parts connection model .... The rendering code of the Web Part runs a query against SQL Server, grabs personal ...




Search This Site:










created new page ... it's just blank

encrypting passwords in dnn

use doodads dal for dnn module development

web deployment project deploys files that have "build action" set to none

want to use int datatype instead of uniqueidentifier in aspnetdb databse

dnn 2.1.2 to dnn 3.0.12 upgrade survey

comments on site

correct install of vs 2005 standard

logging off a user on a different machine

userlogin and and microsoft.scalablehosting.security

css styles not rendering in ide

progmatically selecting a treeview treenode...

condition on the html for bilingual pages

folder exceptions in app_theme

popup menu on the treeview control

help! sql script can not run automatically when install a pa.

tab control runs on localhost, but not on server

user login and admin login table

to make textbox case sensitive in asp.net

3.1 permissions issue .. ??? critical

upgrading 3.1 to 4.0 and getting a version error

web part, masterpages and personalization

portal alias in dnn4.0.1

error: "cryptographic service provider (csp) could not be found for this algorithm" after clean install

problems with avcalendar - db help pls

wizard control onfinishbuttonclick

user defined table - borders

configuration moderators in forum modules?

should i go from webmatrix to vs

where is the class adsdataadapter implemented in the code?

 
All Times Are GMT