Cryptic Error Time: Favorite Part of Your Day
-
I'm using SQLLocalDB (MS SQL Express) for a test database. Had to rebuild services and db on new VM Server. All good, but then I got this error when my ASP.NET MVC Application attempted to connect.
returned to my web app...
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: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start. )
But, that is a lie. The instance is actually started as shown by command-line sqllocaldb info:
c:/>sqllocaldb info mssqllocaldb
Name: mssqllocaldb
Version: 12.0.2000.8
Shared name:
Owner: ZSYSTEM\USER-name
Auto-create: Yes
State: Running
Last start time: 4/2/2020 3:24:46 PM
Instance pipe name: np:\\.\pipe\LOCALDB#34729310\tsql\queryIIS App Pool I checked IIS (InetMgr) and looked at the Advanced Settings on the App Pool to verify that it is running as me. It was and then I remembered that esoteric setting that I needed to change... (Load User Profile: set to True -- defaults to False) But, check out the text that InetMgr provides to explain the setting. Really bad tech writing which is repetitive and not very helpful. It's like "what does Load User Profile do?" "Well, err...umm... it loads the user profile." I originally figured this out by trying every option, one at a time until I found the one that worked. Snapshot of APP Pool Advanced Settings[^] *And surely someone will say something about security and that I should be running as ApplicationPoolIdentity by default and all that. This is for development tests that is all.
-
I'm using SQLLocalDB (MS SQL Express) for a test database. Had to rebuild services and db on new VM Server. All good, but then I got this error when my ASP.NET MVC Application attempted to connect.
returned to my web app...
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: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start. )
But, that is a lie. The instance is actually started as shown by command-line sqllocaldb info:
c:/>sqllocaldb info mssqllocaldb
Name: mssqllocaldb
Version: 12.0.2000.8
Shared name:
Owner: ZSYSTEM\USER-name
Auto-create: Yes
State: Running
Last start time: 4/2/2020 3:24:46 PM
Instance pipe name: np:\\.\pipe\LOCALDB#34729310\tsql\queryIIS App Pool I checked IIS (InetMgr) and looked at the Advanced Settings on the App Pool to verify that it is running as me. It was and then I remembered that esoteric setting that I needed to change... (Load User Profile: set to True -- defaults to False) But, check out the text that InetMgr provides to explain the setting. Really bad tech writing which is repetitive and not very helpful. It's like "what does Load User Profile do?" "Well, err...umm... it loads the user profile." I originally figured this out by trying every option, one at a time until I found the one that worked. Snapshot of APP Pool Advanced Settings[^] *And surely someone will say something about security and that I should be running as ApplicationPoolIdentity by default and all that. This is for development tests that is all.
:laugh: That has got to be the worst tech writing I've ever read. They really took the speech-writing advice to heart:
Tell 'em what you're gonna tell 'em, tell 'em, and tell 'em what ya told 'em.
Robust Services Core | Software Techniques for Lemmings | Articles
-
:laugh: That has got to be the worst tech writing I've ever read. They really took the speech-writing advice to heart:
Tell 'em what you're gonna tell 'em, tell 'em, and tell 'em what ya told 'em.
Robust Services Core | Software Techniques for Lemmings | Articles
-
I'm using SQLLocalDB (MS SQL Express) for a test database. Had to rebuild services and db on new VM Server. All good, but then I got this error when my ASP.NET MVC Application attempted to connect.
returned to my web app...
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: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start. )
But, that is a lie. The instance is actually started as shown by command-line sqllocaldb info:
c:/>sqllocaldb info mssqllocaldb
Name: mssqllocaldb
Version: 12.0.2000.8
Shared name:
Owner: ZSYSTEM\USER-name
Auto-create: Yes
State: Running
Last start time: 4/2/2020 3:24:46 PM
Instance pipe name: np:\\.\pipe\LOCALDB#34729310\tsql\queryIIS App Pool I checked IIS (InetMgr) and looked at the Advanced Settings on the App Pool to verify that it is running as me. It was and then I remembered that esoteric setting that I needed to change... (Load User Profile: set to True -- defaults to False) But, check out the text that InetMgr provides to explain the setting. Really bad tech writing which is repetitive and not very helpful. It's like "what does Load User Profile do?" "Well, err...umm... it loads the user profile." I originally figured this out by trying every option, one at a time until I found the one that worked. Snapshot of APP Pool Advanced Settings[^] *And surely someone will say something about security and that I should be running as ApplicationPoolIdentity by default and all that. This is for development tests that is all.
LocalDB stores all instance data in a local AppData folder, which is why it needs the profile to be loaded. You might also need to enable
setProfileEnvironment
in some cases, as described in this archived blog post: Using LocalDB with Full IIS, Part 1: User Profile | Microsoft Docs[^] which links to this no-longer-available KB article: Windows 7 SP1 causes IntelliTrace Collection to fail on IIS[^] (Is anyone else fed up with Microsoft breaking all existing links to their content, and not bothering to redirect to the "archived" version?)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
LocalDB stores all instance data in a local AppData folder, which is why it needs the profile to be loaded. You might also need to enable
setProfileEnvironment
in some cases, as described in this archived blog post: Using LocalDB with Full IIS, Part 1: User Profile | Microsoft Docs[^] which links to this no-longer-available KB article: Windows 7 SP1 causes IntelliTrace Collection to fail on IIS[^] (Is anyone else fed up with Microsoft breaking all existing links to their content, and not bothering to redirect to the "archived" version?)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Thanks for the additional info. I had also found this somewhat cryptic text which kind of explains this item:
from Application Pool Identities | Microsoft Docs[^]
User Profile IIS doesn't load the Windows user profile, but certain applications might take advantage of it anyway to store temporary data. SQL Express is an example of an application that does this. However, a user profile has to be created to store temporary data in either the profile directory or in the registry hive. The user profile for the Network Service account was created by the system and was always available. However, with the switch to unique Application Pool identities, no user profile is created by the system. Only the standard application pools (DefaultAppPool and Classic .NET AppPool) have user profiles on disk. No user profile is created if the Administrator creates a new application pool. However, if you want, you can configure IIS application pools to load the user profile by setting the LoadUserProfile attribute to "true".
-
:laugh: That has got to be the worst tech writing I've ever read. They really took the speech-writing advice to heart:
Tell 'em what you're gonna tell 'em, tell 'em, and tell 'em what ya told 'em.
Robust Services Core | Software Techniques for Lemmings | Articles
When was Microsoft tech writing EVER known for anything but Horrible tech writing? :mad:
Old codger