create letsencrypt exception for apache reverse proxy along with ip restrictions

Under normal circumstances, setting up an apache reverse proxy with a letsencrypt exception for /.well-known is easily done with ProxyPass /.well-known ! It seems to become much more difficult (something which I happen to have easily solved in nginx) to configure this exception along with ip restrictions for the backend:

<VirtualHost *:80>   ServerName example.com   DocumentRoot /var/www/html   Redirect / https://example.com/ </VirtualHost>  <VirtualHost *:443>   ServerName example.com    SSLEngine on   SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem   SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem   DocumentRoot /var/www/html    ErrorLog $  {APACHE_LOG_DIR}/bfp-all_error.log   CustomLog $  {APACHE_LOG_DIR}/bfp-all_access.log combined    RewriteEngine On   RewriteCond %{HTTP:Connection} Upgrade [NC]   RewriteCond %{HTTP:Upgrade} websocket [NC]   RewriteRule /(.*) ws://localhost:8050/$  1 [P,L]      ProxyRequests Off   ProxyPreserveHost On <Location />     ProxyPass "http://localhost:8050/"     ProxyPassReverse "http://localhost:8050/"     Require ip 10.0.0.0/24     Require ip 192.168.0.0/24 </Location> </VirtualHost> 

I tried using Alias and (and also the directory, which seems to be already quite redundant) before the section but the requests keep going to the backend:

DocumentRoot /var/web/letsencrypt Alias /.well-known /var/web/letsencrypt/.well-known   <Directory /var/web/letsencrypt/.well-known>            Options -Indexes            Require all granted   </Directory>   <Location /.well-known>         ProxyPass !         Require all granted   </Location> 

Any ideas how I could solve this? I would have expected it to be a problem people do come across from time to time, but I haven’t found anything on the internet.

Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘Receiver () has no segue with identifier ‘pizzaSegue’ [migrated]

I am new to swift programming and running into errors with performing a segue from a tableview cell when it is pressed to a view controller giving details about that cell. The error I am getting is: Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘Receiver () has no segue with identifier ‘pizzaSegue”

I have already tried the following: 1) Tried renaming the storyboard and make sure to set the main storyboard in the project settings and in the info.plist file (Key is ‘Main storyboard file base name’). I currently have the storyboard named: “Main.storyboard”

2) Tried doing a clean of the product (Product -> Clean) and rebuild but this gives same error

3) I have tried deleting the app from the simulator and running it again

4) I have double checked and the segue identifier in interface builder is called “pizzaSegue” and it is the same in my code.

