the project is completely on my local drive. i made the project afresh and it worked fine. dont know what possibly could have caused the issue. but anyways, below is the complete stackTrace[SecurityException: That assembly does not allow partially trusted callers.]
ApplicationBasePage..ctor() +0
List_Company..ctor() +25
ASP.list_company_aspx..ctor() +29
__ASP.FastObjectFactory_app_web_m7l1bvyn.Create_ASP_list_company_aspx() +38
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +58
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +113
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +32
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +62
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +294
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +146