SQL Error on Development Examples

8 posts, 0 answers
  1. Paolo Broccardo
    Paolo Broccardo avatar
    7 posts
    Member since:
    Oct 2009

    Posted 08 Oct 2009 Link to this post

    Hi

    I am getting the following error when trying to access certain examples on the development server:

    "

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    "

    I suspect this is happening due to not installing the SQL database that came with Telerik?
    The reason for this is that I already have a SQL Express server running.

    How do I get the database for these examples into my instance of SQL Express??

    Thanks


  2. Paolo Broccardo
    Paolo Broccardo avatar
    7 posts
    Member since:
    Oct 2009

    Posted 09 Oct 2009 Link to this post

    Hi

    Can anyone help me with this please?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 12 Oct 2009 Link to this post

    Hi Paolo Broccardo,

    The only thing you need to do is to adjust the SQL instance name in the web.config of the demos.
    Currently it is set to Data Source=.\SQLEXPRESS; but if your instance name is different you need to put it here. The database will be auto-attached so you do not have to do anything else.

    Here is an example of one of the connection strings:

    <add name="TelerikConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Telerik.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />

    Let us know how it goes.

    Sincerely yours,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Kevin Eisentraut
    Kevin Eisentraut avatar
    1 posts
    Member since:
    Oct 2009

    Posted 19 Oct 2009 Link to this post

    I ran into this exact same issue.  I'm running VS2008 and SQL Server 2005.  I changed my instance name to my machine's name and now I'm getting the following error:

    A user instance was requested in the connection string but the server specified does not support this option.
    Changed database context to 'master'.
    Changed language setting to us_english.


    <connectionStrings> 
            <add name="NorthwindConnectionString" connectionString="Data Source=A13018\A13018;AttachDbFilename=|DataDirectory|Northwind.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> 
            <add name="TelerikConnectionString" connectionString="Data Source=A13018\A13018;AttachDbFilename=|DataDirectory|Telerik.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> 
            <add name="NorthwindConnectionString35" connectionString="Data Source=A13018\A13018;AttachDbFilename=|DataDirectory|Northwind.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> 
            <add name="TelerikConnectionString35" connectionString="Data Source=A13018\A13018;AttachDbFilename=|DataDirectory|Telerik.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> 
            <add name="NorthwindEntities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Northwind.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /> 
            <add name="TelerikEntities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Telerik.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /> 
            <add name="EditorFileBrowserDatabase" connectionString="Data Source=A13018\A13018;AttachDbFilename=|DataDirectory|EditorDBStorage.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>  
    </connectionStrings> 
  6. Paul
    Paul avatar
    5 posts
    Member since:
    Mar 2011

    Posted 28 Mar 2011 Link to this post

    I'm getting the same error with the RadControls for ASP.NET AJAX Q3 2010 Live Examples.

    I updated all 7 instances of .\SQLEXPRESS to my SQL server's FQDN of DEV-APP-02 for all three web.config files in the application root and rsetarted the .NET dev server. I am now receiving the following error for all example pages requiring a valid DB connection.

    Any assistance is much appreciated.

    NB: I'm trying to connect to an instance of SQL 2005 on another server. Is the AttachDbFilename method even supported?

    [ArgumentException: Invalid value for key 'attachdbfilename'.]
       System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +812636
       System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +2207
       System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24
       System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +200
       System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +62
       System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4
       System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +29
       System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +89
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
       Telerik.Web.UI.GridTableView.PerformSelect() +16
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
       Telerik.Web.UI.GridTableView.DataBind() +221
       Telerik.Web.UI.RadGrid.DataBind() +80
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
       System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
       System.Web.UI.Control.EnsureChildControls() +87
       Telerik.Web.UI.GridBaseDataList.get_Controls() +15
       Telerik.Web.UI.RadAjaxControl.PopulatePlainPanels(Control parent, List`1 list, Control root) +63
       Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e) +1316
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Control.OnPreRender(EventArgs e) +8686294
       System.Web.UI.Adapters.ControlAdapter.OnPreRender(EventArgs e) +15
       System.Web.UI.Control.PreRenderRecursiveInternal() +8686221
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


  7. Paul
    Paul avatar
    5 posts
    Member since:
    Mar 2011

    Posted 28 Mar 2011 Link to this post

    Resolved:

    1. Copy MDFs to remote SQL server - ..\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
    2. Open Management Studio, click the Databases header in the tree view and sleect Attach.
    3. Select each MDF file and make sure you change the path for each to just the db name - e.g. Northwind, Telerik
    4. Give appropriate user permissions for each db.
    5. Mody the connection string(s) in the web.config to use a standard connection string.

      connectionString="Data Source=MySQLserver;Initial Catalog=Northwind;Integrated Security=True"

    Hope this helsp someone else!

  8. Ziji
    Ziji avatar
    4 posts
    Member since:
    May 2011

    Posted 17 Sep 2011 Link to this post

    I use only SQL SQLExpress 2008 and no SQL Server or SQL Server Dev installed on my Windows 7 laptop.
    The account running SQLExpress on my laptop is Network Service.
    I had trouble running AJAX Demo as I kept getting above errors for months. I tried many tricks posted here but no luck.
    Finally, I tried to grant Full Conctrol to Network Service on 'C:\PROGRAM FILES\TELERIK\RADCONTROLS FOR ASP.NET AJAX Q1 2011\LIVE DEMOS' folder (NOT the App_Data under it !!!) and the Demo works without any database connection error.
    The important thing is the folder needs the Full Conctrol permission is LIVE DEMOS, NOT App_Data under it !!!
  9. Vikas
    Vikas avatar
    1 posts
    Member since:
    Mar 2014

    Posted 14 May 2014 Link to this post

    just uninstall  Vs and reinstall it.. pl z do that .don't try another method to solve it .it's times consuming. 
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017