Use The Same Asp Code In Different Websites And Different Folders?

Mar 10, 2011

I got one remote website and two local websites. All the .asp files are the same in 3 websites. In the remote website, there is a file aaa.asp, its url is

http://www.xxx.com/aaa.asp

In the first local website, the url of the same file is
http://127.0.0.1/local1/aaa.asp

In the second local website, the url of the same file is
http://127.0.0.1/local2/aaa.asp

My question is: In any .asp files (may be in different folders) of any above website, how can I get the url of aaa.asp by use the same code?

View 3 Replies


Similar Messages:

Listing Folders In Folders Then Creating Arrays In JS For Each Of The Folders?

Jun 21, 2010

Listing folders in folders then creating arrays in JS for each of the folders?

Directory Structure:

I have a directory structure as follows;

ad_folder
--folderA
--folderB
--folderC
--anotherFolder
--etcfolder
--afile.aspx
--anotherfile.gif
ad_code
--folderA
--folderB
--afile.aspx
--anotherfile.gif
ad_prep
--folderA
--etcfolder
--afile.aspx
--anotherfile.gif
ad_bin
--etcfolder
--afile.aspx
--anotherfile.gif
other Folder
files folder
assetsfolder
index.aspx
web.config
image.gif

Task at hand:

I want code in VB.NET to create javascript arrays of the folder contents that can then be used on the client end. I only need arrays for all folders contained in folders starting with ad_ and an array for all the base folders . like so:

var folders=["ad_folder","ad_code","ad_prep","ad_bin"];
var ad_folder=["folderA","folderB","folderC","anotherFolder","etcfolder"];
var ad_code=["folderA","folderB"];
var ad_prep=["folderA","etcfolder"];
var ad_bin=["etcfolder"];

note that I do not know the number of or the names of the folders, they can be different in different cases, I only have the root path.

[code]...

View 3 Replies

How To Organize Code Within An Application (sub Folders)

Jan 23, 2011

In a website, I see some developers put code into app_code, and sometimes appcode (due to some bug), other files into DataModel, and other files into miscellaneous folders.

Is there a standard approach to organizing code within an application?

How is it different between an ASP.NET, MVC, Silverlight, Console, Database, and WCF application? The reason I mention WCF is because many people seem to have a shared types library that is linked between the server and client code.

Where can I learn these common practices without having to try, fail, and try again. I'd rather just learn it once from the experts.

View 3 Replies

XML Files In Websites Using Vb.net Code

Jan 13, 2010

I am new to XML and trying to practise using XML files in my website using vb.net code.

Xml file is called xmluser.xml
<people>
<name>
<firstname>John</firstname>
</name>
</people>

View 2 Replies

Publishing Websites: DLL Vs Code Behind - Which Is More Secure

Nov 16, 2010

I recently came aware of some knowledge I was not aware of before. One of my friends said that publishing a website with the code behind is a security risk. Instead, he insisted I only publish with the DLL's to prevent hackers from altering your code. Is this true? What are the advantages and disadvantages for doing this?

View 3 Replies

MVC :: One Code Base Multiple Websites?

Nov 12, 2010

I was wondering about the best MVC practices for handling multiple websites from one MVC codebase. The functitonallity will pretty much be the same on all five sites, with most differences coming from styling/branding. Is it possible to dynamically set a Masterpage in MVC ? Should this even be attempted? Can everything get handled cleverly with routing?

View 2 Replies

Mulitple Websites Using The Same Code But Different Web.config Files?

Oct 18, 2010

I have mulitple websites using the same code but different web.config files. Is there a way where I can achieve not having multiple copies of the same code? so its easy to mantain?

View 1 Replies

Configuration :: Use To Copy/publish Websites To Web Server Is Not Allowing Us Access To Push Websites?

Oct 15, 2010

