Posts
- NuGet vnext Visual Studio 2015 Error: FindPackagesById:
Today I cloned the aspnet/StaticFiles repository from GitHub on Visual Studio 2015 and when I tried to build the solution I received the following error: Error: FindPackagesById: Microsoft.AspNet.Hosting.Abstractions The problem was that the solution was using packages not available on the main NuGet repo. I was able to fix this problem by going to Tools > NuGet Package Manager > Package Manager Settings > Package Sources and then un-checking all the sources except AspNetVNext https://www.myget.org/F/aspnetvnext/api/v2
- Could not load file or assembly 'Mindscape.Raygun4Net, Version=5.0.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies
After updating nuget packages in a solution I received the following error: Could not load file or assembly ‘Mindscape.Raygun4Net, Version=5.0.2.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies I solved this problem by forcing nuget to reinstall the package using the following command in the Package Manager Console:
- Unable to start debugging on the web server. The underlying connection was closed: An unexpected error occurred on a send.
Today I received the following error when trying to start debugging on a web site in Visual Studio 2013: ————————— Microsoft Visual Studio ————————— Unable to start debugging on the web server. The underlying connection was closed: An unexpected error occurred on a send. Click Help for more information.
- Azure Search (search.windows.net) No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access. The response had HTTP status code 400.
When using Azure Search you may come across the following error when trying to reach the api No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin is therefore not allowed access. The response had HTTP status code 400 The problem is that search.windows.net will not allow cross origin requests by default and you have to tell it to allow them per index. When creating the index add the following section to your configuration:
- Web Api 2, OWIN and StructureMap
Add the following code to your startup file: public class Startup { public void Configuration(IAppBuilder app) { // setup http configuration GlobalConfiguration.Configure(config => { //configure dependency injection var container = IoC.Initialize(); config.ConfigureDependencyInjection(container); config.ConfigureControllerSelector(); } } } And create the following IoC container: public static class IoC { public static IContainer Initialize() { var container = new Container(c => { c.AddRegistry(); // TODO: Add custom registry here }); return container; } } And a WebApi Registry:
- IDX10708: 'System.IdentityModel.Tokens.JwtSecurityTokenHandler' cannot read this string: 'Bearer'.
Today I got the following message when trying to send the rawData of a JwtSecurityToken I had created manually: IDX10708: ‘System.IdentityModel.Tokens.JwtSecurityTokenHandler’ cannot read this string: ‘Bearer’. The problem was that the rawData portion of the JwtSecurityToken is not populated until the token has been validated. I ended up using the following solution to create and validate JWT Tokens.
- Nuget Push failed to process request System.Net.HttpWebRequest.GetResponse()
When trying to push a NuGet package to our new local NuGet repository we recieved the following error: System.InvalidOperationException: Failed to process request. ‘Internal Server Er ror’. The remote server returned an error: (500) Internal Server Error.. —> System.N et.WebException: The remote server returned an error: (500) Internal Server Erro r. at System.Net.HttpWebRequest.GetResponse() at NuGet.RequestHelper.GetResponse(Func`1 createRequest, Action`1 prepareRequ est, IProxyCache proxyCache, ICredentialCache credentialCache, ICredentialProvid er credentialProvider) at NuGet.HttpClient.GetResponse() at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable`1 expectedStatusCode) — End of inner exception stack trace — at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable`1 expectedStatusCode) at NuGet.PackageServer.PushPackageToServer(String apiKey, Func`1 packageStrea mFactory, Int32 timeout) at NuGet.PackageServer.PushPackage(String apiKey, IPackage package, Int32 tim eout) at NuGet.Commands.PushCommand.PushPackageCore(String source, String apiKey, P ackageServer packageServer, String packageToPush, TimeSpan timeout) at NuGet.Commands.PushCommand.PushPackage(String packagePath, String source, String apiKey, TimeSpan timeout) at NuGet.Commands.PushCommand.ExecuteCommand() at NuGet.Commands.Command.Execute() at NuGet.Program.Main(String args)
- ADFS 3.0 WIF .NET 4.5 Cheat Sheet
After wrestling with ADFS 3.0 and WIF in .NET 4.5 I decided to create this cheat sheet to map the numerous mixed terms that exist between ADFS and WIF. ADFS Authentication Authorization Example Notes Identifier Wtrealm Audience urn:servername This can be anything as long as it is unique and it not used anywhere else Relying Party Endpoints Wreply https://localhost/testserver/ This is the address of the server that wants to use ADFS for identity. Ensure you add the trailing / in Wreply this is a bug in WIF Service Endpoint MetadataAddress https://adfsserver/federationmetadata/2007-06/federationmetadata.xml Contains the details that WIF will use to configure authentication. Without this file you would have to configure the server manually Service Endpoint Issuer http://adfsserver/adfs/services/trust
- SharePoint 2013 Error occurred in deployment step 'Activate Features': Column 'WSPublishState' does not exist. It may have been deleted by another user.
After following this tutorial on How to Create Custom SharePoint Server 2013 Workflow Forms with Visual Studio 2012 Sand-boxed Solutions I received the following error: Error occurred in deployment step ‘Activate Features’: Column ‘WSPublishState’ does not exist. It may have been deleted by another user.
- Error occurred in deployment step 'Install app for SharePoint': There is no Workflow App Part registered.
When trying to deploy a SharePoint hosted custom workflow I received the following error: Error occurred in deployment step ‘Install app for SharePoint’: There is no Workflow App Part registered. The problem was that the SharePoint 2013 server did not have the WorkFlow Manager installed and configured.