Monday, November 25, 2019

Server Error in '/POCAdmin' Application.

Request is not available in this context


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Request is not available in this context

Source Error:

Line 90:             // Set up the NhibernateFactories
Line 91:             var jcdcFactory = ObjectFactory.GetNamedInstance<INHFactory>("JCDC");
Line 92:             jcdcFactory.BuildFactoryByConfigFile<StaffEO, StaffEOMap>("~/JCDCDB.config");
Line 93: 
Line 94:             //only uncomment these for webapps

Source File: D:\TFS\POCAdmin\POCAdmin\Utilities\BootstrapStuctureMap.cs    Line: 92



THE ANSWER



Net pool is default (Integrated), change to classic           

Monday, June 10, 2019

Sucessfully logging into TFS after a Password change.

Do the following:
 
     1.       Exit out of all your sessions including TFSWeb.
     2.       Go to Control Panel à Credential Manager
     3.       In the “Generic Credentials” click on the TFS entry down arrow and select “Remove from vault”.
     4.       Try connecting again through Visual Studio.
    
     reboot
     Check out a file in TFS to force it to detect your credentials changed



Sunday, May 6, 2018

Finding the new 2016 rank requirements work sheet



I had a hard time finding the updated rank worksheets for the Boy scout ranks using the 2016 2017 requirements.

Scout, Tenderfoot, Second Class, First Class, Star, Life, Eagle

But here they are!

http://usscouts.org/advance/boyscout/list.asp

Thursday, August 31, 2017

Create local host cert for ssl, and install so that ssl works when debugging locally, in windows7 , with powershell as part of the process.



So I'm teaching my self about ssl, on the way to learning to do SSO to Google suite for edu.

I had to create a ssl web site for testing this process.
here are the steps I used to get the cert stuff working


  1. In powershell run the following command
    1. New-SelfSignedCertificate -DnsName "localhost" -CertStoreLocation "cert:\LocalMachine\My"
      1. Which I got from this Stack Overflow article https://stackoverflow.com/questions/8169999/how-can-i-create-a-self-signed-cert-for-localhost
  2. Then install following the steps in this video
    1. https://www.youtube.com/watch?v=y4uKPUFmSZ0
  3. The close your browser, and press <F5> to start debugging the app afresh.
That's it!

Friday, February 10, 2017

Vs 2015 malformed NuGet.Config missing root element

 To fix the Vs2015 issue at JCDC use this as the guts of your NuGet.Config file in the
root of the solution.

If you are not at JCDC leave out the repository path and put in the guts of your own old style NuGet.Config

<?xml version="1.0" encoding="utf-8"?>

<configuration>

<settings>

<repositoryPath>./packages</repositoryPath>

</settings>

</configuration>
 
 


Thursday, January 19, 2017

Case notes expired session issue,

case notes used a child application architecture to share the login with the parent app.

to do this the following must be set up

In order for virtual applications to work the machine key needs to be the same for the child as it is for the parent.  Currently the 2012 server has the key set up to auto generate.  Add key to machine's web.config.
Machine key taken from Windows 2003 server (10.0.240.199)
 
Open C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config
There are two <system.web> sections.  One is inside a <location> section, one is not.  Paste the key in the <system.web> section that is not.
 
<machineKeyvalidationKey="<your key goes here>" decryption="3DES" validation="SHA1"/>​

Wednesday, October 14, 2015

Sample Setup for Strucutremap 3+



Download Strucutremap and related packages from nugget

Install-Package StructureMap -version 3.1.6.186Install-Package StructureMap.MVC4 -version 3.0.2.115
Install-Package StructureMap.Web -version 3.1.6.186


Goto App Start Strucutremap.mvc

Replace the iniliaslizer line with this to use the Default JCDC initializer
IContainer container = StructureMapIoC.Initialize<DefaultRegistry>();

Comment out IOC.Cs in Dependency resolver

 
Put the following in DefaultRegistry.cs



