Click here to Skip to main content
15,399,037 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: MVC5 Website will write to the database on my development machine, but not on the web server Pin
F-ES Sitecore1-Mar-15 23:48
professionalF-ES Sitecore1-Mar-15 23:48 
GeneralRe: MVC5 Website will write to the database on my development machine, but not on the web server Pin
jkirkerx2-Mar-15 6:05
professionaljkirkerx2-Mar-15 6:05 
Answer[solved] Pin
jkirkerx2-Mar-15 9:14
professionaljkirkerx2-Mar-15 9:14 
Questionajaxtoolkit ModalPopupExtender problem Pin
casa_sniper1-Mar-15 5:13
Membercasa_sniper1-Mar-15 5:13 
AnswerRe: ajaxtoolkit ModalPopupExtender problem Pin
casa_sniper1-Mar-15 10:43
Membercasa_sniper1-Mar-15 10:43 
QuestionModalPopupExtender problem Pin
casa_sniper1-Mar-15 5:13
Membercasa_sniper1-Mar-15 5:13 
AnswerRe: ModalPopupExtender problem Pin
casa_sniper5-May-15 14:37
Membercasa_sniper5-May-15 14:37 
QuestionScript Resource Mappings Not Loading From CDN Pin
Dominick Marciano28-Feb-15 18:05
professionalDominick Marciano28-Feb-15 18:05 
I am using a script manager in one of my master pages in order to load several libraries: jQuery, jQuery UI, and Moment. I set up the mappings in the MapJsLibraries method that is called by the Application_Start method in Global.asax:
VB
Private Sub MapJsLibraries()
    With ScriptManager.ScriptResourceMapping

        .AddDefinition("jQuery", Nothing, New ScriptResourceDefinition With {.Path = "~/scripts/jquery-2.1.3.min.js",
                                                                    .DebugPath = "~/scripts/jquery-2.1.3.js",
                                                                    .CdnPath = "https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js",
                                                                    .CdnDebugPath = "https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js",
                                                                    .CdnSupportsSecureConnection = True})
        .AddDefinition("jQueryUI", Nothing, New ScriptResourceDefinition With {.Path = "~/scripts/jquery-ui-1.11.3.min.js",
                                                                     .DebugPath = "~/scripts/jquery-ui-1.11.3.js",
                                                                     .CdnPath = "https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js",
                                                                     .CdnDebugPath = "https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.js",
                                                                     .CdnSupportsSecureConnection = True})
        .AddDefinition("Moment", Nothing, New ScriptResourceDefinition With {.Path = "~/scripts/moment-2.9.0.min.js",
                                                                     .DebugPath = "~/scripts/moment-2.9.0.js",
                                                                     .CdnPath = "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js",
                                                                     .CdnDebugPath = "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.js",
                                                                     .CdnSupportsSecureConnection = True})
    End With
End Sub


In my master page I have the script manager control:
VB
<asp:ScriptManager runat="server" ID="MasterScriptManager" ClientIDMode="Static" EnablePageMethods="true" EnablePartialRendering="true" EnableCdn="true">
   <Scripts>
      <asp:ScriptReference Name="jQuery" />
      <asp:ScriptReference Name="jQueryUI" />
   </Scripts>
</asp:ScriptManager>


However if I view the source of my page (regardless if it is in Debug or Release mode) the scripts are linked as:
JavaScript
<script src="../scripts/jquery-2.1.3.js" type="text/javascript"></script>
<script src="../scripts/jquery-ui-1.11.3.js" type="text/javascript"></script>
<script src="../scripts/moment-2.9.0.js" type="text/javascript"></script>


But the framework scripts are loaded from the CDN:
JavaScript
<script src="https://ajax.aspnetcdn.com/ajax/4.5.1/1/MicrosoftAjaxWebForms.debug.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
(window.Sys && Sys.WebForms)||document.write('<script type="text/javascript" src="/ScriptResource.axd?d=T5IBtM-HcRERfDQDXGqZ1FhUIPtFDfyYyY6-gVbY9PxN2FLZSokqO1WuxmLK3n8W3rayqDSC40u1y26T6UCW25sOnNY2_5YE_oh2C9aHsvQssjf0qOsBc-FKfCKa3LgzwYkyEtanyaEjU4NjiWtEHktP89KX6RE6XVFfM-IZFflIST5rif3OlVEjHQMyAxN20&t=fffffffffbd5809e"><\/script>');//]]>
</script>


