Wednesday, March 28, 2012

Difficulty After Install. Missing JavaScripts?

Greetings everyone --

I'm investigating Atlas because I have need to drag-n-drop between up to four zones on a single page. Each time I drag an element from one zone to another, it has to persist that action to the database in real time. So I've installed the Atlas framework, but I can't get anything to work at all.

For example, I've created a web project referencing the Microsoft.Web.Atlas.dll along with a page called "Example.aspx". Into that page I copied the source code for the following example on atlas.asp.net.

http://atlas.asp.net/docs/util/srcview.aspx?path=~/atlas/samples/controls/control5.src

When I build and call the webpage, I see the content rendered by the HTML but there's nothing at all related to AJAX/Atlas functionality on the page. My hypothesis is that the appropriate Javascript files are not being referenced correctly, or they haven't been copied to the right place.

I've tried to copy the ScriptLibrary\Release directory to my local web directory but that didn't work. I had no luck either when trying to specify that the ScriptManager should load an explicitly referenced Javascript file like so:

<atlas:ScriptManagerrunat="server"ID="ScriptManager1">

<Scripts>

<atlas:ScriptReferencePath="~/ScriptLibrary/AtlasUIDragDrop.js"ScriptName="custom"/> </Scripts></atlas:ScriptManager>

At this point I'm stuck which is unfortunate 'cause I'd like to use this library given that the rest of the project is .NET. Seems like a good fit. And obviously there are people out there who've gotten this to work, but I'm at a loss.

Any suggestions? Thanks.

hello.

well, i you check the source of the page on the browser, you'll surelly see several "webresource.axd?..." entries. one or more of these should load the script files on the page.


Luis -- Yes, I do see those references when I "View Source". An example is below. However, still no Atlas functionality.

<script src="http://pics.10026.com/?src=/Atlas2/WebResource.axd?d=G9ZZO75SJS72S3-g1JZzk6TyxaOlDwXjSdR4wGRZm45lxhgXFD31v2NV1yxSd_CZ1dUM9aPflYprd8NUj4GeyW2dnZ4TxHWva8leh6b5bPQ1&t=632799165960000000" type="text/javascript"></script>

I wonder...could it be that the .axd extension isn't mapped to the appropriate dll or exe in IIS? I found that when I used the Atlas template in Visual Studio to create a new Atlas Web Site the template doesn't map the .aspx extension to the aspnet_isapi.dll -- which is kind of annoying. Perhaps I better check this hunch.

Trevor


That IS indeed what it was. I had to map the .axd extension to the aspnet_isapi.dll and now the example works.

It's my view that the "Atlas Web Site" template in Visual Studio should set all this up itself -- especially if you specifyhttp://localhost/blahblahblah for your project location.

OK, on to the next thing.

Trevor


hello.

well, in fact, it's an asp.net 2.0 installation issue. if you installed asp.net 2.0 and configured your server to use it, that extension should already be mapped to that dll...

No comments:

Post a Comment