LLBLGen licence

Posts   
 
    
critto
User
Posts: 4
Joined: 24-Nov-2009
# Posted on: 24-Nov-2009 11:47:54   

Hi,

I am developing a proof of concept and have just released a version online. The online version seems to not connect to my database. Is it possible to host a site using the demo version, or will the licencing only work locally??

Cheers,

Hamish.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 24-Nov-2009 12:51:01   

Licensing is for the Designer, and the generated code will work anyway.

Having said so, please explain your database connection issue in more details.

critto
User
Posts: 4
Joined: 24-Nov-2009
# Posted on: 24-Nov-2009 13:30:16   

Hi Walaa,

Basically, I'm using the .net membership provider and the site is working. When I go to a page which loads records from my LLBLGen DAL, I get an error with the following stack trace:

[NullReferenceException: Object reference not set to an instance of an object.] PatientDesk.UI.MVC.Models.Repository.GetPatient(String code) +85 PatientDesk.UI.MVC.Controllers.HomeController..ctor() +92

[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86 System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230 System.Activator.CreateInstance(Type type, Boolean nonPublic) +67 System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(Type controllerType) +82

[InvalidOperationException: An error occurred while creating a controller of type 'PatientDesk.UI.MVC.Controllers.HomeController'. If the controller doesn't have a controller factory, ensure that it has a parameterless public constructor.] System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(Type controllerType) +188 System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +66 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +125 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +54 System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

It works on my local machine, so if LLBLGen works with the demo licence then it must be my db settings. I'll double check them. Are there any tricky dependencies I should know about for releasing??

Cheers,

Critto.

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 24-Nov-2009 18:47:36   

It doesn't look like a db connection error, what leads you to think that it might be?

Matt

critto
User
Posts: 4
Joined: 24-Nov-2009
# Posted on: 24-Nov-2009 23:11:30   

Hi Matt,

I hooked up my local site to the online database and my request failed when it tried to load data. That's why I think it's a db issue. I'm finding it difficult to debug because from my home pc, I'm getting denied a cross domain request to my host.

My application is using the microsoft membership provider and logs in fine, the membership tables are in the same db as all other data.

I can log in using the microsoft provider but the hit for data in the error message post is when I start loading data from my llblgen DAL. It works fine locally, but the issue occurs when I upload the site.

I'm a noobie at LLBLGen so I'm not sure where to start. I just migrated what I'm doing from the .net Entity Framework and it worked fine on that, so I've obviously messed up somewhere in implementing llblgen or configuring. The data I'm querying is in the database - i've checked. I can log on to the database from sql server manager so the conn strings are all fine. It's an asp.net MVC app. Could be the setup of my web host.. it's webhost4life.com. Other than that I've got no idea at this point.

Any tips??

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 25-Nov-2009 04:53:26   

Hi Critto,

So far I understand this: - You are using ASP.Net MVC - Your app works ok in the dev machine - Your app doesn't work in production - Your db server is running and ready

From that, and if that is a database connection issue, the changes are that:

A. The connection string in the web.config file is incorrect. Please review that all the values are correct (server, catalog, user, etc)

B. The database name (catalog name) on the hosting machine is different to the catalog name you used in the dev machine. If that is the case, you must use Catalog name overwriting.

C. The schema is different in the hosting machine. For instance, your in your dev you use "dbo" and in production you use "user34252". If that is the case (and that is common in 3rd party hosting) you should use Schema name overwriting.

If the error persists you should try to connect from your dev machine to your production database to see if the app can connect. It should if the webhost4life.com guys gives you a cross-domain connection permission.

David Elizondo | LLBLGen Support Team