the account we use to copy/publish websites to our web server is not allowing us access to push websites. I've added this account to the permissions in the links listed in the below link, but i don't have success when trying to push remotely. When the account is in the local admins account, everything works flawlessly, but we are not allowed to have it in there. http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/31be047e-4716-4974-b8a1-be0111b50199 I've googled and searched a lot for this particular error, but am not finding an answer that helps. We get this error, 'Unable to create the Web 'http://edea01/test/planning'. You are not authorized to perform the current operation', and the above link is the scenario that matches mine the most. I don't do develompment work, but am asked to figure out this connection problem.

View 3 Replies

How To Know Websites That Produce Free Source Code For Famous Web Application

Jul 25, 2010

I need to know websites that produce free source code for famous web application

View 2 Replies

Forms Data Controls :: Write A Code For Displaying A Files And Folders Of Server Directory Using Grid View In .net?

Jun 12, 2010

how can we write a code for displaying a files and folders of server directory using Grid View in asp.net?

View 3 Replies

MVC :: 2 View Sub Folders

Aug 11, 2010

I am just getting started with MVC so pardon the bonehead question, as I am sure that it is one: I understand the conceptual MVC pattern and the basics of routing in the .Net MVC implementation. My first little (VS 2010, Framework 4) project works great, until I get to this: In the project there is a physical folder structure like this :

"~/Views/Recipies/"
"~/Views/Recipies/Outdoor/"
"~/Views/Recipies/Breakfast/"
"~/Views/Recipies/Lunch/"
"~/Views/Recipies/Dinner/"

Each of the folders contains an Index.aspx file (View). I want to link from "~/Views/Recipies/Index.aspx" View to the other Views with something like this:

[Code]....

where I have created an Outdoor controller to handle the Index View. The runtime unfortunately insists on looking for the Index view in "~/Views/Outdoor" rather than in "~/Views/Recipies/Outdoor". I have no doubt that I am falling victim to my years of coding .Net Forms, am missing a link in the chain of conventions relies upon, or some other painfully obvious thing, but I am nonethless stuck.

View 2 Replies

.net - Disable Ssl For Certain Folders?

Dec 14, 2010

I want to disable SSL in some folders of a ASP.Net 4 web application. Is there a way to do that?

View 1 Replies

VS 2008 VS Trying To Create Odd Folders

Jun 22, 2010

I was nosing around with Sysinternals Procmon today, just to see where some disk activity was coming from. In the process (pardon the pun) I noticed that Visual Studio was constantly testing for the presence of a bunch of web folders which didn't exist. Procmon log: "D:wwwroot" is my web root. The folder "csharp" doesn't exist.

This happens continually, every few seconds. When I create "csharp" and those subfolders, VS stops checking for them. But they don't exist in my project file and there's no need for them as far as I know. I don't know what they are for. Does anyone know why VS wants those folders? Their absence doesn't seem to affect anything, yet VS keeps checking if they exist, which is weird.

View 10 Replies

Looking To Create Sub Folders For Users

Jul 4, 2010

Not quite sure what you would call these but I am looking to create sub folders for my users eg

mysite.com/billyblue

What I have done up to this point is make a 404 page that handles unknown pages. It takes the part after the / and looks it up in the database. Then I redirect them to the relevant page.

I am having a few issues with this and to be honest am not to keen on handling it this way.

Does anyone have an alternative method for achieving this.

View 3 Replies

Breakpoint Symbols Sub Folders Win 7 64?

Apr 15, 2010

I recently upgraded to Windows 7 64 on my development machine. I am trying to setup my development environment. I have discovered something strange. When trying to set breakpoints in my ASP.Net application the breakpoints will only work if they are in the root folder. My ASP.Net project has various sub folders and any breakpoints in code that is stored in the sub folders turns yellow when debugging starts and states breakpoints will be missed.

I have deleted the temporary folder in c:windowsmicrosoft.netframework .... etc. etc. etc. I have checked the folder permissions in the root and all sub folders (they are the same). I have deleted and rebuilt the subfolders. I have right clicked VS2008 and said to run as administrator. Nothing seems to fix it. I can debug root level code behind pages but anything stored in a subfolder will not debug.

