Site bombs on open
Site bombs on open
I have changed out the database connection string. This connection string works from other applications, but not from able commerce. The site won't open as this is bombing on a reference to an external library. I have the source code and still can't get to the line blowing up. I can't change this back as the encryption stuff is gone. I am going to hunt thru some of the exception references to see if I can figure this out, but would not mind any help on this. Exception is below, any ideas?
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="CommerceBuilder"
StackTrace:
at CommerceBuilder.Utility.ErrorMessage.Save()
at CommerceBuilder.Utility.Logger.a(String A_0, LogMessageType A_1, Exception A_2, Type A_3)
at CommerceBuilder.Utility.Logger.Write(String message, LogMessageType messageType, Exception ex)
at CommerceBuilder.Utility.Logger.Error(String message, Exception ex)
at CommerceBuilder.Utility.MaintenanceWorker.RunMaintenance()
at CommerceBuilder.Services.AbleCommerceHttpModule.a(Boolean A_0)
at CommerceBuilder.Services.AbleCommerceHttpModule.a()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
System.NullReferenceException was unhandled
Message: Object reference not set to an instance of an object.
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="CommerceBuilder"
StackTrace:
at CommerceBuilder.Utility.ErrorMessage.Save()
at CommerceBuilder.Utility.Logger.a(String A_0, LogMessageType A_1, Exception A_2, Type A_3)
at CommerceBuilder.Utility.Logger.Write(String message, LogMessageType messageType, Exception ex)
at CommerceBuilder.Utility.Logger.Error(String message, Exception ex)
at CommerceBuilder.Utility.MaintenanceWorker.RunMaintenance()
at CommerceBuilder.Services.AbleCommerceHttpModule.a(Boolean A_0)
at CommerceBuilder.Services.AbleCommerceHttpModule.a()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
System.NullReferenceException was unhandled
Message: Object reference not set to an instance of an object.
Steve Portock
- Shopping Cart Admin
- AbleCommerce Admin
- Posts: 3055
- Joined: Mon Dec 01, 2003 8:41 pm
- Location: Vancouver, WA
- Contact:
Re: Site bombs on open
Hello,
Confirm that the directory you've installed to is setup as an application in IIS.
Confirm that the directory you've installed to is setup as an application in IIS.
Re: Site bombs on open
Mike, that's not it, I only changed the connection string in the database config file, nothing else, it ran fine then before that change. Its trying to access something that is not there, I need to be able to get to the line blowing up here. it won't tell me this. I have custom code to do for clients and need to be able to run this in debug mode, I could do all this before.
Steve Portock
Re: Site bombs on open
It is set up in iis, it bombs when trying to navigate to the default page. I need to know what is going on there, what fires first in this app? Since the default page has no page load event handler to start on debug with, how do you figure out what is going on here?
Steve Portock
- Shopping Cart Admin
- AbleCommerce Admin
- Posts: 3055
- Joined: Mon Dec 01, 2003 8:41 pm
- Location: Vancouver, WA
- Contact:
Re: Site bombs on open
Hello,
Perhaps there is a typo in the connection string you entered and it's left some code unclosed/unopened? Double check the connection string.
Perhaps there is a typo in the connection string you entered and it's left some code unclosed/unopened? Double check the connection string.
Re: Site bombs on open
Can't recommend enough how valuable it is to back up initial site deployment, and then every change after that. Use source control - SVN (Subversion) is free and very capable. ALWAYS deploy and update via source control.I can't change this back as the encryption stuff is gone.
Here's a sample (working) App_Data/database.config:
Code: Select all
<connectionStrings>
<add name="AbleCommerce"
connectionString="Server=localhost; Database=AbleCommerceDB;Uid=ableuser;Pwd=p@ssw0rd;"
providerName="System.Data.SqlClient" />
</connectionStrings>
Nick Cole
http://www.ethofy.com
http://www.ethofy.com
Re: Site bombs on open
No, exact connection string works in a completely separate winforms application, and i can use the same credentials to login via sql enterprise mgr. I will try the old connection string. I still have to be able to use other ones, so this still has to be resolved.
Steve Portock
Re: Site bombs on open
Are you dealing with a database restored from backups? SQL login and database user are different things. A login might work for a SQL connection but not a database on the same server/instance. Run sp_change_users_login against the db to be sure.
Nick Cole
http://www.ethofy.com
http://www.ethofy.com
Re: Site bombs on open
No, what i did was take the able db that comes with it, and connect my sql ent mgr to it, i set this user up to do whatever it wants to, its admin level. I checked perms and other things. I need to know what is happening when the app loads. If you have the source code you should be able to step thru this. I can't even get to what is going on in the start up before you even see the first page.
Steve Portock
Re: Site bombs on open
Hmm. Setting a breakpoint in Global.asax (Application_BeginRequest) is about as early as you can get involved, I think (http://articles.techrepublic.com.com/51 ... 71721.html). At that point, Able's "Token" object hasn't been instantiated so there is a good chance they haven't been to the db yet. Would it be faster put back the working database and step forward? Does the database user really need full rights?
Nick Cole
http://www.ethofy.com
http://www.ethofy.com
Re: Site bombs on open
Tried that, it never even gets to it. There is something else that runs first in this. Cmon ablecommerce, whats going on here? Please tell me why i can't step thru the source code right from the start. If its a security issue, we can discuss off the board.
Steve Portock
- Shopping Cart Admin
- AbleCommerce Admin
- Posts: 3055
- Joined: Mon Dec 01, 2003 8:41 pm
- Location: Vancouver, WA
- Contact:
Re: Site bombs on open
Hello,
I'm not a developer but I do think our licensing module runs first, so perhaps that's what your running into? Our forums developer Mazhar is gone for the day, but hopefully he'll have an idea for you tomorrow morning.
I'm not a developer but I do think our licensing module runs first, so perhaps that's what your running into? Our forums developer Mazhar is gone for the day, but hopefully he'll have an idea for you tomorrow morning.
Re: Site bombs on open
Thanks Mike, I was suspecting that was the case. I understand the security issues on this, we can go off board on it tomorrow.
Steve Portock
Re: Site bombs on open
Could you please PM me your database.config file with the settings causing the problem.
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: Site bombs on open
It's not likely security related, but something about the connection string.
The actual error is occuring here:
at CommerceBuilder.Utility.MaintenanceWorker.RunMaintenance()
The source for this method is included - so if you were able to set a breakpoint here you could get to it. But this is something that runs at application startup time, so there is a trick that usually works. To trap execution here:
1) You will need to build a debug version of the assembly from your source project. We distribute with release versions that will not have the necessary debug symbols.
2) Make sure you only have one worker process for IIS (no web garden)
3) Reset IIS to make sure the application is not loaded.
4) Access another ASPNET application that runs in the same app pool, so that the IIS worker process is running.
5) Attach the debugger to the IIS worker process, set a breakpoint in MaintenanceWorker.RunMaintenance.
6) Attempt to access the AC application
This may allow you to trap execution and discover the source of the error. Most likely it will confirm something is wrong in setting up the connection. Mazhar might be able to shed additional light once he has the connection string.
The actual error is occuring here:
at CommerceBuilder.Utility.MaintenanceWorker.RunMaintenance()
The source for this method is included - so if you were able to set a breakpoint here you could get to it. But this is something that runs at application startup time, so there is a trick that usually works. To trap execution here:
1) You will need to build a debug version of the assembly from your source project. We distribute with release versions that will not have the necessary debug symbols.
2) Make sure you only have one worker process for IIS (no web garden)
3) Reset IIS to make sure the application is not loaded.
4) Access another ASPNET application that runs in the same app pool, so that the IIS worker process is running.
5) Attach the debugger to the IIS worker process, set a breakpoint in MaintenanceWorker.RunMaintenance.
6) Attempt to access the AC application
This may allow you to trap execution and discover the source of the error. Most likely it will confirm something is wrong in setting up the connection. Mazhar might be able to shed additional light once he has the connection string.
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Re: Site bombs on open
Well i just modified the connection string in the following way for my local store and it worked for me.
You can give a try in this way as well.
Code: Select all
<connectionStrings>
<add name="AbleCommerce"
connectionString="server=MAZHAR\SQLEXPRESS;database=ac7;Integrated Security=true;"
providerName="System.Data.SqlClient" />
</connectionStrings>
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: Site bombs on open
I was not complete in my description of the source of the error. The first error occurs in RunMaintenance, but this error is handled and we attempt to log. The second error occurs in trying to save the log message - this leads to the hard crash.
In both cases, I still suspect the database connection as the root cause.
In both cases, I still suspect the database connection as the root cause.
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.