by joe.pesch
29. November 2013 12:48
Running SQLExpress and trying to open database from Visual Studio. In my case I originally had SQL 2008 and 2012 installed. Then I added 2008R2 and deleted 2008. After that when trying to open a database (from App_Data folder of Visual Studio project) using the Server Explorer in Visual Studio I received the following error message: "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.". To resolve I simply deleted the following folder and then restarted Visual Studio: C:\Users\...\AppData\Local\Microsoft\Microsoft SQL Server Data
by joe.pesch
29. November 2013 08:43
File C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\2.7.40911.225\Modules\NuGet\nuget.psm1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.
Launch Powershell as admin and run this command: "Set-ExecutionPolicy RemoteSigned"
Restart Visual Studio
53e8e801-194a-4113-9e15-f260d5a2e991|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
Visual Studio
by joe.pesch
27. November 2013 08:49
7d764e6f-a819-483c-95b8-d6145117dbe5|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
Sharepoint
by joe.pesch
26. November 2013 13:52
After patching (SharePoint updates) you need to run the configuration wizard. The configuration wizard has to be ran on all SP servers in the farm. There is a command line that forces the wizard to re-run in the event of an issue or failure with the wizard.
Psconfig.exe -cmd upgrade -inplace b2b -wait -force.
0860d1cb-403d-4741-a27d-4bef03ace79a|1|4.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
Sharepoint
by joe.pesch
26. November 2013 07:48
9786d595-bd98-43aa-84b9-42501c5eab1b|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
by joe.pesch
4. November 2013 06:12
Below is a sample app.config using a custom dictionary section to store simple key/value pairs:
<configuration>
<configSections>
<section name="CustomDictionarySection" type="System.Configuration.DictionarySectionHandler"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<CustomDictionarySection>
<add key="Key1" value="Value 1" />
<add key="Key2" value="Value 2" />
<add key="Key3" value="Value 3" />
</CustomDictionarySection>
</configuration>
class Program
{
static void Main(string[] args)
{
string key = "Key2";
var section = (ConfigurationManager.GetSection("CustomDictionarySection") as System.Collections.Hashtable)
.Cast<System.Collections.DictionaryEntry>()
.Where(t => t.Key.ToString() == key);
if (section.Count() > 0)
Console.WriteLine(string.Format("Found section with key: {0} containing value: {1}", key, section.First().Value));
else
Console.WriteLine(string.Format("Could not find section with key: {0}", key));
Console.Read();
}
}
32bc91ab-430f-4a16-8611-06c544d59009|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
C#