Way To Pass The Root Url To The Flex Application?

Feb 21, 2011

I am working on a project that is primarily ASP.NET based. The main project is meant to be deployed to multiple locations for different clients, so one client might be located at website.com/client1 and another at website.com/client2. Within the application, we regularly use the application root operator ~ to get the path to a resource.We also have a bunch of Flex applications that get deployed in there, and many rely on web services within the ASP.NET application. What I'm after is a way to reference the services relative to the application root. Here's an example of the location of some files for two client deployments:

Client A
website.com/clientA/swf/FlexApplication.swf
website.com/clientA/services/webService.asmx
Client B
website.com/clientB/swf/FlexApplication.swf
website.com/clientB/services/webService.asmx

FlexApplication and webService are both exactly the same, so what I want to do is something like this in the Flex code:

var myService:CustomService = new CustomService(~/services/webService.asmx);
myService.callMethod("Test");

I would like to avoid using relative paths for the usual reasons. Is there a good way to do this or a good way to pass the root url to the flex application from ASP.NET?

View 3 Replies


Similar Messages:

Web Forms :: ScriptManager Uses Website - Root Instead Of Application Root Directory

Jan 27, 2010

I ran into the following issue when trying to run a test website on IIS 7.5 (Windows Server 2008 R2 DatacenterEdition). The web-app is configured to run with framework version 3.5 in a .Net 2.0 app pool. Also the framework 4.0 beta 2 is installed on the server. The application named 'TestPfade' is located under the website's root named 'Default'. It is not only a virtual directory but defined as an application. The folder structure looks like this: The markup of the sole document reads as follows:

[Code]....

When viewed in a browser the image gets shown because the given relative path is correctly resolved to 'images/Lighthouse.jpg' but the paths to the ajax-framework resources also include the application's root folder and therefor aren't found: 'src="/TestPfade/WebResource.axd?d=1bX...' Here is the complete html-source generated:

[Code]....

View 9 Replies

Request The Root Default.aspx Without Specifying It In The Url For Your Root Application?

Sep 17, 2010

How can you request the root default.aspx without specifying it in the url for your root application?e.g. ttp://localhost/MyApp/ instead of http://localhost/MyApp/Default.aspxshould be able to do bothI'm not sure if this is a setting in IIS 7.5 for the application or what.

View 3 Replies

Put Flex Charts In Application?

Jan 29, 2010

Is it possible to put flex charts in a asp.net application?

Any other easy to use chart controls, but fancy looking ?

View 2 Replies

How To Write Php Script In Flex Application

Aug 5, 2010

How can write php script in flex application ? . at the same time this script can be asp.net,javascript ...

View 2 Replies

Passing Parameter From Page To Flex Application

Apr 22, 2010

I have an asp.net page where I get the user_id from who's logged in. Now I need to pass this user_id to a flex application that runs in an asp.net page as a .swf. How can I get this user_id in a variable in my flex application. Or what is the best way to get the user_id into flex.

View 2 Replies

C# - POST Data To A Flex/Flash (mxml) Application?

Feb 19, 2010

I have Flex application requiring to filter users depending on there database groups. Depending on which group they are, the're is a config.xml file that is use to populate the swf.

Here is how I figure how to do this :
1. The client comes to a .aspx page with a form requiring a username and a password.
2. On the server side I confirm the user credential
3. Once the username/password is valid I redirect to the mxml file with the config.xml file in the html headers (post).

My problem comes when I need to get the post data from the http request. Let's say I have this code :

<mx:Application initialize="init()">

