This is the first time I am deploying MVC web application in Amazon S3 server.
And website is been loaded in browser but when I click on register button it is throwing error.
I can see only difference is
My application is named as reporting.e-tale.co.uk and Domain is set up as dashboard.e-tale.co.uk, so I made a folder in live as dashboard.e-tale.co.uk and copied my files. It is working fine in local dont know the reason why it is throwing error.
Please correct me If I am doing any thing wrong.
I am not sure what details to provide. I will provide you more details if it is difficult to suggest solution.
Thanks
Server Error in '/' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
reporting.e_tale.co.uk.Controllers.AccountController.Register() +255
lambda_method(Closure , ControllerBase , Object[] ) +78
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +263
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters) +38
System.Web.Mvc.<>c_DisplayClass15.b_12() +128
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) +826106
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func
1 continuation) +826106
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) +826106
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList
1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +314
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +825328
System.Web.Mvc.Controller.ExecuteCore() +159
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335
System.Web.Mvc.<>c_DisplayClassb.b_5() +62
System.Web.Mvc.Async.<>c_DisplayClass1.b_0() +20
System.Web.Mvc.<>c_DisplayClasse.b_d() +54
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1008
Account controller (Register)
/// <summary>
/// GET: /Account/Register
/// Action account Register.
/// </summary>
/// <returns></returns>
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult Register()
{
var myViewData = new RegisterForm
{
Person = new Person
{
CreatedAt = DateTime.Now,
AppellationId =
_appellationRepository.GetAppellationByDescription(
"Mr").Id,
CountryId =
_countryRepository.GetCountryByName(
"United Kingdom").Id,
CorporationId = _corporationRepository.GetCorporationByName(
"Samsung").Id
//ManufacturerId = _manufacturerRepository.GetManufacturerByName(
//"Samsung").Id
},
User =
new User
{
CreatedAt = DateTime.Now,
Guid = Guid.NewGuid().ToString("N")
}
};
myViewData.Appellations = new SelectList(_appellationRepository.GetAllAppellations().ToList(), "Id",
"Description", myViewData.Person.AppellationId);
myViewData.Countries = new SelectList(_countryRepository.GetAllCountries().ToList(), "Id", "Name",
myViewData.Person.CountryId);
myViewData.Corporations = new SelectList(_corporationRepository.GetAllcorporations().ToList(), "Id",
"Description", myViewData.Person.CorporationId);
//myViewData.Manufacturers = new SelectList(_manufacturerRepository.GetAllManufacturers().ToList(),"Id",
// "Description",myViewData.Person.ManufacturerId);
myViewData.PasswordLength = MembershipService.MinPasswordLength;
return View(myViewData);
}