locked
Failed to genetate a user instance of SQL Server RRS feed

  • Question

  • User-658201581 posted

    Hello, I have a little project that is runing successfully and retrive everything successfully. But it's not running after publish to the localhost. Please check this screenshot: 

    Another projects (simple and without database) are running on localshot but this project not running. How can I fix it?

    My connectionString is (web.config): 

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

    best regards

    ehsan

    Thursday, June 27, 2013 4:15 AM

Answers

  • User-166373564 posted

    Hi,

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

    In IIS, select the application pool and then "advanced settings." Under "process model" find "Load User Profile" and set it to true.

    SQL should now load under the default app pool account.

    At the same time you can also refer the discussion about this issue, and learn the analysis of this problem, I think this will be helpful for you to understand this issue better,

    # System.Data.SqlClient.SqlException

    # Failed to generate a user instance of SQL Server

    Regards

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 2, 2013 3:00 AM

All replies

  • User1815411410 posted

    hi there,

    please advise the SQL Database that you use and please advise the connection string here.

    Thank you. 

    Thursday, June 27, 2013 4:42 AM
  • User-658201581 posted

    hi there,

    please advise the SQL Database that you use and please advise the connection string here.

    Thank you. 

    oh sorry, I forgot to mention connection string. Please check my main post again. I just edited.

    Thursday, June 27, 2013 5:38 AM
  • User-166373564 posted

    Hi,

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

    In IIS, select the application pool and then "advanced settings." Under "process model" find "Load User Profile" and set it to true.

    SQL should now load under the default app pool account.

    At the same time you can also refer the discussion about this issue, and learn the analysis of this problem, I think this will be helpful for you to understand this issue better,

    # System.Data.SqlClient.SqlException

    # Failed to generate a user instance of SQL Server

    Regards

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 2, 2013 3:00 AM