Ajax Control Toolkit not available - any hints?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
2/19/2012 5:04:20 AM
Gravatar
Total Posts 137
When enough isn't

Ajax Control Toolkit not available - any hints?

Hi,

I'm using a couple of controls from the Ajax control toolkit, e.g. ComboBox and Slider. They work fine on my development server, but for some reason they're not available on the production server. No errors, but also just no reaction. I have testet in different browsers with no luck.

I have checked and compared my web.configs, user.configs for any differences with ajax. The web.config contains this line:

<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>

And I use the ajaxToolkit prefix with no errors.

Has anyone got any hint to why it doesn't fire up and work on my production server?

I'm running MojoPortal version 2.3.7.6/MySql with the toolkit in the binfolder and my production server is running in Full Trust mode.

Thanks in advance,

Lars

2/20/2012 6:10:20 AM
Gravatar
Total Posts 18439

Re: Ajax Control Toolkit not available - any hints?

If it works in your dev environment and not in production it is most likely a packaging and deployment problem. Possibly some files are not being deployed.

I would also suggest looking for script errors using the browser dev tools.

2/20/2012 2:49:19 PM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Thanks Joe, and welcome back Cool .. hope you enjoyed the vacation.

I tried to study the script errors. I don't know what it means, but it looks like this:

//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl01$ScriptManager1', 'aspnetForm', ['tctl01$mainContent$ctl01$updpanelsedag','','tctl01$mainContent$ctl01$updpaneldageretur','',... here a lot of stuff that are related to the controls that Ajax control tool kit should be managing ....$mainContent$ctl01$TextBoxSeUgedage',''], 90, 'ctl01');
//]]>
<
I have done some bit-2-bit comparing of the ajaxcontroltoolkit dlls in the bin folder. They are equal between my development and production servers.
I have another site running in very similar production setup and it works. It's the mojoportal version just before: 2.3.7.5. Could there be something changed that influences?
Best regards Lars
2/21/2012 10:54:21 AM
Gravatar
Total Posts 18439

Re: Ajax Control Toolkit not available - any hints?

Hi Lars,

Why not upgrade to the very latest version 2.3.8.1 and see if the problem persists?

Best,

Joe

2/21/2012 11:00:40 AM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Yes, that might be the best idea right now. Are we far from the next release now that I'm going to upgrade anyway?

Thanks for your help,

Lars

2/21/2012 11:54:48 AM
Gravatar
Total Posts 18439

Re: Ajax Control Toolkit not available - any hints?

Hi Lars,

Yes it will be a good while before the next release. My main priorities at the moment are completing my add on product Site Membership Pro, and documenting things from recent releases that ar enot yet documented.

Best,

Joe

2/21/2012 12:15:45 PM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

OK thanks,

I will find a suitable timing very soon to upgrade and post how things goes. So far thanks.

Best regards
Lars

2/21/2012 4:19:58 PM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Hi Joe,

I found the course Smile ..

The difference between my two sites at my webhotel is that the one working well runs in asp.net classic mode and the error occurs on the new site running integrated mode. Once I changed it to run classic mode all the ajax control tools works again.

Now I'm just wondering if there are any downsides running classic mode or anything I can change in webconfig to make it work in integrated mode. I understand integrated mode is a newer way to run your website, but that's about all I know about that Wink.

Best regards

Lars

2/22/2012 7:12:33 AM
Gravatar
Total Posts 18439

Re: Ajax Control Toolkit not available - any hints?

Hi Lars,

That is strange, AjaxControlToolkit should be able to work in either Classic or Integrated app pools. Integrated is the preferred solution but if it works for you using Classic its ok to use Classic. It may be something about your particular hosting.

Note that if you are using .NET 3.5 it needs this in the <pages><tagMapping> of Web.config:

<add tagType="System.Web.UI.ScriptManager" mappedTagType="AjaxControlToolkit.ToolkitScriptManager" />

but this already exists in the Web.config we ship in the 3.5 packages.

Best,

Joe

2/22/2012 7:38:17 AM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

No - I'm using asp.net 4, so no problem with that.

I will go with classic mode for now, but really I have some issues with understanding some of these settings of trustlevel, app pools and a few other things. I have two different setups on two different sites, but at the same server at my webhotel.