import UIKit import Alamofire  struct Drink {     let id: String     let name: String     let description: String     let amount: Float     let image: UIImage      init(data: [String: Any]) {         self.id = data["id"] as! String         self.name = data["name"] as! String         //self.amount = data["amount"] as! Float         self.amount = ((data["amount"] as? NSNumber)?.floatValue)!         self.description = data["description"] as! String         self.image = data["image"] as! UIImage     } }  class DrinkTableViewCell: UITableViewCell {     @IBOutlet weak var cellName: UILabel!     @IBOutlet weak var cellAmount: UILabel!     @IBOutlet weak var cellDescription: UILabel!     @IBOutlet weak var cellImage: UIImageView!      override init(style: UITableViewCell.CellStyle, reuseIdentifier: String!) {         super.init(style: style, reuseIdentifier: reuseIdentifier)     }      required init?(coder aDecoder: NSCoder) {         fatalError("init(coder:) has not been implemented")     }  }  class DrinkListTableViewController: UITableViewController {      var drinks: [Drink] = []      override func viewDidLoad() {         super.viewDidLoad()         navigationItem.title = "Drink Selection"         tableView.dataSource = self         tableView.delegate = self         //tableView.register(DrinkTableViewCell.self, forCellReuseIdentifier: "cell")          tableView.register(DrinkTableViewCell.self as AnyClass, forCellReuseIdentifier: "cell")          //tableView.register(UINib(nibName: "DrinkTableViewCell", bundle: Bundle.main), forCellReuseIdentifier: "cell")          //tableView.estimatedRowHeight = 134         //tableView.rowHeight = UITableView.automaticDimension          fetchInventory { drinks in             guard drinks != nil else { return }             self.drinks = drinks!             //print("Data from API call: ", self.drinks)             //self.tableView.reloadData() //            DispatchQueue.main.async { [weak self] in //                self?.tableView.reloadData() //            }         }     }      override func viewDidAppear(_ animated: Bool) {         super.viewDidAppear(animated)         DispatchQueue.main.async { [weak self] in             self?.tableView.reloadData()         }     }       override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {             performSegue(withIdentifier: "pizzaSegue", sender: self.drinks[indexPath.row] as Drink)         //trying another method below?         //self.navigationController?.pushViewController(UIViewController() as! PizzaViewController, animated: true)     }        override func prepare(for segue: UIStoryboardSegue, sender: Any?) {          if segue.identifier == "pizzaSegue" {             guard let vc = segue.destination as? PizzaViewController else { return }             vc.pizza = sender as? Pizza         }     }      private func fetchInventory(completion: @escaping ([Drink]?) -> Void) { Alamofire.request("http://127.0.0.1:4000/inventory", method: .get)         .validate()         .responseJSON { response in             guard response.result.isSuccess else { return completion(nil) }             guard let rawInventory = response.result.value as? [[String: Any]?] else { return completion(nil) }             let inventory = rawInventory.compactMap { pizzaDict -> Drink? in                 var data = pizzaDict!                 data["image"] = UIImage(named: pizzaDict!["image"] as! String)                 //print("Printing each item: ", Drink(data: data))                 //printing all inventory successful                 return Drink(data: data)             }             completion(inventory)     } }      // MARK: - Table view data source      override func numberOfSections(in tableView: UITableView) -> Int {         return 1     }      override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {         print("ROWS: ", drinks.count)         return drinks.count     }       override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {          //let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! DrinkTableViewCell          //let cell = UITableViewCell(style: UITableViewCell.CellStyle.subtitle, reuseIdentifier: "cell")          let cell:DrinkTableViewCell = self.tableView.dequeueReusableCell(withIdentifier: "cell") as! DrinkTableViewCell          //cell.cellName?.text = drinks[indexPath.row].name         //cell.cellAmount?.text = String(drinks[indexPath.row].amount)         //cell.cellDescription?.text = drinks[indexPath.row].description         //cell.cellImage?.image = drinks[indexPath.row].image          cell.imageView?.image = drinks[indexPath.row].image         cell.textLabel?.text = drinks[indexPath.row].name         cell.detailTextLabel?.text = drinks[indexPath.row].description          //print(cell.textLabel?.text)         //print(cell.detailTextLabel?.text)          print(cell.cellName?.text as Any)         //print(cell.cellImage?.image)         return cell     }       override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {      return 100.0      }  } 

Screenshot showing error in console and the segue identifier in storyboard

CSOM: Intermittent Tenant Errors “Exception has been thrown by the target of an invocation.”

We have been seeing intermittent “Exception has been thrown by the target of an invocation.” when querying the tenant this week.

This occurs when either creating a new site via the tenant, or trying to obtain site properties via the tenant using CSOM. The command works one minute, then stops working the next, and fluctuates between working and not working.

Has anyone else been experiencing these issues?

An example of one of the commands which intermittently fails:

SPOSitePropertiesEnumerableFilter filter = new SPOSitePropertiesEnumerableFilter() {     IncludeDetail = true }; var props = tenant.GetSitePropertiesFromSharePointByFilters(filter); tenant.Context.Load(props, p => p.NextStartIndexFromSharePoint); tenant.Context.ExecuteQuery(); 

Error exception Undefined offset: 99

Estoy intentando guardar unos registros en un ciclo en php Рlaravel, ha venido funcionando bien pero hoy empezó a molestar con el error de Undefined offset: 99, este es el fragmento que realiza el guardado:

for($  i = 0; $  i < count($  request['Opcion_idOpcion']); $  i++) {    \App\RolOpcion::create([        'Rol_idRol' => $  id,         'Opcion_idOpcion' => $  request['Opcion_idOpcion'][$  i],         'adicionarRolOpcion' => $  request['adicionarRolOpcion'][$  i],         'modificarRolOpcion' => $  request['modificarRolOpcion'][$  i],         'eliminarRolOpcion' => $  request['eliminarRolOpcion'][$  i],         'consultarRolOpcion' => $  request['consultarRolOpcion'][$  i],         'firmarRolOpcion' => $  request['firmarRolOpcion'][$  i]     ]); } 

Invalid Dn syntax exception when creating user in ldap

I saw for certain CN values(e.g. CN=abc_dfe_89.78.67.56,34.45.45.45) when submitted to ldap for user creation in that format, IBM ldap throws the following exception documented in this link indicating invalid Dn syntax. Suspecting since”CN” values contains comma(,) that have meaning in LDAP is what may be causing this exception to be thrown. I am not familiar with ldap and need your expertise to confirm if that is the cause. If yes, then what other characters should be avoided in the CN to ensure this DN syntax validation does not fail.

Invalid DN exception is thrown when creating user in LDAP

I am seeing for certain CN values, when submitted to ldap for user creation, IBM ldap throws the following exception documented in this link indicating invalid Dn syntax. Suspecting if the “CN” values contains commas(,) or equals (=) or any other such special characters that have meaning in LDAP is what may be causing this exception to be thrown. I am not familiar with ldap and need your expertise to confirm if that is the cause. If yes, then what other characters should be avoided in the CN to ensure this DN syntax validation does not fail.

IIS faults with Exception message: The file or directory is corrupted and unreadable

My IIS site faults with the following error:

Event code: 3005  Event message: An unhandled exception has occurred.  Event time: 04.04.2019 10:20:44  Event time (UTC): 04.04.2019 08:20:44  Event ID: d4d99328fbfd43a0855ebbb3c86a74c7  Event sequence: 1  Event occurrence: 1  Event detail code: 0   Application information:      Application domain: /LM/W3SVC/3/ROOT-395-131988396439706866      Trust level: Full      Application Virtual Path: /      Application Path: E:\w3server\BBL\Website_radbrekk\      Machine name: WZP01-WEB-01   Process information:      Process ID: 1652      Process name: w3wp.exe      Account name: IIS APPPOOL\BBL_Radbrekk   Exception information:      Exception type: IOException      Exception message: The file or directory is corrupted and unreadable.     at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)    at System.IO.FileSystemEnumerableIterator`1.MoveNext()    at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)    at System.IO.Directory.GetDirectories(String path)    at System.Web.Compilation.StandardDiskBuildResultCache.FindSatelliteDirectories()    at System.Web.Compilation.BuildManager.RegularAppRuntimeModeInitialize()    at System.Web.Compilation.BuildManager.Initialize()    at System.Web.Compilation.BuildManager.InitializeBuildManager()    at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)    Request information:      Request URL: https://nobl.fordelerformedlemmer.no:443/favicon.ico      Request path: /favicon.ico      User host address: 93.187.80.126      User:       Is authenticated: False      Authentication Type:       Thread account name: IIS APPPOOL\BBL_Radbrekk   Thread information:      Thread ID: 6      Thread account name: IIS APPPOOL\BBL_Radbrekk      Is impersonating: False      Stack trace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)    at System.IO.FileSystemEnumerableIterator`1.MoveNext()    at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)    at System.IO.Directory.GetDirectories(String path)    at System.Web.Compilation.StandardDiskBuildResultCache.FindSatelliteDirectories()    at System.Web.Compilation.BuildManager.RegularAppRuntimeModeInitialize()    at System.Web.Compilation.BuildManager.Initialize()    at System.Web.Compilation.BuildManager.InitializeBuildManager()    at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) 

