<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx</link><description>This is the second post in a two-post mini-series on using LocalDB with Full IIS. Don't miss the first post . 
 Quick Recap 
 In the first post of this mini-series we said there are two properties of LocalDB causing problems when running under full</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10375204</link><pubDate>Thu, 06 Dec 2012 11:13:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10375204</guid><dc:creator>Pierre-Henri Barralis</dc:creator><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;I am using shared instance (solution 2) localDB, and everything is working except, I can&amp;#39;t start the instance if I&amp;#39;m not logged with the owner of the instance. What is the purpose of sharedInstance if we can&amp;#39;t use it with multiple user account ? Is there a solution to this problem ? &lt;/p&gt;
&lt;p&gt;When I start the instance from the owner, then I switch to an other user, it works &amp;nbsp;.... &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please help me !&lt;/p&gt;
&lt;p&gt;Thanks &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10375204" width="1" height="1"&gt;</description></item><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10370360</link><pubDate>Tue, 20 Nov 2012 21:24:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10370360</guid><dc:creator>Ward Beattie [MSFT]</dc:creator><description>&lt;p&gt;Dave Sexton: could you provide the error.log from \users\MyName\appdata\local\microsoft\microsoft sql server local db\instances\v11.0? If it is easier, you can send email.&lt;/p&gt;
&lt;p&gt;Gregory: this can be made to work, however, you cannot use Windows Authentication for your site. You must also ensure (via app pool options) that the user profile for your app pool identity is loaded.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10370360" width="1" height="1"&gt;</description></item><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10369716</link><pubDate>Sun, 18 Nov 2012 23:42:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10369716</guid><dc:creator>Gregory</dc:creator><description>&lt;p&gt;Do you think it would be possible to create new instance of LocalDB as ApplicationPoolIdentity&lt;/p&gt;
&lt;p&gt;or change existing localDB instance owner? I wish to host localDB on my server without&lt;/p&gt;
&lt;p&gt;the need to connect to it with visual studio.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10369716" width="1" height="1"&gt;</description></item><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10353019</link><pubDate>Tue, 25 Sep 2012 13:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10353019</guid><dc:creator>Dave Sexton</dc:creator><description>&lt;p&gt;Thanks for this post, but I&amp;#39;m still getting the same login failure with the first option. &amp;nbsp;I&amp;#39;m logged in as myself to Windows 8. &amp;nbsp;I&amp;#39;ve set my site&amp;#39;s AppPool Identity in IIS to my account. &amp;nbsp;SQL Server Object Explorer in Visual Studio 2012 shows my table in (localdb)\v11.0. &amp;nbsp;When I run in debug mode on the VS Dev Server my app connects to the DB successfully and it displays the data. &amp;nbsp;I published the site to my local IIS. &amp;nbsp;I&amp;#39;ve even enabled Windows authentication in web.config and verified that WindowsPrincipal.Current.Identity returns my account name (I printed it to the home page). &amp;nbsp;But I&amp;#39;m getting this exception when running in IIS:&lt;/p&gt;
&lt;p&gt;Message: The underlying provider failed on Open.&lt;/p&gt;
&lt;p&gt;StackTrace: &amp;nbsp; &amp;nbsp;at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;[snip]&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;InnerException: System.Data.SqlClient.SqlException&lt;/p&gt;
&lt;p&gt;Message: Cannot open database &amp;quot;MyDBName&amp;quot; requested by the login. The login failed.&lt;/p&gt;
&lt;p&gt;Login failed for user &amp;#39;MyComp\MyName&amp;#39;.&lt;/p&gt;
&lt;p&gt;Any ideas? &amp;nbsp;Thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10353019" width="1" height="1"&gt;</description></item><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10313569</link><pubDate>Fri, 01 Jun 2012 16:29:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10313569</guid><dc:creator>Ward Beattie [MSFT]</dc:creator><description>&lt;p&gt;Hi Giant Cookie&lt;/p&gt;
&lt;p&gt;If you are referring to the fact that this gives full administrative access to the App Pool identity, then we would agree that this is definitely not the right thing to do in a production environment. However, this post was aimed at the developer who needs to use SQL Server on a development machine with full IIS. Security is a very large subject, and attempting to address it in this context would have made the post much more complex and perhaps less helpful.&lt;/p&gt;
&lt;p&gt;Ward.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10313569" width="1" height="1"&gt;</description></item><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10313197</link><pubDate>Fri, 01 Jun 2012 08:28:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10313197</guid><dc:creator>Giant Cookie</dc:creator><description>&lt;p&gt;you really think it is a smart idea to do&lt;/p&gt;
&lt;p&gt;exec sp_addsrvrolemember N&amp;#39;IIS APPPOOL\ASP.NET v4.0&amp;#39;, sysadmin &lt;/p&gt;
&lt;p&gt;?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10313197" width="1" height="1"&gt;</description></item><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10299708</link><pubDate>Tue, 01 May 2012 23:00:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10299708</guid><dc:creator>Pleasant Holiday</dc:creator><description>&lt;p&gt;Hello and thank you for this post!!!&lt;/p&gt;
&lt;p&gt;I am trying to use Approach 2 (Use LocalDB Shared Instance) with one twist -- my application running on my local IIS box needs to run under a network domain account. &amp;nbsp;(This duplicates the way our servers are set up, which is done so that various network actions are allowed.)&lt;/p&gt;
&lt;p&gt;I finally go this approach to work by realizing that the instance name I need to use is not actually &amp;quot;v11.0&amp;quot;. &amp;nbsp;I am still new to SSDT and LocalDB, and I am not sure why or how my SSDT database project was deployed to a an instanced named (more or less) for my database project. &amp;nbsp;Once I shared that out *and* set that domain account as the server administrator, then I was able to connect.&lt;/p&gt;
&lt;p&gt;Your excellent open source tool at codeplex (localdbcompanion) was very interesting to look through, but I am puzzling through how that tool can be used if the instance name is not in fact always &amp;quot;v11.0&amp;quot;. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any thoughts you have on any of this would be great. &lt;/p&gt;
&lt;p&gt;Thanks, and thanks again for this post. &amp;nbsp;I didn&amp;#39;t have a clue how to integrate a database project into my legacy web applications until I finally found this post. &amp;nbsp;Am I correct to wonder if I&amp;#39;d come out farther ahead if I just took the time to convert them from full IIS &amp;quot;web site projects&amp;quot; into web application projects (using the built-in IIS of Visual Studio)?&lt;/p&gt;
&lt;p&gt;Pleasant Holiday&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10299708" width="1" height="1"&gt;</description></item><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10285728</link><pubDate>Wed, 21 Mar 2012 01:52:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10285728</guid><dc:creator>Ward Beattie [MSFT]</dc:creator><description>&lt;p&gt;Correction: in my earlier post, I said that the timeout value was in seconds. It is actually in minutes (for values other than 65535, which still means &amp;quot;infinite&amp;quot;). Sorry for any confusion.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10285728" width="1" height="1"&gt;</description></item><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10285532</link><pubDate>Tue, 20 Mar 2012 17:22:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10285532</guid><dc:creator>Ward Beattie [MSFT]</dc:creator><description>&lt;p&gt;By default, a LocalDB instance will terminate after 5 minutes with no connections. This can be changed, as follows:&lt;/p&gt;
&lt;p&gt;1. Connect to the instance as sysadmin.&lt;/p&gt;
&lt;p&gt;2. Run the following batch to show advanced options:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;exec sp_configure &amp;#39;show advanced options&amp;#39;,1&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;reconfigure&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;exec sp_configure&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;go&lt;/p&gt;
&lt;p&gt;3 Run the following batch to change the timeout to 65535. This value is in seconds, but 65535 is the magic number meaning infinite:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;exec sp_configure &amp;#39;user instance timeout&amp;#39;,65535&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;reconfigure&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;exec sp_configure &amp;#39;user instance timeout&amp;#39;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;go&lt;/p&gt;
&lt;p&gt;Once this is done, you will need to shut down the instance using SqlLocalDB.exe, or by connecting and using the T-SQL shutdown command. The instance will also shut down if the user that started it (and owns it) logs off.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10285532" width="1" height="1"&gt;</description></item><item><title>re: Using LocalDB with Full IIS, Part 2: Instance Ownership</title><link>http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx#10285279</link><pubDate>Tue, 20 Mar 2012 06:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10285279</guid><dc:creator>Josh</dc:creator><description>&lt;p&gt;Thank you very much for these posts. This has helped me get my site working.&lt;/p&gt;
&lt;p&gt;I am having an issue with the localdb instance not starting automatically.&lt;/p&gt;
&lt;p&gt;I have a WCF Data Service connected to a localdb shared instanced. Things all work fine when the localdb instance is running. After some time of inactivity, the localdb instance stops automatically. When the next request comes in through the data service, it does not ever start the localdb instance. &lt;/p&gt;
&lt;p&gt;Any help on this would be greatly appreciated. Thanks!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10285279" width="1" height="1"&gt;</description></item></channel></rss>