My webhotel claims they run medium trust, but Mojoportal systeminformation tells me they are in a full trust enviroment. So I have set them up with the following status:

  1. Site no 1 runs Mojoportal 2.3.7.5/MySql setup as asp.net 4 medium trust classic mode.
    - This site can run Ajax control tool kit, but not neatupload, so I use the ajax fileupload.
    - I can use friendlyurls for custom modules and it works perfect.
  2. Site no 2 runs Mojoportal 2.3.7.6/MySql setup as asp.net 4 full trust now changed to classic mode.
    - This site can now also run Ajax control tool kit, but also neatupload, which is far better.
    - Here I also have developed custom modules and want to use friendly urls, but even though they lie in the MySql table the rewriter can't identify the pages and gives an error.

I have compared the web.configs for the two sites and can't explain why friendly url doesn't work in the second evironment. The blogmodule works fine with friendlyurls, but not the custom modules. I'm suspecting the course to be either full trust setup in a (maybe) medium trust evironment - or something to do with the handler modules etc.

Can you point on any reason?

Best regards - and I'm really thankfull for all your help Smile.

Lars

2/22/2012 8:21:32 AM
Gravatar
Total Posts 18439

Re: Ajax Control Toolkit not available - any hints?

Hi Lars,

For the AjaxToolkit the only other thing I can think of that could be a factor is if your host has a different version of it installed in the GAC on the server and maybe under Integrated it uses the wrong one but under Classic it does not.

I cannot troubleshoot problems in your custom features. The only thing I can suggest is make sute the url mappings are correct under Administration > Advanced Tools > Url Manager.

For Classic you will only be able to use urls that end with .aspx, extensionless urls will not work.

Make sure you are using the Web.config file that shipped with this version of mojoPortal do not try to keep your old one. Copy machine key and any other customizations to the new Web.config

Best,

Joe

2/22/2012 8:33:51 AM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Hi again,

That sounds right about the conflict in GAC.

Regarding the url rewrite I'm using aspx and all settins seem to be right for that. I always use the shipped web.config and go through it thouroughly + it gives me an opportunity to see what has changed since last version.

I understand you can't dig into my custom modules, but the end result is that the urls lye in the table just like e.g. the blog module and all site references are right. I even testet my custom friendly url generator by exchanging it with the mojoportal "new friendly url saver" found in the source code. Same result. And it still works when I put the table content into my site no 1.

Could it be that I should change back to running medium trust? Would that effect the url rewriter in any way?

Sorry for all the stupid questions. Please just stop me if it's getting too far. But I also have to say that I'm extremely happy with  Mojoportal in general - it's an awasome CMS. I can't find anything where you in such an elegant way can mix standard and custom functionality. Thanks for that ..

Best regards

Lars

2/22/2012 8:42:10 AM
Gravatar
Total Posts 18439

Re: Ajax Control Toolkit not available - any hints?

Hi Lars,

I can't think of anything that would make the url-rewriter not work based on trust level. If it works for the built in features then it is working in general.

I don't know what you mean by:

And it still works when I put the table content into my site no 1.

Best,

Joe

2/22/2012 8:49:18 AM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Hi

Site 1 is the site that runs medium trust. Site 2 is the one having trouble:

<-- from previos post:

Site no 1 runs Mojoportal 2.3.7.5/MySql setup as asp.net 4 medium trust classic mode. - This site can run Ajax control tool kit, but not neatupload, so I use the ajax fileupload. - I can use friendlyurls for custom modules and it works perfect

Site no 2 runs Mojoportal 2.3.7.6/MySql setup as asp.net 4 full trust now changed to classic mode. - This site can now also run Ajax control tool kit, but also neatupload, which is far better. - Here I also have developed custom modules and want to use friendly urls, but even though they lie in the MySql table the rewriter can't identify the pages and gives an error.

-->

But let me try some more digging ... thanks for your help so far

2/22/2012 8:51:18 AM
Gravatar
Total Posts 18439

Re: Ajax Control Toolkit not available - any hints?

If an error happens then post the stack trace and maybe that will provide a clue.

Best,

Joe

2/22/2012 9:53:22 AM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Hi again:

These are the data fields from mp_FriendlyUrls I use:

SiteID: 1

FriendlyUrl: nagoya-womens-marathon.aspx

RealUrl:  ~/race.aspx?pageid=11&mid=20&id=1307

IsPattern: 0

and then 3 guids, where the siteguid is checked to be right.

Gives this error and stacktrace:

2012-02-22 16:41:58,758 ERROR 94.145.1.132 - da-DK - /nagoya-womens-marathon.aspx - mojoPortal.Web.PageNotFoundHttpModule - Referrer(none)  PageNotFoundHttpModule handled error. System.Web.HttpException (0x80004005): The file '/race.aspx' does not exist.    at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)    at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)    at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)    at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)    at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)    at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)    at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)    at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)    at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Hope that can give a clue of some kind?

Best regards

Lars

2/22/2012 10:14:09 AM
Gravatar
Total Posts 18439

Re: Ajax Control Toolkit not available - any hints?

That error indicates that url re-writing is working and mapping to your /race.aspx page but it does not exist in the root of the site.

Hope that helps,

Joe

2/22/2012 10:25:36 AM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Okay. Nice that you can see the re-writer works.

I do have a page /race.aspx, but it has been made through mojoportal, so behind that is another one called /default.aspx?pageid=11. I have turned of canonical urls to ensure I can use that page for many dynamic pages with parameters. The same pages that I now want to give some friendly urls.

Do you have to create the page "physically"? And if you do, do you then need to move the code from the ascx-modules to that page?

Best regards

Lars

2/22/2012 10:35:56 AM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Hi Laughing

I just made an interesting discovery:

If I make a "physical" page /race.aspx in the root folder and copy the content from the Default.aspx except the codebehind relation, then it suddenly loads all my modules attached to the mojoportal page /race,aspx and shows the friendly url SmileLaughing.

The code in the new /race.aspx page looks like this:

<%

@Pagelanguage="c#"MasterPageFile="~/App_MasterPages/layout.Master"StylesheetTheme=""AutoEventWireup="false"Inherits="mojoPortal.Web.UI.CmsPage" %>

<%

-- @ OutputCache Duration="120" VaryByParam="*"  --%>

<

asp:ContentContentPlaceHolderID="leftContent"ID="MPLeftPane"runat="server"></asp:Content>

<

asp:ContentContentPlaceHolderID="mainContent"ID="MPContent"runat="server"></asp:Content>

<

asp:ContentContentPlaceHolderID="rightContent"ID="MPRightPane"runat="server"></asp:Content>

<

asp:ContentContentPlaceHolderID="pageEditContent"ID="MPPageEdit"runat="server"></asp:Content>

Are there any conflicts supposed to happen with Default.aspx here? - or can I continue with this solution?

Best regards

Lars

2/22/2012 11:08:16 AM
Gravatar
Total Posts 18439

Re: Ajax Control Toolkit not available - any hints?

You should not be mapping friendly urls to anything except for physical pages for the real url, you cannot point it to another friendly url

Best,

Joe

2/22/2012 11:18:51 AM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Hi

So that was the trick here. Never rewrite to another friendly url (which also are the Mojoportal pages). I think I'm on the right track now.

Thanks so much for all your answers and all your patience. It makes a lot of difference here. We look forward to soon launc this new site along with the other mojoportal based sites we already have in place.

Thanks, thanks, thanks,

Lars

2/24/2012 9:08:30 AM
Gravatar
Total Posts 137
When enough isn't

Re: Ajax Control Toolkit not available - any hints?

Hi

Just a follow up comment:

I finally got url-rewrite working for dynamic pages. This is my approach:

1. Ensure in your user.config to add this line in order to get all your pages indexed in google

< addkey="AutomaticallyAddCanonicalUrlToCmsPages"value="false" />

2. Add the pages in MojoPortal, that you want to become pages with dynamic content. It could be in the format /mystuff.aspx

3. Develop your custom ascx modules for each page that generates dynamic stuff with e.g. query parameters like id=zzz to differentiate each of the dynamic pages

4. Start making it work without friendly urls.

5. Then add code to project that generates rows with friendly urls in the mp_FriendlyUrl table. Here you should make the real url have this format: ~/Default.aspx?pageid=xx&mid=yy&id=zzz. The pageid here equals to that of the /mystuff.aspx page. mid is the moduleid of the core module that generates your dynamic stuff.

Then you're done Laughing .. and can create thousands of pages without adding them manually. Of course you need to be able to do some minimum coding.

Just if anyone could benefit from what I experienced.

Best regards
Lars

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