Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

Problems with default instance of SQL 2008 Express (w/ Tools)

Posted: Jan/22/2011   By: nikhil   Points:15   Category: .NET  - ASP.Net    Views:185   Vote Up (0)   Vote Down (0)    

I'm trying to get a default instance created with Express and realized that the Express install creates a 'default' named instance of SQLEXPRESS.  I really don't want to have anything at all, I want to connect just to the server. So upon research, I found that if you put in 'MSSQLSERVER' as a named instance, it will create a default instance.


I was thinking everything was going great, but I can't connect to the instance with the just the computer name.  It will let me connect with (local), '.' and localhost.  Is there any way to get Express to work with a default instance?

View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

problems with ajax.actionlink

  

hi,

  i have this razor page...

            <div id="grid">  
                @{var gridQuest = new WebGrid(source: Model.Domande, defaultSort: "IdRisorsa", rowsPerPage: 10);}   
                @(gridQuest.GetHtml(tableStyle: "grid", headerStyle: "head", alternatingRowStyle: "alt",
                    columns: gridQuest.Columns(
                        gridQuest.Column("Domanda.Testo""Testo"),
                        gridQuest.Column("Domanda.RispostaRandom""Random"),
                        gridQuest.Column("Domanda.Punteggio""Punteggio"),
                        gridQuest.Column("Domanda.SommarioRisposte""Risposte"),
                        gridQuest.Column(format: (item) => Html.ActionLink("Cancella""Delete""Domande"new { domanda = item.DomandaNo, questionario = Model.CorsoRisorsaNo }, null)),
                        gridQuest.Column(format: (item) => Ajax.ActionLink("Modifica""EditDomanda"new { id = item.DomandaNo }, new AjaxOptions { UpdateTargetId = "domandaModifica" }))))
                  )
            </div>
        </td>
        <td>
        <div id="domandaModifica"></div>
        </td>

and in the template i have
    <script src=
                         

Problems Passing ViewModel with data from View to Controller

  

Ok, here is my problem.  I am trying to pass a view model of mine, which has multiple list in it, to my view.  Then in my view i need to edit the different list.  Then on my post i need to save the edits.  Although, when i pass my viewmodel back to my post, it is empty! Can somebody explain what i am doing wrong?

Controller

       

public ActionResult ManageNewsArticles()
        {
            NewsViewModel newsViewModel = new NewsViewModel();

            newsViewModel.ListBreakingNews = db.NewsArticles.Where(n => n.PageSetupID == 1).ToList<NewsArticle>();
            newsViewModel.ListMainArticle = db.NewsArticles.Where(n => n.PageSetupID == 2).ToList<NewsArticle>();
            newsViewModel.ListSubNews1 = db.NewsArticles.Where(n => n.PageSetupID == 3).ToList<NewsArticle>();
            newsViewModel.ListSubNews2 = db.NewsArticles.Where(n => n.PageSetupID == 4).ToList<NewsArticle>();
            newsViewModel.ListSubNews3 = db.NewsArticles.Where(n => n.PageSetupID == 5).ToList<NewsArticle>();

            return View(newsViewModel);
        }

        [HttpPost]
        public ActionResult ManageNewsArticles(NewsViewModel newsViewModel)
        {
            if (ModelState.IsValid)
            {
                db.SaveChanges();
                return RedirectToAction("Admin");
            }
            
            return View(newsViewModel);
        }



here is my View

   
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TrueNews.ViewModels.NewsViewModel>" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
        Manage News Articles
    </asp:Content>
    
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
        <h2>Manage News Articles</h2>
    
        <% Html.EnableClientValidation(); %>
    
        <% using (Html.BeginForm(Model)) {%>
            <%: Html.ValidationSummary(true) %>
            
            <fieldset>
                <%: Html.EditorForModel(Model) %>
                <p>
                    <input type="submit" value="Save" />
                </p>
            </fieldset>
    
        <% } %>
        
        <div>
            <%: Html.ActionLink("Back to Admin Controls", "Admin") %>
        </div>
    </asp:Content>



NewsViewModel

   
public class NewsViewModel
        {
            public List<NewsArticle> ListBreakingNews { get; set; }
            public List<NewsArticle> ListMainArticle { get; set; }
            public List<NewsArticle> ListSubNews1 { get; set; }
            public List<NewsArticle> ListSubNews2 { get; set; }
            public List<NewsArticle> ListSubNews3 { get; set; }
        } // End of Class



Default content across nested layout

  

Hey all-

 have a base layout, BaseLayout.cshtml:

<html>
<body>
    @RenderBody()
   
<div id="footer">

Failed to generate a user instance of SQL Server

  

 I am creating asp.net forms authentication. When I run web site and there I try to create new user I get this error:

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

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.


Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +4861315
   System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +29
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +4863644
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
   System.Data.SqlClient.SqlConnection.Open() +122
   System.Web.Manage 

Can I change the default "ASP.NET Web Application" that appears every time I create a new project?

  

I'm using VS2010 and I'm trying to follow along with these videos: http://www.asp.net/general/videos and the guy in the video is using Visual Web Developer Express and when he creates a new website it's all nice and simple with a bare bones Default webpage and that's cool. Well, me in my Visual Studio 2010 when I create a new project I get this elaborate "My ASP.NET Application" page with an About page and a Login page and CSS and Jquery and it's just too, too much. Now, of course I could just create an empty ASP.NET application, but that goes too far the other way; I have to start from scratch and add the default page myself and try to reproduce exactly what the code in the video looks like and I can't really see the screen that well. Is there any way I could change my default template to what the gentleman in the video uses?