View 20 Replies

Add New Rss Feeds And Categorize Them Into Different Folders

Aug 10, 2010

I am working on a project where I am using Tree View to display feeds that are available at the start up of the web application. I am also providing the user the opportunity to add new Rss Feeds and categorize them into different folders. When the user clicks on the particular web feed that they want, I need to display it using xmldatasource. When defining the XML Datasource tag and specifically the DataFile property, how can I dynamically pull over the URL based on what the user has selected from the TreeView?

View 2 Replies

Sharing Bin Folders Between Different Projects?

Jul 16, 2010

it's possible for multiple projects to reference/share the same bin folder?

View 4 Replies

Folders Without Namespaces C#, .Net, VS 2008?

Apr 19, 2010

I'm working on an ASP.NET webapp using the MVP pattern, and as I'm organizing my files I'm wondering - are there conventions on folders within projects and how they relate to namespaces?

I have a bunch of controls and a bunch of pages, and I was going to throw them into Controls and Pages folders with subfolders, but I didn't know if it was bad form to do this if I wasn't also going to seperate them out into namespaces.

View 1 Replies

Different Authentication Forms For Different Folders?

Oct 25, 2010

I have an ASP.NET website with two different sections, root website and an /Admin sub-folder. I want to have two different forms authentication/login pages for them. /Admin folder should use/redirect /Admin/Login.aspx and root pages should use /Login.aspx. What should I do in web.config to accomplish this?

View 2 Replies

Webpages Cannot Access Folders (IIS)?

Jan 1, 2010

What setting must I change under IIS to allow access to the folders? I am looking for that settings for hours, nothing found.

It seems like it is giving a 403 error when I tried to access the folder.

View 2 Replies

Deploying Web App With CruiseControl.Net And SVN - Getting Rid Of .svn Folders?

May 7, 2010

I have a CruiseControl.Net project set up to build an ASP.Net project, using an <svn> task to pull the latest code from source control.

On a successful build, I use a <buildpublisher> to copy the site to a deployment folder. My problem is that the buildpublisher is copying everything to the destination folder, including every .svn folder and its contents. What is the easiest way to strip out the .svn folders before copying to the deployment folder?

View 3 Replies

C# - Adding Folders In App_LocalResources?

Feb 22, 2010

I want to add folders to keep things organized in App_LocalResources. Because when adding a lot of resorce files for different languages in this folder, files are getting messy. I added folders like

Default.aspx (Folder)
Default.aspx.en.resx
Default.aspx.sp.resx
Contact.aspx (Folder)
Contact.aspx.en.resx
Contact.aspx.en.resx

Edit :

FYI : Actually what I did is working. I mean the way I mentioned above is the correct way. The reason why it wasn't working is something else so you can define your folders and the resource files above.

View 1 Replies

Web Forms :: Folders Name That Default.cs Located In?

Jul 1, 2010

I have created a Folder and inside this folder, I have put a default.aspx and a default.cs file. I wonder how it is possible to find out what is the folders name as the default.cs is located in. This meens that I am looking for a code to determine what folder that is above in the hierarchy of folders?I cant use this code as this goes all the way back to the root:

[Code]....

View 5 Replies

Setting Up App On A Vps / Need To Set Any Of The Folders As Virtual Directories

Sep 16, 2010

I just got a windows vps setup at a hosting company and about to install a big web application that is a store front. Do I need to set any of the folders as virtual directories? I'm so confused on all of this. Do I just copy the folders and files over and thats it? It has Plesk to use for the control panel. I know I have to set the directories to run as application but is there anything else?

View 1 Replies

Web Config - How To Apply The Authorization In Two Different Folders

Feb 18, 2011

I have two folders in my asp.net website namely VENDORS and ADMIN

i want when any user access any of the page inside the ADMIN folder it redirects to Admin/login.aspx until they login ....

i want when any user access any of the page inside the VENDORS folder it redirects to Vendors/login.aspx until they login ....

How to do that using web.config authorization ....

View 2 Replies







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