<mx:Script>
<![CDATA[
[code]...
How do I get the post data on the init() function.

View 2 Replies

C# - How To Pass The Data Path For Object Flash Tag From The Root Directory

Sep 21, 2010

I'm using urlrewriting to rewrite my url. Let me introduce my problem by bellow example: Here is old url: http://localhost/test/pages.aspx?pageid=1 I have 2 cases to rewrite:

http://localhost/test/url-rewriting-get-start.aspx
http://localhost/test/url-rewriting/get-start.aspx

The first case is ok, but I would like to use the second case. In this case I must use root path for image, css and object tag (for flash):

With image, I modified to: <image src="~/images/icon.jpg" runat="server"/>
With css, I modified in head tag: <head runat="server">

But with the object tag, I don't know how to set root for the data, movie parameter:

<object data="anim/head.swf?xmlPath=./menu_flash.html" type="application/x-shockwave-flash" width="962" height="228">
<param name="movie" value="anim/head.swf" />
<param name="quality" value="high" />

View 2 Replies

IIS 6 Website Root Vs Application?

Mar 8, 2011

IIS 6
ASP.NET 3.5 (C#.NET)

We are having an issue where the same set of files behave differently depending on if it is a root IIS website versus an application under an IIS website. The urls produced using ResolveUrl() are different - i.e.:

<a href="<%=ResolveUrl("~/contact.aspx") %>">Contact Us</a>

As the root website, it produces: http://contact.aspx

As an application under a website, it produces: http://domainname.org/DSC/contact.aspx

Both are utilizing the same files. The first example is its own website, the second is a virtual directory made into an application (titled DSC). Both also use the same application pool, and same configuration, document and security settings (I made sure all the settings were the same in IIS between both).

Everything that has been researched indicates ResolveUrl() does refer to the IIS application that the webpage is under. I have also read several places that even if the information isnt completed in IIS (in this case it is), a root website is considered an application. Therefore, it should produce the appropriate web address, but isnt.

View 1 Replies

Configuration :: Application Root - Local IIS?

Oct 15, 2010

I recently got abused on these forums because I was testing with the cassini in my development environment. So now I use local iis via the settting in the properties --> web tab and then creating a virtual directory.

The problem now is that the url is:

http://Localhost/Website

The problem is that http://Localhost/ is still the root - so its gone and broke all my css and JQuery ajax calls.

I've tried playing with application root setting in the properties tab with no luck. I have been querying the interwebs and realise that I need to do something in IIS -

View 3 Replies

Include Javascript From Application Root?

Jul 30, 2010

How do I include a javascript using ~/ expression? It works with <asp:Image>, I don't know how to do the same thing with javascript.

View 3 Replies

Remove The App_offline.htm From The Application Root Directory?

Sep 18, 2010

I get the message "This application is currently offline. To enable the application, remove the app_offline.htm file from the application root directory. "

However, this is no app_offline.htm file in the root directory. Where in the heck is it?

I am looking in the Solution Explorer, and I also looed in Windows Explorer . . . not a sign of it. ?

View 4 Replies

Specify The Application Root In Web.config Handler Mapping?

Mar 14, 2011

I have an application with an HttpHandler that processes any requests for a .js file. I only want this handler to process *.js files that are requested in the root of the application.

The handler mapping looks like this:

<add name="HandleJS" path="*.js" verb="*" type="MyApp.JsHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" />

Currently, this handler processes ALL requested *.js files. Here is an example of the behavior I want.

This request would be processed by the handler: http://localhost/myapps/approot/script.js

and this one would not be processed by the handler: http://localhost/myapps/approot/dontProcessMe/script.js

I'd really like to avoid including the full absolute path in the handler path so I tried some other things first.

It doesn't look like the path property of the add element allows the use of the ~/ application root mechanism, so setting path="~/*.js" doesn't work.

I've also tried replicating the StaticFile handler that's built into IIS and doing something like this:

<add name="MyStaticFiles" path="*/*.js" verb="*" modules="StaticFileModule" />

or

<add name="MyStaticFiles" path="dontProcessMe/*.js" verb="*" modules="StaticFileModule" />

Both of which just return a blank response with an HTTP status of 200.

View 2 Replies

Taking Path From Application Root In JavaScript?

Sep 7, 2010

[code]...

I have write a javascript function loadPage(), that needs a path to some page as a parameter. I need to give this path from the application root. I dont want a relative path.

View 2 Replies

Access :: Want To Keep The Database In The Root Folder Of Application?

Oct 29, 2010

i want to keep the database in the root folder of my application.what would be the connection string ?

View 1 Replies

Use Default.aspx In Root Folder To Redirect To Application?

Aug 19, 2010

How can I setup the code in default.aspx to automatically direct the user to the default page for the application. If the user types the server name as in http://MyIntranet, I want them to be redirected to [URL]

[Code]....

IIS threw back the error that the operation requires IIS integrated pipline mode, which obviously isn't available because we're running IIS6.

View 3 Replies

Open PDF File Present In Root Path Of Application

Jun 26, 2014

I have written the below code which will open the .pdf file from the silverligt path.as below:

Code:
Uri uri = new Uri(HtmlPage.Document.DocumentUri, "/ClientBin/10c.pdf");
string path = uri.AbsoluteUri.ToString();
HtmlPage.Window.Eval("window.open('" + path + "')");
//HtmlPage.Window.Eval("document.location.href='" + path + "';");

I want to open the .pdf file kept in the root directory of the application, (note - do not hard code)ex: i want to open the .pdf file kept in the below location: C:WebsSLLoadHelp.

View 5 Replies

Configuration :: Run Web Application Written In Framework 4.0 (cannot Change The Root Or Other Sub Folder)?

Dec 4, 2010

I am having trouble doing it. Getting error becuase two different web.config file in each one of them. In my ROOT folder I have a web application written in ASP.NET framework 2.0 . Now, I have all kind of sub-folders for other applications in .NET 2.0 or 3.5 . This is the first time I have sub-folder with application in .NET 4.0. There is a conflict between two web configuration files. How can I solve it? I cannot change the Root or other sub-folder, only If there isn't any other way to solve this.

View 2 Replies

Get Application Root From Request Object That Works Locally And Remotely?

Mar 15, 2011

Let's say that I have my ASP.NET web application in a directory called "MyApp" both locally and on a remote server. I'm trying to build an onclick response to a link. The response calls a Javascript function, passing it the URL of an .aspx page in my web app. The Javascript pops out a new window displaying the page. My C# code looks like this:

link = new HyperLink();
link.Text = product_num_str;
link.NavigateUrl = "#";[code]....

I started using the Request's Authority property because I was having problems running locally on the Visual Studio web server when I used the Host property. The problem was that Host only returned "localhost" instead of the host and port number. When tested locally, the code works because the "authority" maps to my app root folder. The URL generated is, e.g.,

http://localhost:52071/ProductInfo.aspx?_num=123

If I run on a remote server, however, I end up with something like: http://company-server/ProductInfo.aspx?_num=123

This fails to find the page, because in this case the "MyApp" root folder must be included.There is probably an easier way - putting an entry in the web.config or something. My motivation originally was to allow the app to be published to a folder of any name and work as is. I could hack my approach and search the string for "localhost" or something, but that's ugly. So how do I build a string that will work everywhere?

View 1 Replies

Virtual Directory Root Vs Default Web Site Root

Feb 11, 2011

I am using iis 5.1 in which we have only only one default website, I have two projects v2 and v3 my website points to v2 projects and have some folders images, styles etc now i have a virtual directory under this website that is hosting project v3 and having the same folder hierarchy as v2 in the home page of the both projects i have img src="imagesedlogo.gif" alt="logo"/> but this shows the same image that is in the v2 directory, How can i show different images for both projects. using "" get the root of the web site but how can i get the root of virtual directory under that website

View 2 Replies

State Management :: How To Pass Query String From One Application To Another Application

Nov 1, 2010

How to pass query string from one application to another application, i need to send values through one page of application to another application,I am using inprocess session state.
from loging page i need to send sessions to another applicaion but here sending sessions are some what diffcult (after googling).so is it possible through query strings???if yes How pass them please tell me the sample example.will it be possible through coockies?? or query strings. How

View 6 Replies

Asp.net - Get Flex Modules From ASP MVC?

Aug 18, 2010

We re developing an ASP MVC application witch the View (aspx) has a Flex embed. This aspx/flex view is composed by a flex application and several modules.So, when we call the application url (http://localhost:9090/MyProject/Flex/Index),the server invoke the method the will return the ActionResult that represents this action, in this case the ~/Views/Flex/Index.aspx (with the Flex app). However when the ModuleLoader,in the Flex application, try to load a module an error occurs. The problem is that the Flex application canīt directly access the modules folder (~/Views/Flex/modules/module.swf)Are there any way to get the module through an ASP MVC action? Or the best approach is to allow the access to this folder through web.config?

View 1 Replies

Can Pass Data From .net Application To SL Application At Different Hosts

May 6, 2010

I've got two web independent applications: ASP.NET www.site1.com and SL(3) app www.site2.com. How can i pass some data(id,strings) from asp.net to SL app. I was thinking about cookie, but I can't write cookies to any site

View 1 Replies

Architecture :: Best Way To Pass A Values From One Application To Another Application?

Dec 8, 2010

Which is the best way to pass a values from one application to another application in asp.net

View 5 Replies

Database Connection With Flex And C#

Feb 4, 2010

I've started with Flex recently, I've noticed that some plugin for Visual Studio exist, instead of buying a licence for another program (Flex Builder). I was wondering how I could manage to remotely connect to my database with a Flash/Flex application with the help of C#/Asp.Net. If I've correctly understood what I've read in the last few days, there is basically no way to 'query' to a database with Flex 3. So I suppose there is another way by using a webservice in C# on the database server that would respond to the Http query from Flex. Am I right or totally of the track?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved