We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Server Farm- can't find license

Hi, we just moved out ASP.Net 3.5 site to a web farm, the site files are on a fileserver share, and two IIS servers are load balanced.

I have the following code in the global.asax and the .lic file is in the bin folder along with aspose.dll:

protected override void Application_Start(object sender, EventArgs e)

{

base.Application_Start(sender, e);

Aspose.Cells.License license = new Aspose.Cells.License();

license.SetLicense("Aspose.Cells.lic");

}

I get the following error:

[FileNotFoundException: Cannot find license 'Aspose.Cells.lic'.]
،.㥥.㦀(String 㥵, Assembly 㦁) +709
،.㥥.㥴(String 㥵, Assembly 㥶) +335
Global.Application_Start(Object sender, EventArgs e) +57

[HttpException (0x80004005): Cannot find license 'Aspose.Cells.lic'.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +4174081
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +205
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +336
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382

[HttpException (0x80004005): Cannot find license 'Aspose.Cells.lic'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11305670
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4342340

Hi,

Thanks for your posting.

You need to give the path of your Bin folder. Suppose, your Bin folder is at this location C:\Web\Bin, then your code should look like this.


license.SetLicense(@“C:\Web\Bin\Aspose.Cells.lic”);

If you want to programmatically get the path of your bin folder. Then use Server.MapPath() method.