From 70df924a10ec37e79544aa7bfbc487b6ab5dea91 Mon Sep 17 00:00:00 2001 From: Jason Sylvestre Date: Wed, 4 Dec 2019 14:25:14 -0800 Subject: [PATCH 1/2] Changes to get this to work locally and point to CRP on terry --- Catbert4/Controllers/AccountController.cs | 2 +- Catbert4/Helpers/CasHelper.cs | 2 +- Catbert4/Services/DirectoryService.cs | 2 +- Catbert4/Web.config | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Catbert4/Controllers/AccountController.cs b/Catbert4/Controllers/AccountController.cs index 317e1dc..c704af8 100644 --- a/Catbert4/Controllers/AccountController.cs +++ b/Catbert4/Controllers/AccountController.cs @@ -31,7 +31,7 @@ public ActionResult LogOn(string returnUrl) public ActionResult LogOut() { FormsAuthentication.SignOut(); - return Redirect("https://cas.ucdavis.edu/cas/logout"); + return Redirect("https://ssodev.ucdavis.edu/cas/logout"); } public RedirectToRouteResult Emulate(string id /* Login ID*/) diff --git a/Catbert4/Helpers/CasHelper.cs b/Catbert4/Helpers/CasHelper.cs index 4416dfd..f5ceeb4 100644 --- a/Catbert4/Helpers/CasHelper.cs +++ b/Catbert4/Helpers/CasHelper.cs @@ -8,7 +8,7 @@ namespace Catbert4.Helpers { public static class CasHelper { - private const string StrCasUrl = "https://cas.ucdavis.edu/cas/"; + private const string StrCasUrl = "https://ssodev.ucdavis.edu/cas/"; private const string StrTicket = "ticket"; private const string StrReturnUrl = "ReturnURL"; diff --git a/Catbert4/Services/DirectoryService.cs b/Catbert4/Services/DirectoryService.cs index 150fd95..4e89f3c 100644 --- a/Catbert4/Services/DirectoryService.cs +++ b/Catbert4/Services/DirectoryService.cs @@ -41,7 +41,7 @@ public class DirectoryServices : IDirectorySearchService private static readonly string LDAPUser = WebConfigurationManager.AppSettings["LDAPUser"]; private static readonly int STR_LDAPPort = 636; //private static readonly string STR_LDAPURL = "ldap.ucdavis.edu"; - private static readonly string STR_LDAPOLD = "ldap-old.ucdavis.edu"; //via T.Poage: fast-delete setting in the load balancer entry + private static readonly string STR_LDAPOLD = "ldap.ucdavis.edu"; //via T.Poage: fast-delete setting in the load balancer entry public static SearchResponse GetSearchResponse(string searchFilter, string searchBase, int sizeLimit = 500) { diff --git a/Catbert4/Web.config b/Catbert4/Web.config index 82de68d..7e87661 100644 --- a/Catbert4/Web.config +++ b/Catbert4/Web.config @@ -20,7 +20,7 @@ NHibernate.Connection.DriverConnectionProvider NHibernate.Driver.SqlClientDriver MainDB - Catbert3.dbo + CRP.dbo true 25 true @@ -40,8 +40,8 @@ - - + + From 153c846460a630f0ad3c79740e4389cb2dbd7ab5 Mon Sep 17 00:00:00 2001 From: Jason Sylvestre Date: Tue, 7 Jan 2025 07:34:18 -0800 Subject: [PATCH 2/2] Get cas to work locally --- Catbert4.Core/Catbert4.Core.csproj | 8 ++++-- Catbert4.Tests/App.config | 26 +++++++++---------- Catbert4.Tests/Catbert4.Tests.csproj | 8 ++++-- Catbert4/Catbert4.csproj | 22 +++++++--------- Catbert4/Global.asax.cs | 3 +++ .../UserManagementResources.Designer.cs | 2 +- 6 files changed, 38 insertions(+), 31 deletions(-) diff --git a/Catbert4.Core/Catbert4.Core.csproj b/Catbert4.Core/Catbert4.Core.csproj index f2b1275..00aa673 100644 --- a/Catbert4.Core/Catbert4.Core.csproj +++ b/Catbert4.Core/Catbert4.Core.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,7 +10,7 @@ Properties Catbert4.Core Catbert4.Core - v4.0 + v4.8 512 @@ -20,6 +20,7 @@ + true @@ -29,6 +30,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -37,6 +39,7 @@ TRACE prompt 4 + false bin\Test\ @@ -53,6 +56,7 @@ true ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules true + false diff --git a/Catbert4.Tests/App.config b/Catbert4.Tests/App.config index 7c70fe2..2c35db0 100644 --- a/Catbert4.Tests/App.config +++ b/Catbert4.Tests/App.config @@ -1,11 +1,11 @@ - + -
+
@@ -33,25 +33,25 @@ - - + + - - + + - - + + - - + + - - + + - \ No newline at end of file + diff --git a/Catbert4.Tests/Catbert4.Tests.csproj b/Catbert4.Tests/Catbert4.Tests.csproj index a42d1d0..b5fbe1d 100644 --- a/Catbert4.Tests/Catbert4.Tests.csproj +++ b/Catbert4.Tests/Catbert4.Tests.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,7 +10,7 @@ Properties Catbert4.Tests Catbert4.Tests - v4.0 + v4.8 512 @@ -20,6 +20,7 @@ + true @@ -29,6 +30,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -37,6 +39,7 @@ TRACE prompt 4 + false bin\Test\ @@ -53,6 +56,7 @@ true ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules true + false diff --git a/Catbert4/Catbert4.csproj b/Catbert4/Catbert4.csproj index b7a2c29..60150c5 100644 --- a/Catbert4/Catbert4.csproj +++ b/Catbert4/Catbert4.csproj @@ -13,7 +13,7 @@ Properties Catbert4 Catbert4 - v4.0 + v4.8 false @@ -35,6 +35,8 @@ + + true @@ -44,6 +46,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -52,6 +55,7 @@ TRACE prompt 4 + false bin\ @@ -68,6 +72,7 @@ false ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules false + false @@ -117,6 +122,7 @@ + @@ -132,12 +138,7 @@ 3.5 - - 3.5 - - - 3.5 - + ..\packages\Microsoft.AspNet.WebPages.1.0.20105.408\lib\net40\System.Web.Helpers.dll True @@ -162,19 +163,14 @@ ..\packages\Microsoft.AspNet.WebPages.1.0.20105.408\lib\net40\System.Web.WebPages.Razor.dll True - - 3.5 - - - 3.5 - + ..\Bin\UCDArch.dll diff --git a/Catbert4/Global.asax.cs b/Catbert4/Global.asax.cs index 420ce62..58861ab 100644 --- a/Catbert4/Global.asax.cs +++ b/Catbert4/Global.asax.cs @@ -9,6 +9,7 @@ using UCDArch.Web.IoC; using UCDArch.Web.ModelBinder; using UCDArch.Web.Validator; +using System.Net; namespace Catbert4 { @@ -19,6 +20,8 @@ public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { + // specify to use TLS 1.2 as default connection + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; #if DEBUG HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(); #endif diff --git a/Catbert4/Services/UserManagement/UserManagementResources.Designer.cs b/Catbert4/Services/UserManagement/UserManagementResources.Designer.cs index 2f70d91..ea8b8fd 100644 --- a/Catbert4/Services/UserManagement/UserManagementResources.Designer.cs +++ b/Catbert4/Services/UserManagement/UserManagementResources.Designer.cs @@ -19,7 +19,7 @@ namespace Catbert4.Services.UserManagement { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class UserManagementResources {