upgrade web.config troubles

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
12/7/2011 3:07:18 PM
Gravatar
Total Posts 22

upgrade web.config troubles

OS Net3.5 (server is 4.0, but I never completed the mojo upgrade to 4.0)

MS SQL

mojo v 2.3.7.5

I have ben running mojoportal for some time now and completed the upload/upgrade of new releases as they come out.  Each time I have had difficulty in utilizing the latest web.config.  I understand all the custom lines to change (i.e connection string, etc.), but I haven been able to get it to work.  When trying to update and use the new web.config I get this "weve got a problem, beware of sharks 500 internal server error" screen  so I end up sticking with the old web.config to get the site to run.

So here it's upgrade time again and I am still dealing with this but i want to use the current release web.config and upgrade correctly.

When I edit the new web.config I use notepad ++ in a side by side compare and copy and paste over the customer code such as data string, email, configurations, etc.  I have done this over and over to make sure I have no typos, I don't mess with stuff I don't understand (which is most of the file).

I just can't figure out where to look or what to try, but I need to get that new web.config running.  At present, I have completed the upgrade of new files and am using my old web.config again

 

Thanks,

Bob

12/7/2011 3:14:36 PM
Gravatar
Total Posts 18439

Re: upgrade web.config troubles

Hi Bob,

Your connection string and email settings and any other modified settings from the <appSetings section of Web.config should be in user.config then you won't have to worry about those during upgrades because we don't ship a user.config file and this file will not be overwritten.

It is no longer required to maintain the <system.net.mailsettings section in web.config because we aren't using that.

So, about the only thing you should have to migrate from your old web.config to the new one is your custom machinekey.

500 is just a generic error code. To be able to help we need to find out the error details. The Basic Troubleshooting article explains how to do that.

Hope that helps,

Joe

12/7/2011 4:32:35 PM
Gravatar
Total Posts 22

Re: upgrade web.config troubles

Hi Joe. I have been using the user.config as directed, but also retained/duplicated those settings in the web.config, such as the connection string.  Your reply got me thing about a possible conflict, but using the new web.config and only changing the machine key did not work either.

In reading through the basic troubleshooting link you provided, turning off the custom errors did not yeild any data so the web.config must not be loading.  And the most likely cause of this is running 3.5 on a 4.0 server. 

Is is safe to upgrade to 4.0 in my situtation?  I have the newest mojo 3.5 running files with an old web.config.  I think i saw a post about that process and i'll read through that.

 

Thanks

12/7/2011 8:31:09 PM
Gravatar
Total Posts 2239

Re: upgrade web.config troubles

Hi Bob,

Any settings you have in the user.config do not need to be made in the web.config. In fact, any settings you make in the user.config override those in the web.config so the web.config setting has no impact whatsoever.

As for the 500 error, using Failed Request Tracing can help you figure out why the 500 error is occuring.

Is your site a root site or is it in a Virtual Directory?

If all else fails, give me a shout via email at joe (at) i7media (dot) net. If you're willing, I can login to your server and figure out what is going on.

HTH,
Joe D.

12/8/2011 5:50:07 AM
Gravatar
Total Posts 18439

Re: upgrade web.config troubles

Hi Bob,

My guess from everything you have said is that you are running the mojoPortal package for .NET 3.5 under .NET 4. The Web.config file in our package for 3.5 will cause an error under .NET 4 (duplicate section declaration for system.web.extensions). I think at some point you solved it by removing the section declaration from your Web.config which is why you keep having to change back to your old one.

If you are running under .NET 4 the best solution would be to deploy the mojoPortal package for .NET 4, the Web.config file in that package is updated for .NET 4 and the section declaration is not present like it is in the one in our 3.5 package.

The only differences between tha .NET 3.5 and .NET 4 packages of mojoPortal are the files in the /bin folder and the Web.config file. So you could replace those with the files in our .NET 4 package and then you will be running the .NET 4 version of mojoPortal under .NET 4 which is ideal. If something goes wrong you can always restore the files from the 3.5 package.

See related notes in the 9th and 10th items in our FAQ.

Hope that helps,

Joe

12/8/2011 11:19:13 AM
Gravatar
Total Posts 22

Re: upgrade web.config troubles

Both Joes thanks for your help.  I am up and running on .net 4.0.  Even though I don't recall it, I suspect this theory is on the money -

" I think at some point you solved it by removing the section declaration from your Web.config which is why you keep having to change back to your old one."

After uploading the new files the site did take an awfully long time to load the setup/default.aspx which has me a bit puzzled but it ultimately finished and the site is live.

Thanks,

Bob

12/9/2011 2:25:14 PM
Gravatar
Total Posts 2239

Re: upgrade web.config troubles

Hi Joe,

I'm looking at Bob's site because it isn't running properly. The site takes a very long time to load and sporadically errors out with the custom mojoPortal error page. What's got me puzzled is that the log file doesn't provide any details. Here's a snippet:

2011-12-09 12:03:27,535 ERROR 2011-12-09 12:25:36,737 ERROR 2011-12-09 12:36:16,413 ERROR 2011-12-09 12:38:05,892 ERROR 2011-12-09 12:38:48,380 ERROR 2011-12-09 12:54:18,090 INFO

The entries are all on one line and have no detail. I've replaced the web.config with an unaltered version from the release files but that didn't help at all. The user.config doesn't have anything set to change the logging.

The site is on Medium Trust with .NET 4 and a SQL 2008 database. Running the Setup/Default.aspx page works and states that the file and db permissions are correct. It also lists the site version as 2.3.7.5.

I know there's not a lot to go on here, but I can't seem to find any configuration issues. Any ideas? My gut tells me that it is a hosting environment issue.

Thanks,
Joe D.

12/9/2011 2:36:28 PM
Gravatar
Total Posts 18439

Re: upgrade web.config troubles

Hi Joe,

I would try redeploying all of the files from the mojoPortal 2.3.7.5 package for .NET 4 in case something didn't get updated correctly. I know I previously said he only needed to upload the bin folder but in a case with strange erros I would try re-deploying all the files in the package and see if that solves it.

Hope that helps,

Joe

12/9/2011 2:41:21 PM
Gravatar
Total Posts 18439

Re: upgrade web.config troubles

The other thing to try is to disable friendly errors from Web.config and see what error it shows when an error occurs, if the errors are happening often enough to make it happen.

I would also check to see if he is low on allocated disk space.

Hope that helps,

Joe

12/9/2011 3:30:52 PM
Gravatar
Total Posts 2239

Re: upgrade web.config troubles

Well, I redeployed all of the files, didn't work, cussed a bit, disabled friendly errors, just got time outs, cussed some more, and then tried one last thing. I changed the site's AppPool to .NET 3.5 and it worked! Well, at least the site isn't so slow and I can't get it to break. The error log is still not showing any detail.

I'm convinced the host has an issue. Running .net 4 compiled files in a supposedly .net 3.5 application pool doesn't make  sense.

Thanks,
Joe D.

12/12/2011 7:18:18 AM
Gravatar
Total Posts 18439

Re: upgrade web.config troubles

Hi Joe,

I agree it sounds strange. .NET 4 assemblies cannot run under  .NET 3.5 so there must be something mislabelled in their control panel and it must really be using .NET 4.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.