I get this on any and all requests, although modifying web.config works as I can turn custom 500 error handling on and off. I assume this means that one or more files has an IO error, but how do I find out witch one?

What is the use of disabling detailed exception pages on open-sourced apps?

Frameworks for web apps typically can run in either production mode or development mode. One of the major differences between the two modes is how exceptions are handled: in development mode the browser will typically be sent a detailed exception information with a stack trace, while production mode will only serve a generic (though customizable) error page that is devoid of any more detailed information.

The frameworks’ documentation will also typically warn against using development mode in production for this reason; this is an example from .NET Core:

Warning Enable the Developer Exception Page only when the app is running in the Development environment. You don’t want to share detailed exception information publicly when the app runs in production.

And this is a similar warning from Django docs:

Never deploy a site into production with DEBUG turned on.

One of the main features of debug mode is the display of detailed error pages. If your app raises an exception when DEBUG is True, Django will display a detailed traceback, including a lot of metadata about your environment, such as all the currently defined Django settings (from settings.py).

I’m failing to understand the reasoning behind the aforementioned security measures?

If I understand, the reasoning goes like that: Detailed error pages would allow a potential attacker to discover details about the app’s source code = they might find weaknesses = bad. Isn’t it the definition of security through obscurity?

In addition: What is the use of such measures if the app is open-sourced? Disabling detailed exception pages is supposed to prevent the attacker from finding out details about its source code, but these are – by design – present in a public GitHub repository. Seemingly in this case I might just as well run the app in development mode, at least if there is an unexpected bug a user finds out they will be able to give me a more detailed information that might help me fix this bug?

If the reasoning behind the documentation warnings I quoted above is correct, then this would mean to me that developing open-sourced webapps is itself a security vulnerability! Because if allowing an attacker to find some details abou the source code is such a big deal, then how worse must it be to simply give out the source code to anyone interested! And yet, AFAIK, open source is not considered an invalid and inherently insecure model.

What am I missing here? Why should detailed exception pages be disabled?

MsrpPriceCalculator exception after upgrade to 2.3.1


Preconditions (*)

After performing an upgrade to the last magento version, I faced the following message: 1. 2.3.0 to 2.3.1

Steps to reproduce (*)

  1. Perform Magento upgrade from 2.3.0 to 2.3.1

Expected result (*)

  1. Upgrade occurs normally. 2.

Actual result (*)

  1. MsrpPriceCalculator exception

See the full message:

{"0":"Missing required argument $  msrpPriceCalculators of Magento\Msrp\Pricing\MsrpPriceCalculator.","1":"<pre>#1 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Msrp\Pri...', array(array('msrpPriceCalcula...', NULL, true, NULL)), array()) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Dynamic\/Developer.php:59]\n#2 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Msrp\Pri...') called at [vendor\/magento\/framework\/ObjectManager\/ObjectManager.php:70]\n#3 Magento\Framework\ObjectManager\ObjectManager->get('Magento\Msrp\Pri...') called at [vendor\/magento\/module-msrp\/Helper\/Data.php:82]\n#4 Magento\Msrp\Helper\Data->__construct(&Magento\Framework\App\Helper\Context#00000000533b03ea0000000034d54959#, &Magento\Store\Model\StoreManager#00000000533b03d70000000034d54959#, &Magento\Msrp\Model\Product\Options\Proxy#00000000533b07360000000034d54959#, &Magento\Msrp\Model\Msrp#00000000533b07340000000034d54959#, &Magento\Msrp\Model\Config#00000000533b07720000000034d54959#, &Magento\Directory\Model\PriceCurrency#00000000533b01ea0000000034d54959#, &Magento\Catalog\Model\ProductRepository\Interceptor#00000000533b013f0000000034d54959#, NULL) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php:116]\n#5 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Msrp\Hel...', array(&Magento\Framework\App\Helper\Context#00000000533b03ea0000000034d54959#, &Magento\Store\Model\StoreManager#00000000533b03d70000000034d54959#, &Magento\Msrp\Model\Product\Options\Proxy#00000000533b07360000000034d54959#, &Magento\Msrp\Model\Msrp#00000000533b07340000000034d54959#, &Magento\Msrp\Model\Config#00000000533b07720000000034d54959#, &Magento\Directory\Model\PriceCurrency#00000000533b01ea0000000034d54959#, &Magento\Catalog\Model\ProductRepository\Interceptor#00000000533b013f0000000034d54959#, NULL)) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Dynamic\/Developer.php:66]\n#6 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Msrp\Hel...') called at [vendor\/magento\/framework\/ObjectManager\/ObjectManager.php:70]\n#7 Magento\Framework\ObjectManager\ObjectManager->get('Magento\Msrp\Hel...') called at [vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php:160]\n#8 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(array('instance' => 'Magento\Msrp\Hel...'), 'Magento\Msrp\Hel...', NULL, 'msrpData', 'Magento\Advanced...') called at [vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php:246]\n#9 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\Advanced...', array(array('context', 'Magento\Framewor...', true, NULL), array('cart', 'Magento\Advanced...', true, NULL), array('products', 'Magento\Advanced...', true, NULL), array('catalogConfig', 'Magento\Catalog\...', true, NULL), array('session', 'Magento\Framewor...', true, NULL), array('customerSession', 'Magento\Customer...', true, NULL), array('checkoutSession', 'Magento\Checkout...', true, NULL), array('checkoutCart', 'Magento\Checkout...', true, NULL), array('catalogData', 'Magento\Catalog\...', true, NULL), array('importFactory', 'Magento\Advanced...', true, NULL), array('stockRegistry', 'Magento\CatalogI...', true, NULL), array('stockHelper', 'Magento\CatalogI...', true, NULL), array('productFactory', 'Magento\Catalog\...', true, NULL), array('quoteItemFactory', 'Magento\Quote\Mo...', true, NULL), array('messageManager', 'Magento\Framewor...', true, NULL), array('priceCurrency', 'Magento\Framewor...', true, NULL), array('msrpData', 'Magento\Msrp\Hel...', true, NULL), array('groupManagement', 'Magento\Customer...', true, NULL)), array('cart' => array('instance' => 'Magento\Advanced...'), 'catalogConfig' => array('instance' => 'Magento\Catalog\...'), 'session' => array('instance' => 'Magento\Customer...'), 'customerSession' => array('instance' => 'Magento\Customer...'), 'checkoutSession' => array('instance' => 'Magento\Checkout...'), 'scopeConfig' => array('instance' => 'Magento\Framewor...'))) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Dynamic\/Developer.php:34]\n#10 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Advanced...', array(array('context', 'Magento\Framewor...', true, NULL), array('cart', 'Magento\Advanced...', true, NULL), array('products', 'Magento\Advanced...', true, NULL), array('catalogConfig', 'Magento\Catalog\...', true, NULL), array('session', 'Magento\Framewor...', true, NULL), array('customerSession', 'Magento\Customer...', true, NULL), array('checkoutSession', 'Magento\Checkout...', true, NULL), array('checkoutCart', 'Magento\Checkout...', true, NULL), array('catalogData', 'Magento\Catalog\...', true, NULL), array('importFactory', 'Magento\Advanced...', true, NULL), array('stockRegistry', 'Magento\CatalogI...', true, NULL), array('stockHelper', 'Magento\CatalogI...', true, NULL), array('productFactory', 'Magento\Catalog\...', true, NULL), array('quoteItemFactory', 'Magento\Quote\Mo...', true, NULL), array('messageManager', 'Magento\Framewor...', true, NULL), array('priceCurrency', 'Magento\Framewor...', true, NULL), array('msrpData', 'Magento\Msrp\Hel...', true, NULL), array('groupManagement', 'Magento\Customer...', true, NULL)), array('cart' => array('instance' => 'Magento\Advanced...'), 'catalogConfig' => array('instance' => 'Magento\Catalog\...'), 'session' => array('instance' => 'Magento\Customer...'), 'customerSession' => array('instance' => 'Magento\Customer...'), 'checkoutSession' => array('instance' => 'Magento\Checkout...'), 'scopeConfig' => array('instance' => 'Magento\Framewor...'))) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Dynamic\/Developer.php:59]\n#11 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Advanced...') called at [vendor\/magento\/framework\/ObjectManager\/ObjectManager.php:70]\n#12 Magento\Framework\ObjectManager\ObjectManager->get('Magento\Advanced...') called at [vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php:160]\n#13 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(array('instance' => 'Magento\Advanced...'), 'Magento\Advanced...', NULL, 'checkoutData', 'Magento\Advanced...') called at [vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php:246]\n#14 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\Advanced...', array(array('cart', 'Magento\Checkout...', true, NULL), array('messageFactory', 'Magento\Framewor...', true, NULL), array('eventManager', 'Magento\Framewor...', true, NULL), array('checkoutData', 'Magento\Advanced...', true, NULL), array('optionFactory', 'Magento\Catalog\...', true, NULL), array('wishlistFactory', 'Magento\Wishlist...', true, NULL), array('quoteRepository', 'Magento\Quote\Ap...', true, NULL), array('storeManager', 'Magento\Store\Mo...', true, NULL), array('localeFormat', 'Magento\Framewor...', true, NULL), array('messageManager', 'Magento\Framewor...', true, NULL), array('productTypeConfi...', 'Magento\Catalog\...', true, NULL), array('productConfigura...', 'Magento\Catalog\...', true, NULL), array('customerSession', 'Magento\Customer...', true, NULL), array('stockRegistry', 'Magento\CatalogI...', true, NULL), array('stockState', 'Magento\CatalogI...', true, NULL), array('stockHelper', 'Magento\CatalogI...', true, NULL), array('productRepositor...', 'Magento\Catalog\...', true, NULL), array('quoteFactory', 'Magento\Quote\Mo...', true, NULL), array('itemFailedStatus', NULL, false, 'failed_sku'), array('data', NULL, false, array()), array('serializer', 'Magento\Framewor...', false, NULL), array('searchCriteriaBu...', 'Magento\Framewor...', false, NULL)), array()) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Dynamic\/Developer.php:34]\n#15 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Advanced...', array(array('cart', 'Magento\Checkout...', true, NULL), array('messageFactory', 'Magento\Framewor...', true, NULL), array('eventManager', 'Magento\Framewor...', true, NULL), array('checkoutData', 'Magento\Advanced...', true, NULL), array('optionFactory', 'Magento\Catalog\...', true, NULL), array('wishlistFactory', 'Magento\Wishlist...', true, NULL), array('quoteRepository', 'Magento\Quote\Ap...', true, NULL), array('storeManager', 'Magento\Store\Mo...', true, NULL), array('localeFormat', 'Magento\Framewor...', true, NULL), array('messageManager', 'Magento\Framewor...', true, NULL), array('productTypeConfi...', 'Magento\Catalog\...', true, NULL), array('productConfigura...', 'Magento\Catalog\...', true, NULL), array('customerSession', 'Magento\Customer...', true, NULL), array('stockRegistry', 'Magento\CatalogI...', true, NULL), array('stockState', 'Magento\CatalogI...', true, NULL), array('stockHelper', 'Magento\CatalogI...', true, NULL), array('productRepositor...', 'Magento\Catalog\...', true, NULL), array('quoteFactory', 'Magento\Quote\Mo...', true, NULL), array('itemFailedStatus', NULL, false, 'failed_sku'), array('data', NULL, false, array()), array('serializer', 'Magento\Framewor...', false, NULL), array('searchCriteriaBu...', 'Magento\Framewor...', false, NULL)), array()) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Dynamic\/Developer.php:59]\n#16 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Advanced...') called at [vendor\/magento\/framework\/ObjectManager\/ObjectManager.php:70]\n#17 Magento\Framework\ObjectManager\ObjectManager->get('Magento\Advanced...') called at [vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php:160]\n#18 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(array('instance' => 'Magento\Advanced...'), 'Magento\Advanced...', NULL, 'cart', 'Magento\Advanced...') called at [vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php:246]\n#19 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\Advanced...', array(array('cart', 'Magento\Advanced...', true, NULL)), array()) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Dynamic\/Developer.php:34]\n#20 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Advanced...', array(array('cart', 'Magento\Advanced...', true, NULL)), array()) called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Dynamic\/Developer.php:59]\n#21 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Advanced...') called at [vendor\/magento\/framework\/ObjectManager\/ObjectManager.php:70]\n#22 Magento\Framework\ObjectManager\ObjectManager->get('Magento\Advanced...') called at [vendor\/magento\/framework\/Event\/ObserverFactory.php:33]\n#23 Magento\Framework\Event\ObserverFactory->get('Magento\Advanced...') called at [vendor\/magento\/framework\/Event\/Invoker\/InvokerDefault.php:58]\n#24 Magento\Framework\Event\Invoker\InvokerDefault->dispatch(array('instance' => 'Magento\Advanced...', 'name' => 'magento_advanced...'), &Magento\Framework\Event\Observer#00000000533b07490000000034d54959#) called at [vendor\/magento\/module-staging\/Model\/Event\/Manager.php:97]\n#25 Magento\Staging\Model\Event\Manager->dispatch('view_block_abstr...', array('block' => &Magento\Framework\View\Element\Template#00000000533b061e0000000034d54959#)) called at [generated\/code\/Magento\/Staging\/Model\/Event\/Manager\/Proxy.php:95]\n#26 Magento\Staging\Model\Event\Manager\Proxy->dispatch('view_block_abstr...', array('block' => &Magento\Framework\View\Element\Template#00000000533b061e0000000034d54959#)) called at [vendor\/magento\/framework\/View\/Element\/AbstractBlock.php:653]\n#27 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor\/magento\/framework\/View\/Result\/Page.php:249]\n#28 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#00000000533b02360000000034d54959#) called at [vendor\/magento\/framework\/View\/Result\/Layout.php:171]\n#29 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#00000000533b02360000000034d54959#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#30 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#00000000533b02360000000034d54959#)) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#31 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#00000000533b02360000000034d54959#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#32 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#00000000533b02360000000034d54959#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated\/code\/Magento\/Framework\/View\/Result\/Page\/Interceptor.php:130]\n#33 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#00000000533b02360000000034d54959#) called at [vendor\/magento\/framework\/App\/Http.php:140]\n#34 Magento\Framework\App\Http->launch() called at [generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php:24]\n#35 Magento\Framework\App\Http\Interceptor->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:258]\n#36 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#00000000533b02340000000034d54959#) called at [index.php:39]\n<\/pre>","url":"\/","script_name":"\/index.php"} 

I found the same issue reported by anoter user here: MsrpPriceCalculator Exception

Have you guys faced this issue before?

Null Reference Exception in Global asax sharepoint

I am overriding our global asax page where i want our users who are in a particular sharepoint list/ sharepoint group be redirected to the 2fa page (third party provided) every time the access sharepoint site. this is my code however i get a null reference exception error when i check the uls logs. this is a snippet of my code, this is the entry point:

public void Application_BeginRequest(object sender, EventArgs e)         {             //this.Context.Response.Redirect("https://www.google.com");             if (SPContext.Current.Web.IsCurrentUserMemberOfGroup(Convert.ToInt32(WebConfigurationManager.AppSettings.Get("2FAAdminGroup"))))             {                 if (this.Context.Session["jwt"] == null)                 {                     this.Context.Session["jwt"] = "continue";                     string text = SPContext.Current.Web.CurrentUser.LoginName;                     if (text.Contains("\"))                     {                         text = text.Substring(text.IndexOf("\") + 1);                     }                     this.r1 = this.Status_Check(text);                     if (string.IsNullOrEmpty(this.r1))                     {                         string url = this.Deregister_Check(text);                         this.Context.Response.Redirect(url);                     }                     this.Context.Response.Redirect(this.r1);                 }                 else                 {                     string a = this.Context.Session["jwt"].ToString();                     if (a == "continue")                     {                         string text2 = HttpContext.Current.Request.QueryString["jwt"];                         if (text2 != null && text2 != "")                         {                             this.Context.Session["jwt"] = text2;                         }                         else                         {                             this.Context.Session["jwt"] = "continue";                             string text = SPContext.Current.Web.CurrentUser.LoginName;                             if (text.Contains("\"))                             {                                 text = text.Substring(text.IndexOf("\") + 1);                             }                             this.r1 = this.Status_Check(text);                             if (string.IsNullOrEmpty(this.r1))                             {                                 string url2 = this.Deregister_Check(text);                                 this.Context.Response.Redirect(url2);                             }                             this.Context.Response.Redirect(this.r1);                         }                     }                 }             }              } 

basically what it first does is it gets the data from the web config. but i am getting errors on that part i think here “SPContext.Current.Web.IsCurrentUserMemberOfGroup(Convert.ToInt32(WebConfigurationManager.AppSettings.Get(“2FAAdminGroup”)))”

i am new to this so can somebody shed some light on what method to use for this?