This is a migrated thread and some comments may be shown as answers.

Publish issue with Telerik MVC 2 Application

16 Answers 129 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kyle Pike
Top achievements
Rank 1
Kyle Pike asked on 03 Sep 2010, 07:21 PM
Hi,

Newest issue: i created a new web application using the "Telerik MVC 2 Web Application" template. Everything works extremely well, except when i went to publish the application, it's doing two things: generating javascript errors for "object expected" and none of our telerik objects are loading the proper (or any) skins.

is there something i'm missing? telerik.web.dll is being copied properly. the folder of skin files is intact (/content/2010.2.713/). i set the publish option to "all files in source directory" and it's still not rendering properly. our other css files are being loaded properly (not using the stylesheetregistrar)


please advise, as this issue is causing an otherwise ready application to be late for QA now.

16 Answers, 1 is accepted

Sort by
0
Kyle Pike
Top achievements
Rank 1
answered on 03 Sep 2010, 07:26 PM
i'd like to add: Asset.axd is registered properly in web.config

but doesn't seem to be serving up files. when i put the following into my browser bar, i get a 404


http://web2-dev/TMISearch/asset.axd?id=kgAAAB-LCAAAAAAABADtvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee--997o7nU4n99__P1xmZAFs9s5K2smeIYCqyB8_fnwfPyJ-8UfT9qNHH7X5u_butGk-Gn10SX_u7ezujPfGD3bv0QfTjx619TqnX2YfPbr36f3RR_Tze7_4oxU1PKmWbb5sqdU5f1Z99Ghn9NGSIZZ5XbwdT6vFolqOAfuXjLjBbtjgvKrzppUG3_8l3_8l_w9nNacYkgAAAA%3d%3d

we're running IIS6.0 - this is running as a virtual directory.
0
Atanas Korchev
Telerik team
answered on 06 Sep 2010, 07:28 AM
Hello Kyle Pike,

 Could you paste here the http handler registration from web.config? Problems there will prevent the handler from working. Also firewall settings prohibiting the axd extension may interfere.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kyle Pike
Top achievements
Rank 1
answered on 07 Sep 2010, 02:20 PM
Config section is below. Again, i did not register the DLL by hand this time, i used the "Telerik MVC 2 Application" template. 


<httpHandlers>
    <remove verb="*" path="*.asmx"/>
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
    <add verb="GET,HEAD" path="asset.axd" validate="false" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc"/>
</httpHandlers>

0
Kyle Pike
Top achievements
Rank 1
answered on 07 Sep 2010, 02:27 PM
there is no firewall on the machine. one other MVC2/Telerik application and at least 10 ASP.NET AJAX/RadControls applications live there as well.

0
Atanas Korchev
Telerik team
answered on 07 Sep 2010, 02:35 PM
Hello Kyle Pike,

This is very strange as the registration looks ok. Do other axd HTTP handlers work? You can try with:

http://web2-dev/TMISearch/scriptresource.axd

This problem looks like a configuration setting issue. Perhaps this blog post could help.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kyle Pike
Top achievements
Rank 1
answered on 07 Sep 2010, 02:38 PM
no, scriptresource creates a 404 as well.

it is set up properly, however i do have a wildcard script map for MVC routing

but that should not interfere.
0
Atanas Korchev
Telerik team
answered on 07 Sep 2010, 02:45 PM
Hello Kyle Pike,

Did you check for the axd mapping configuration in IIS management console? The steps are highlighted in my blog post.

Sincerely yours,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kyle Pike
Top achievements
Rank 1
answered on 07 Sep 2010, 02:46 PM
Yes it is mapped properly. Verified the path to aspnet_isapi.dll
GET,HEAD,POST,DEBUG
Script Engine is checked
Verify if file exists is unchecked.
0
Atanas Korchev
Telerik team
answered on 07 Sep 2010, 02:50 PM
Hello Kyle Pike,

Unfortunately I am out of ideas. Those are the only problems that I know of which cause the 404 error. As a workaround  I can suggest to disable compression and combination temporarily.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kyle Pike
Top achievements
Rank 1
answered on 07 Sep 2010, 02:57 PM
I'm willing to do that. Can you point me to steps needed to achieve the workaround?

