Showing posts with label directory. Show all posts
Showing posts with label directory. Show all posts

Wednesday, March 28, 2012

viewing the script source

Previously, the script source was in a ScriptLibrary directory in a web
application. I want to view the source now with the March CTP. Is there a
way to view the source in the clientside javascript now?

Wally

--
Wallace B. McClure
"The Harder I Work, the Luckier I Get."
Listen to "The ASP.NET Podcast" at http://www.aspnetpodcast.com/
Database Award: http://url123.com/vc3er
Microsoft MVP - Visual Developer ASP/ASP.NET
AspInsider
"AJAX for ASP.NET" Coming Soon!
ADO.NET Book: http://url123.com/vc2bu
865-693-3004
118 Durwood Rd.
Knoxville, TN 37922
http://www.scalabledevelopment.com/
Blog: http://weblogs.asp.net/wallym/

Wally, the atlas scripts as now packaged as resources in the atlas dll. The Atlas MSI setup also installs them in the c:\Program Files\Microsoft ASP.NET\Atlas\v2.0.50727\Atlas\ScriptLibrary\Debug\ directory for you to view.

enjoy
-jhawk

Virtual Directory and AJAX

I'ma relative newcomer to ASP.NET and now I'm trying to evaluate ho AJAX might also be of use in some of the websites I do.

HOWEVER, I'm apparently running into "virtual directory" difficulties. (I've searched the first 7 pages of a "virtual directory" search here for AJAX and can find no post that mentions both those terms.)

MY shared hosting service is saying the following:

ASP.NET Ajax is properly installed and set up on the server. We do have other customers using it on this server without issue.

and

I added a virtual directory to the root.
I copied the files from your folder to the folder for the virtual directory.
I have not seen your configuration in DNP as my first concern was to ensure that it was not a server issue and to make sure that Ajax was installed correctly.

and finally:

The configuration for an AJAX application must be in the application root. It cannot be in a subfolder. The \bin folder cannot be off of a subfolder, but must be off of an appication root. This is not unique to Ultima. This is simply how ASP.NET works.
A virtual directory will give you an application root.
A subdomain will give you an application root.

============

I have deployed and tested medium-sized ASP.NET application (without any AJAX) without running into this "application root" barrier. WHY isn't this mentioned in a "deployment" thread here or anywhere in my examination of the documentation? WHERE is the clear "cook-book" for "So you want to deploy your AJAX ASP.NET application?" or would this be too obvious for most?

As a newbie to AJAX, I am severely hampered by what appear to me to be fairly obscure -- but effective -- roadblocks.

mahalos in advance for any GUIDANCE ... :) KevInKauai

He's partially right, but wrong about there being no solution.

If you need your app root to be a subdirectory, you (or probably your host) will need to create an application in that subdirectory, in IIS. That's not an AJAX specific issue, but a .NET requirement. Some hosting control panels allow you to do that, else your host will need to do it in the IIS management console.

Tell him to expand your site in the console, right click the directory that you want to run as the app root, pick properties, then hit the "create" button in the "application settings" section of the window. That should do it.

Wednesday, March 21, 2012

Web Resource Referencing

In the ajax Control Toolkit, web resources are referenced by the directory they are in.

For example:

[assembly: System.Web.UI.WebResource("AjaxControlToolkit.Accordion.AccordionBehavior.js", "text/javascript")]

I cannot figure out how this is done. I am writing some custom extenders, and I want to reference resources look the above, but the file always ends up being in [Root namespace].Resource

instead of [Root NameSpace].Directory.Resource.

For example, I have a project, with RootNameSpace "Root", and a Directory inside Root named Directory, and Resource.js, is inside Directory.

If I embed the resource, and reference it with Root.Directory.Resource.js I get, Assembly 'Root, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' contains a Web resource with name 'Root.Directory.Resource.js', but does not contain an embedded resource with name 'Root.Directory.Resource.js'

However, if I reference with Root.Resource.js, it runs fine.

I think there is an assembly option somewhere that I am not seeing, but I have searched, and I cannot find anything.

Can I have some help?

In C# the resources are references by directory, in VB, the resources are always embedded at the root. Is there anyway to change this behavior?