// --------------------------------------------------------------------------------------------------------------------

// <copyright file="DefaultRegistry.cs" company="Web Advanced">

// Copyright 2012 Web Advanced (www.webadvanced.com)

// Licensed under the Apache License, Version 2.0 (the "License");

// you may not use this file except in compliance with the License.

// You may obtain a copy of the License at

//

// http://www.apache.org/licenses/LICENSE-2.0
 
 




// Unless required by applicable law or agreed to in writing, software

// distributed under the License is distributed on an "AS IS" BASIS,

// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

// See the License for the specific language governing permissions and

// limitations under the License.

// </copyright>

// --------------------------------------------------------------------------------------------------------------------
 
 




 
 
 
using JCDCTools.AdoAccess.BusinessObjects;

using JCDCTools.AdoAccess.Interfaces;

using JCDCTools.Core.Logging.Interfaces;

using JCDCTools.Core.User.BusinessObjects;

using JCDCTools.Core.User.Interfaces;

using JCDCTools.Core.Utilities;

using JCDCTools.Core.Utilities.BusinessObjects;

using JCDCTools.Core.Utilities.Interfaces;

using JCDCTools.NhAccess.BusinessObjects;

using JCDCTools.NhAccess.Interfaces;

using JCDCTools.Users.Bll.Interfaces;

using JCDCTools.Users.DAL.Interfaces;

using JCDCTools.Utilities.Bll.Interfaces;

using StructureMap.Pipeline;

using StructureMap.Web.Pipeline;

using TacToolsTest.BLL.Interfaces;

using TacToolsTest.DAL.Interfaces;

using TacToolsTest.Jcdc.EO;

using TacToolsTest.Jcdc.Map;

using TacToolsTest.Reporting;

namespace TACAdmin3G.DependencyResolution