Thank you for your assistance.
0
Accepted
Atanas Korchev
Telerik team
answered on 07 Sep 2010, 03:02 PM
Hi Kyle Pike,

Remove the "Compress(true)" and "Combined(true)" calls from your ScriptRegistrar and StylesheetRegistrar declarations.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kyle Pike
Top achievements
Rank 1
answered on 07 Sep 2010, 03:16 PM
That seemed to resolve the issue with the skins and base javascript not working, but now it seems jquery isn't being included.
0
Atanas Korchev
Telerik team
answered on 07 Sep 2010, 03:18 PM
Hi Kyle Pike,

 I am not sure what is causing this. Please paste here your ScriptRegistrar declaration. 

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kyle Pike
Top achievements
Rank 1
answered on 07 Sep 2010, 03:30 PM
the problem isn't with script registrar, i don't think:

when i change the Category drop-down, the alert fires, but the fn.fillselect does not.  This was just verified to work running locally on my machine. There is no syntax issue with the code. It is verified.

<% Html.Telerik().ScriptRegistrar()
       .OnDocumentReady(() =>
       { %>
          $.fn.clearSelect = function() {
              return this.each(function() {
                  if (this.tagName == 'SELECT')
                      this.options.length = 0;
              });
           }
 
          $.fn.fillSelect = function(data) {
              return this.clearSelect().each(function() {
                  if (this.tagName == 'SELECT') {
                              alert('fillselect');
                      var dropdownList = this;
                      $.each(data, function(index, optionData) {
                          var option = new Option(optionData.Text, optionData.Value);
 
                          if ($.browser.msie) {
                              dropdownList.add(option);
                          }
                          else {
                              dropdownList.add(option, null);
                          }
                      });
                  }
              });
           }           
 
          $.fn.fillCBList = function(data) {
              var cbList = this;
              cbList.html("");
              var allbox = "<input type=checkbox name='SearchInteraction' value='ALL' checked=checked />ALL</input><br />";
              cbList.append(allbox);
              $.each(data, function(index, optionData) {
                  var cb = "<input type=checkbox name='SearchInteraction' value='" + optionData.Value + "'>" + optionData.Text + "</input><br />";
                  cbList.append(cb);                                                    
              });
           }
 
            
        $("#SearchCategory").change(function() {
            var strSearchCategoryID = "";
            strSearchCategoryID = $("#SearchCategory").val(); // get the selected state id
             
            alert(strSearchCategoryID);
            var url = "/Interaction/GetSubCategories?selectedValue=&category=" + strSearchCategoryID;
            // call controller's action
            $.getJSON(url, null, function(data) {
                // do something once the data is retrieved
                //$("#SearchSubCategory").empty();
                //alert('data returned');
                $("#SearchSubCategory").fillSelect(data);
            });
        });
        //.change(); // making sure the event runs on initialization for default value           
                 
             
        $("#SearchSubCategory").change(function() {
            var strSearchSubCategoryID = "";
            strSearchSubCategoryID = $('#SearchSubCategory :selected').text();
            //strSearchSubCategoryID = $("#SearchSubCategory").val(); // get the selected state id
             
            alert(strSearchSubCategoryID);
            var url = "/Interaction/GetInteractionTypes?selectedValue=&subcategory=" + strSearchSubCategoryID;
            // call controller's action
            $.getJSON(url, null, function(data) {
                //alert('data returned');
                $("#SearchInteractionList").fillCBList(data);
            });
        });
        //.change(); // making sure the event runs on initialization for default value    
 
             
             
         <%
       });
%>

0
Atanas Korchev
Telerik team
answered on 07 Sep 2010, 03:37 PM
Hello Kyle Pike,

Why do you think that jquery is not loaded? Can you see it output in the HTML? What if you request it manually from the browser address bar? Is there any live URL which I can check? This would help a lot and I would give more specific instructions.

Sincerely yours,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kyle Pike
Top achievements
Rank 1
answered on 07 Sep 2010, 04:01 PM
it's solved. i was not using url.action - so the url for the JSON calls was wrong.

Thank you for your assistance, i'm fine with uncompressed/uncombined if it gets our app into QA on time.




Tags
General Discussions
Asked by
Kyle Pike
Top achievements
Rank 1
Answers by
Kyle Pike
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or