Visual Studio 2008 and Visual Web Developer 2010 Express launch ribbon menu item

  

My existing system has Visual Studio 2008 and Visual Web Developer 2010 Express. But Microsoft web installer for Webmatrix has made Wematrix Launch ribbon menu pointing to Visual Studio 2008. How could I make Webmatrix point to Visual Web Express 2010. To make use of IntelliSense and the debugger, I have to manually launch Visual Web Developer 2010 Express.

Any help to resolve this would be helpful Or is this a known issue at this time!




Problems moving Drupal from WebMatrix to hosting

  

I got the first beta of WebMatrix, downloaded Drupal, and got a site more or less going.  I then tried to move it to two different hosts - first the IIS server running on my own domain controller, then to my hosting service.  I dumped the DB with mysqldump, and imported it to the databases running on each server. Then I ftp'd the code and configuration files to both servers, and made appropriate configuration changes (primarily the mysql connect string).

On both servers I have the same problem: The site comes up in its home page and looks great, but as soon as I log in as the site admin, I get a 404 (not found) error.  Since it looks like virtually everything in Drupal is driven from the database, I really haven't the faintest idea where to start debugging this.

Can anyone give me any hints?


Problems with Null values and Radiobuttonlist

  

Hi guys,

 I've been trawling various forums and racking my brain over this one for the last couple of days. I have a problem with a databound radiobuttonlist inside a formview, as when a new record is created the value for the field bound to to radiobuttonlist is null which causes an error because the value is ot in the list of items. I could add an extra item to handle this, but I can't think of a way to make it invisible so it looks silly, and I could add a default value to the DB field, but I want to make sure the selection has actually been made by the user. The only way around it I can think of at the moment is to create a server control based on the original, or remove the databinding and do it manually.

Any help would be most appreciated.

 As an aside, I've seen this type of question a number of times but haven't found a satisfactory answer and a couple of days ago I came upon an ASP site with radio buttons where the first item in the list was something like "Please select an option from below" and was pre-selected. I though that looked a little silly too.


How to choose default DataTable from DataSet for binding with a DataGrid using ObjectDataSource?

  

Hello,

I have a DataSet with multiple DataTables and I use an ObjectDataDataSource to bind my DataGrid to it. One of my tables is correctly displayed in the grid. My problem is, that the grid displays the wrong table.

My tables are related to each other - I make use of the "relation" objects in VS Studio 2010. My ObjectDataSource points to a class with a select method. The DataSet contains several DataTables (e.g. "Variables" and "Components").


public class clsWorkflow
{
[DataObjectMethod(DataObjectMethodType.Select)]
public DataSet getSubscribedVariables()
{
try
{
return BLL.VariableCollection; //returns the DataSet
}
catch (Exception ex)
{
throw new Exception("clsWorkflow.getSubscribedVariables", ex);
}
}
}


How can I configure the DataSet to display the table "Variables" by default?


problems with selectNodes

  

Hi,

I am using someone elses webservice which requires a xmlnode as input so ive mimicked what it requires and passed it in - effectively...

FuncCall(XmlNode xData)

Now I have breaked it at a statement like this:

XmlNodeList xBys = xData.SelectNodes("/by");

When it is called by the program it was intended for this is the content of xData:

    <budget_in>Currency</budget_in>
    <curr_id>1</curr_id>
    <header_row>5</header_row>
    <report_date>2010-12-13T00:00:00</report_date>
    <dimensions>
      <dim_1>RESOURCES</dim_1>
    </dimensions>
    <by>
      <by_id_1 cell="A6" id="62"><![CDATA[Stephen Hill]]></by_id_1>
      <periods>
        <period start="2007-08-01T00:00:00" cell="B6">
          <value>382.5</value>
        </period>
        <period start="2007-09-01T00:00:00" cell="C6">
          <value>67.5</value>
        </period>
        <period start="2007-10-01T00:00:00" cell="D6">
          <value>517.5</value>
        </period>
      </periods>
    </by>


As you can see the 'by' is an immediate child and so is caught in the selectNodes. However I pass this in:

<budget_in>Days</budget_in>
<curr_id>1</curr_id>
<report_date>13/12/201009:53:14</report_date>
<dimensions>
 <dim_1>Activity</dim_1>
 <dim_2>Department</dim_2>
 <dim_3>Charge Rate</dim_3>
</dimensions>
<by>
 <periods>
  <period start="01/01/2011 00:00:00"><value>2.5</value></period>
  <period start="01/02/2011 00:00:00"><value>7.4</value></period>
  <period start="01/01/2010 00:00:00"><value>5.5</value></period>
  <period start="01/02/2010 00:00:00"><value>1.4</value></period>
 </periods>
 <by_id_1 id="10" />
 <by_id_2 id="10" />
 <by_id_3 id="22" />
</by>
<hours_in_day>7.5</hours_in_day>

Which xml wise is the same I thought but the selectNodes("/by") has a count of zero? And I cant figure out why? Any ideas?

if I do "//by" they both obviously work

If I look at the childNode count for mine it is 6 which means that the <by> is a immediate child node. I cant change the webservice to "//by" unfortunately

Would appreciate some suggestions on this connudrum

Thanks

Kal

 


 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge