C# Asp page Errors out just before protected override void OnLoad(EventArgs e)
using System;
using System.Collections.Generic;
using TDCI.BuyDesign.Configurator.Engine.RuleEngine;
using TDCI.BuyDesign.Configurator.Web.Views.Base;
using TDCI.Common.Collections;
using Infor.Enhancements.RUR.FreightLTL.RateQuoteWebRef;
namespace Infor.Enhancements.RUR.FreightLTL
{
public partial class RUR_FreightLTL : ApplinkView
{
private string _address = string.Empty;
private string _city = string.Empty;
private string _state = string.Empty;
private string _zip = string.Empty;
#region Onload
protected override void OnLoad(EventArgs e)
{
RateQuoteService client = new RateQuoteWebRef.RateQuoteService();
RateQuoteRequest request = new RateQuoteRequest();
////////////////////////////////////////////////////////////////
Server Error in '/' Application.
Parameter can not be null!
Parameter name: pageIndex
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.ArgumentException: Parameter can not be null!
Parameter name: pageIndex
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Parameter can not be null!
Parameter name: pageIndex]
TDCI.BuyDesign.Configurator.Web.Utilities.<>c__DisplayClass2.<.ctor>b__0() +92
TDCI.BuyDesign.Configurator.Web.Utilities.QueryStringParameterParser.ParseParameters(NameValueCollection queryParams) +228
TDCI.BuyDesign.Configurator.Web.Views.Base.ApplinkView.InitializeMemberVariablesFromQueryString() +462
TDCI.BuyDesign.Configurator.Web.Views.Base.ApplinkView.OnInit(EventArgs e) +114
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
Version Information: Microsoft .NET Framework Version:2.0.50727.8794; ASP.NET Version:2.0.50727.8794
What I have tried:
Must run Visual Studio Projects from C drive. User does not have permission to run on Shared drives (like "V").
To simulate interation with Web API:
1. Run ruleset on test server.
2. At the point of executing the Web app link.
a. Start web debug (F12 on browser)
b. Click Network tab
c. Toggle green arrow to start capture
d. Click the AppLink button and save the URL
Example
/BuyDesign/Configurator/AppLinks/RUR_FreightLTL.aspx?Address=1051 Bloomfield
Rd&City=Bardston&State=KY&ZipCode=40004&SkidString= :125,96,10,24,249&
sessionUniqueKey=44b93067-3d5f-4f70-b0b4-03015f3ef2d2&pageIndex=1&screenIndex=4&optionIndex=5&displayMode=0
e. Submit everything from the beginning of "sessionUniqueKey ... " to any local host that needs data.
Notice variables "Address = " previously an function capture all those variables. Now they are sent from the app link.
3. Run (double click) the Microsoft Visual Studio Solution file
4. Click Start debug