My understanding of the script resource definitions was to be able to allow the script manager to load additional javascript files from a CDN path and, if it wasn't available, fallback on a local copy (as well as autoselecting the debug or release [minified] version).

I have tried modifying this code as well as trying the debug and release modes, but only the local, debug (non-minified) javascript files are loaded. Can anybody provide any suggestions on resolving this as I have several other javascript files that I would like to include?

BTW I have also already confirmed that the CDN paths are valid, I have tried the definitions with and without Nothing being passed for the assembly name, and I have already tried completing removing the Path and DebugPath properties and simply including a resource name. The site is running under .NET 4.

Thank you in advance.
A black hole is where God tried to divide by zero.

There are 10 kinds of people in the world; those who understand binary and those who don't.

QuestionPlease Help!!!- with an empty web site small task Pin
Amir87657428-Feb-15 12:52
MemberAmir87657428-Feb-15 12:52 
AnswerRe: Please Help!!!- with an empty web site small task Pin
Richard Andrew x6428-Feb-15 17:37
professionalRichard Andrew x6428-Feb-15 17:37 
Question[ERROR] An attempt to attach an auto-named database for file <path>.mdf failed ... or it is locat... Pin
Atinesh28-Feb-15 7:48
MemberAtinesh28-Feb-15 7:48 
Generalwhen i host my application in iis local host but on the same computer it is open very slow Pin
tarun kumar sahu hs28-Feb-15 6:22
Membertarun kumar sahu hs28-Feb-15 6:22 
SuggestionA few points to consider while working with literal string in ASP.NET Pin
Afzaal Ahmad Zeeshan28-Feb-15 3:28
mveAfzaal Ahmad Zeeshan28-Feb-15 3:28 
GeneralRe: A few points to consider while working with literal string in ASP.NET Pin
Richard MacCutchan28-Feb-15 5:44
mveRichard MacCutchan28-Feb-15 5:44 
GeneralRe: A few points to consider while working with literal string in ASP.NET Pin
Afzaal Ahmad Zeeshan28-Feb-15 5:52
mveAfzaal Ahmad Zeeshan28-Feb-15 5:52 
GeneralRe: A few points to consider while working with literal string in ASP.NET Pin
Richard MacCutchan28-Feb-15 6:47
mveRichard MacCutchan28-Feb-15 6:47 
GeneralRe: A few points to consider while working with literal string in ASP.NET Pin
Afzaal Ahmad Zeeshan28-Feb-15 6:53
mveAfzaal Ahmad Zeeshan28-Feb-15 6:53 
GeneralRe: A few points to consider while working with literal string in ASP.NET Pin
Richard MacCutchan28-Feb-15 21:26
mveRichard MacCutchan28-Feb-15 21:26 
GeneralRe: A few points to consider while working with literal string in ASP.NET Pin
F-ES Sitecore2-Mar-15 0:12
professionalF-ES Sitecore2-Mar-15 0:12 
GeneralRe: A few points to consider while working with literal string in ASP.NET Pin
Afzaal Ahmad Zeeshan2-Mar-15 3:03
mveAfzaal Ahmad Zeeshan2-Mar-15 3:03 
Questionopen project mvc Pin
Nguyen Jay27-Feb-15 16:55
MemberNguyen Jay27-Feb-15 16:55 
AnswerRe: open project mvc Pin
Afzaal Ahmad Zeeshan28-Feb-15 3:24
mveAfzaal Ahmad Zeeshan28-Feb-15 3:24 
Questionneed help to add paging in datalist access db with vb code Pin
Member 1148584027-Feb-15 8:46
MemberMember 1148584027-Feb-15 8:46 
SuggestionRe: need help to add paging in datalist access db with vb code Pin
Richard Deeming27-Feb-15 10:31
mveRichard Deeming27-Feb-15 10:31 
Questionvb function / sub call using javascript . Pin
Member 815140727-Feb-15 8:13
MemberMember 815140727-Feb-15 8:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.