{
 
 
public class DefaultRegistry : JcdcRegistry




{
 
 
#region Constructors and Destructors

public DefaultRegistry()




{

Scan(
 
 
scan =>




{
 
 
scan.AssemblyContainingType< ICenterBLL >(); // TacToolsTest BLL

scan.AssemblyContainingType< IEpmsContractsBLL >(); // TacToolsTest BLL

scan.AssemblyContainingType< ICenterDAL >(); // TacToolsTest DAL

scan.AssemblyContainingType< IWebAccess >(); // JCDCTools.Core

scan.AssemblyContainingType< IUserMaintBLL >(); // JCDCTools.Users

scan.AssemblyContainingType< IAdoHelper >(); // JcdcTools.AdoAccess

scan.AssemblyContainingType< INHFactory >(); // JcdcToools.NhAccess

scan.AssemblyContainingType<IEncryption>(); // JcdcTools.Utilities

scan.AssemblyContainingType< ISSOAuthenticationUserDataBLL >();

scan.AssemblyContainingType< ISSOAuthenticationUserDataDAL >();

scan.AssemblyContainingType< IReportGenerator >();

//scan.AssemblyContainingType<IETA640DAL>();

scan.AssemblyContainingType<IAdoHelper>();

scan.AssemblyContainingType<INetLog>();

scan.LookForRegistries();

scan.WithDefaultConventions();




});
 
 
// For<IWebAccess>().LifecycleIs<HybridLifecycle>().Use<WebAccess>().Named( "default" );
 
 
For<IWebAccess>().LifecycleIs<HybridLifecycle>().Use<WinFormAccess>().Named( "default" );




 
 
 
For<INetLog>()

//.LifecycleIs<HybridLifecycle>()

.Use<JCDCTools.Core.Logging.BusinessObjects.NetLog>().Singleton();

For<IAdoHelper>().Use<SybaseHelper>()

.Named( "JCDC" )

.Ctor<string>( "ConnectStringName" ).Is( "SybaseDB" )

.Ctor<string>( "TimeOutStringName" ).Is( "SybaseDBCommandTimeout" );

For<IAdoHelper>().Use<SybaseHelper>()

.Named( "SPAMIS" )

.Ctor<string>( "ConnectStringName" ).Is( "SpamisDB" )

.Ctor<string>( "TimeOutStringName" ).Is( "SybaseDBCommandTimeout" );

For<IUser>()

.LifecycleIs<HybridLifecycle>()

.Use<UserByMock>();

For<INHFactory>().Use<NHFactory>()

.Named( "JCDC" )

.LifecycleIs<SingletonLifecycle>()

.Singleton();

For<INHSession>().Use<NHSession>()

.Named( "JCDC" )

.LifecycleIs<HybridLifecycle>()

.Ctor<string>( "ConnectStringName" ).Is( "XXXXX" )

.Ctor<string>( "TimeOutStringName" ).Is( "SybaseDBCommandTimeout" )

.Ctor<string>( "DBNameAndHasTran " ).Is( "XXXXX" );

For<INHFactory>().Use<NHFactory>()

.Named( "JCDC_HasTrans" )

.LifecycleIs<SingletonLifecycle>()

.Singleton();

For<INHSession>().Use<NHSession>()

.Named( "JCDC_HasTrans" )

.LifecycleIs<HybridLifecycle>()

.Ctor<string>( "ConnectStringName" ).Is( "XXX" )

.Ctor<string>( "TimeOutStringName" ).Is( "SybaseDBCommandTimeout" )

.Ctor<string>( "DBNameAndHasTran " ).Is( "XX" );

For<INHFactory>().Use<NHFactory>()

.Named( "JCDC_HasNoTrans" )

.LifecycleIs<SingletonLifecycle>()

.Singleton();

For<INHSession>().Use<NHSession>()

.Named( "JCDC_HasNoTrans" )

.LifecycleIs<HybridLifecycle>()

.Ctor<string>( "ConnectStringName" ).Is( "SybaseDB" )

.Ctor<string>( "TimeOutStringName" ).Is( "SybaseDBCommandTimeout" )

.Ctor<string>( "DBNameAndHasTran " ).Is( "JCDC_HasTrans" );




 

 
 
 
For<INHFactory>().Use<NHFactory>()

.Named( "SPAMIS_HasTrans" )

.LifecycleIs<SingletonLifecycle>()

.Singleton();

For<INHSession>().Use<NHSession>()

.Named( "SPAMIS_HasTrans" )

.LifecycleIs<HybridLifecycle>()

.Ctor<string>( "ConnectStringName" ).Is( "XXXXX" )

.Ctor<string>( "TimeOutStringName" ).Is( "SybaseDBCommandTimeout" )

.Ctor<string>( "DBNameAndHasTran " ).Is( "XXXXXX" );




}

 
 
 
/// <summary>

/// Initializes the objects after the Structuremap configure method has finished, this is because only then can you get objects from the container - EWB.

/// </summary>

/// <Programmer>Brown.ericw</Programmer>

/// <CreateDate>10/7/2015-11:46 AM</CreateDate>

public override void InitObjectsPostConfigure()




{
 
 
INHFactory jcdcFactory;

jcdcFactory = JcdcObjectFactory.GetNamedInstance<INHFactory>( "XXXXX" );

jcdcFactory.BuildFactoryByConfigFile<StudentEO, StudentEOMap>( "~/
XXXXX.config" );

jcdcFactory = JcdcObjectFactory.GetNamedInstance<INHFactory>( "
XXXXX_HasTrans" );

jcdcFactory.BuildFactoryByConfigFile<StudentEO, StudentEOMap>( "~/
XXXXX.config" );

jcdcFactory = JcdcObjectFactory.GetNamedInstance<INHFactory>( "
XXXXX_HasNoTrans" );

jcdcFactory.BuildFactoryByConfigFile<StudentEO, StudentEOMap>( "~/
XXXXXb.config" );




}
 
 
#endregion
 
 
}

}