+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Where is my database?

Where is my database?

7 posts, 0 answered
  1. Marz
    Marz avatar
    7 posts
    Registered:
    29 Aug 2012
    26 Oct 2012
    Link to this post
    I have installed Sitefinity on my localhost, and have set things up with IIS. The site is located on my inetpub > wwwroot.  

    I keep running into issues that require access to the database.  For example, I want to create a new page and force my News to display the full news in this new page.  Now I need my News page's MasterPageID, so I want to execute this query to get that ID:

    SELECT [id]
    FROM [dbo].[sf_page_node]
    WHERE [title_] = 'page1'

    But where is my database? How do I open my database for doing something like this or checking a table value?

    Thanks,
    Faramarz 
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    26 Oct 2012
    Link to this post
    You should NEVER screw around with the DB directly, use the API to get that stuff...it's not always as straight forward you'd think (multiple modes for content, etc)

    AAANYWAY...you can get the connection string like this

    using Telerik.Sitefinity.Configuration;
    using Telerik.Sitefinity.Data.Configuration;

    .....

    Config.Get<DataConfig>().ConnectionStrings["Sitefinity"].ConnectionString


  3. kaushal
    kaushal avatar
    3 posts
    Registered:
    20 Apr 2011
    27 Oct 2012
    Link to this post
    I am new in sitefinity cms5.2 . and I am getting an error in web.config
    Could not load file or assembly 'Microsoft.Http, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
  4. Marz
    Marz avatar
    7 posts
    Registered:
    29 Aug 2012
    31 Oct 2012 in reply to Steve
    Link to this post
    Steve,

    Thanks for your reply.  I can't agree more.  I'm not a big fan of messing with DB especially in .Net environment.  How do you get the 'MasterPageID' of a page via API?

    Thanks,
    Marz
  5. kaushal
    kaushal avatar
    3 posts
    Registered:
    20 Apr 2011
    24 Jan 2014 in reply to Steve
    Link to this post
    Dear Steve,



    Hi Steve,
    I am developing a website in SF3.7 and unable to connect database for login and registration purpose.
    Kindly assist me how to and where perform coding like asp.net coding,css , jscriptand also unable to crate  custom news module (using thumbnail) .
    Is there any sitefinity project manager required ?
    You can see 
    http://cricketauthority.com/demo_news

    in this page I am unable to use thumbnail css  and javascript.Request you please help me ASAP .

    if possible can you meet me on skype krathore5
  6. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    24 Jan 2014 in reply to kaushal
    Link to this post
    Hey Kaushal,
      You should know, I'm not telerik support :)

    For Sitefinity 3.7 theres no project manager, thats just a 4.0+ thing.  Sitefinity 3.7 functions like a regular website project, there shouldn't be anything really different.  However that link you posted is to a sitefinity 6.2 page, not 3.7.

    There's no rules to where to put your scripts\styles.  Although if you put styles in the themes global folder you'll get a nice cache buster appended automatically...but other than that like <script src='/folder/file.js'></script> would just work fine.

    I recommend you contact telerik support through a ticket

    Steve
  7. kaushal
    kaushal avatar
    3 posts
    Registered:
    20 Apr 2011
    25 Jan 2014 in reply to Steve
    Link to this post
    Hi Steve,
    Thanks a ton.
7 posts, 0 answered