Using A Single Codebase For Multiple Websites?

Mar 30, 2011

There are existing questions that pertain to this subject, but I feel my case may be slightly different(correct me if i'm wrong).

I have two web sites that are almost identical as far as graphics go. They will need only to have a different logo. Additionally I have set up the database so that products can be flagged to show up on either or, or both web sites. Is it possible to set up IIS to point the second web site to the first web site and then have my code determine which domain the request is coming from?

For instance, web site 1 will have domain www.myfirstwebsite.com and the second web site will have a domain like www.mysecondwebsite.com.

If I did go this route I'm guessing I would check in the master page code behinds Page_Load event for the domain and then when I want to display products on my front end I can reference against the variable in the master page.

View 1 Replies


Similar Messages:

Can Run Multiple Websites Under A Single Membership Database

Jun 8, 2010

I'm trying to plan a series of websites that all share many of the resources such as css/jscript/images/content etc. For this reason I wanted to run all of the websites under the same application and IIS profile, but depending on the URL being used change the masterpage and theme/skin.

The ASP.NET membership database seems as if it was designed with this goal in mind because it allows you to setup multiple applications, however I believe the purpose for which this was built was to allow applications to be run under virtual directories/fodlers, not on seperate urls.

View 2 Replies

Deploying Multiple Sites On The Same Codebase?

Nov 9, 2010

I recently inherited a solution with about 10 projects in it. 6 of these projects are individual websites that are basically copy/pastes of the original.

This means that any changes that need to be made must be made to each project in order to update all the websites.

What I want to do is have one project for the website code and be able to deploy that code and some configuration settings to create a new website. That way when I make updates to the main Web project I can just deploy to all the websites.

How do people normally approach this? I'll outline my thoughts on it and hopefully some of you can point out better ways to accomplish this or at least give me some affirmation that I am on the right track.

Have a master markup with very general containers. Allow the users/people setting up the site add widgets to the site which will be assigned to widget placeholders at the top and bottom of all the generic containers. All styling and colors will be controlled with a stylesheet that can be swapped out. I know there is some kind of theming you can do. Does this just swap out groups of css and let you configure which one to use in the webconfig? For elements that will be the same across all sites such as footer images have a naming convention. So if I want Site A to have some footer image I just replace the footer.jpg in the project when I deploy.

View 2 Replies

Web Forms :: Run Two Websites On Single Url?

Dec 2, 2010

i hv say two website web1 and web2 both hv diff appdata and style sheet,webconfig.how can host this on single url with username and password. suppose for rajeev it redirect to web1 and for ravi redirect to web2.Is it possible todo this kind of thing. India mart did this on their websites. they have various links in thier website. suppose for website web1 they have the [URL] and so on.

View 11 Replies

Forms Data Controls :: Using Multiple Tables Within A Single DataSet And Single SqlDataSource?

May 19, 2010

I have a stored procedure that returns 3 tables within the single recordset it returns. If I set a SqlDataSource to get data from this procedure, it works, but it only returns the first table. I want to have a GridView display the data from the 2nd or 3rd table using a SqlDataSource, but I can't figure out how to specify a particular table.

While there are some posts discussing this out there, I can't get a definitive answer about whether or not this is even possible (?). In a worst-case scenario, I can create another SP that only returns the 3rd table - but that creates a little maintenance headache that I would prefer to avoid.

View 4 Replies

How To Have Common Layout For Multiple Websites

Dec 18, 2010

we are working on a portal which will have multiple websites sites loaded in same container meaning there will be a

1)Top Header showing Portals name and currently loaded app's name

2)left hand side frame having menu which will list applications which are independent of one another.Each of these application is hosted on different servers sharing same DNS name for ex .

i) [URl]

ii) [URl]

3) Righ hand frame ::this is very individual applications pages will load with there own submenu.

Now top header and left hand side menu are common across the applications while the contents in right hand frame will application specific. How can I achieve this using master page ,without requiring indivdual application to have same master page copied in there virtual directory

View 2 Replies

Sharing Cache Between Multiple Websites

Mar 11, 2011

We have about 50 web-sites, running in different application pools, that read from a common cache database (using Microsoft Enterprise Library Caching application block). We currently have a console application which populates the cache at 3AM every morning. However, we want to get rid of this application and get the cache to automatically refresh expired items, using the ICacheItemRefreshAction interface.

We were going to create our cache object in the Global.asax of each of the 50 web-sites. However, my concern is that if we set a cache-expiration policy in Global.asax, that each of the 50 web-sites will trigger a refresh action, causing the data to be re-cached 50 times. We don't want only 1 web-site to set the expiration policies, as then the 49 other web-sites will have a dependency on that 1 web-site, and that's an architecture no-no.

View 2 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

Configuration :: How To Create One Web.config For Multiple Websites

Jun 4, 2010

I have 3 web.configs and 1 web project. I compile it once, and when deploy it, all I do is copy the correct web.config to the correct directory.

This is too complicate to maintain, when I have web.config change I must change all the three.

So, what I want is to keep only one web.config file, for all three websites.

In order of doing so, I have created a new settings.xml file, and I wish to read everything from there instead of te web.config file.

to my questions:

1. I need to remove ConnectionString from web.config to the settings.xml file. How do I change the providers connection string programatically?

[Code]....

Seems like moving the connection string to a different file might be a difficult task:)

2. How programatically can I do what I did on the web.config easily:

[Code]....

View 6 Replies

C# - Sharing User Controls Across Multiple Websites?

Apr 14, 2010

I am currently working on a project which involves three different websites with a lot of common functionality. At the moment the common functionality is placed in a different website full of user controls.

The problem is sharing the user controls across the multiple websites. Looking around on SO and other websites, the only solution seems the be using virtual directories. As this is a workable solution (we us this at the moment) it doesn't seem as a "clean" solution.

Which "best practices" exist on sharing common functionality (including the GUI/HTML) between different site?

Is it (for example) possible to create a single Web Application project and deploy subdirectories (each with their own web.config) to different production environments?

View 3 Replies

Share An In-memory Object Between Multiple Websites?

Feb 1, 2010

We have about 70 sites on our server that use same application (with different Application Pools) and they use for example a shared skin file. So is there a way to load this file to memory and share for all applications? what I mean is to sharing cache in multiple websites to decrease pressure on server.

View 3 Replies

Creating Subdomain In IIS Or Configuring Multiple Websites?

Dec 20, 2010

I have a IIS server in my company which runs our intranet application, We assigned one static IP to it in order to access through internet. when we to mapped our application address eg : http://ip/applicationname to one host name, after loading when i try to access any page it was again showing ip address instead of my host name. When I check with my ISP, he told me that to resolve this either you have to put your application folder in root directory(directly in Inetput/wwwroot) or you have to create sub domain, when I put all my fies to root directory it is working well, but , I found that for all other application which i put the folders inside wwroot are taking the config file from root, how can i resolve it... or just explain me how to configure subdomain in my server to solve this issue....

View 1 Replies

Configuration :: Set Up Multiple Websites In Godaddy's 4G Hosting?

Mar 23, 2011

I just upgraded to windows 4G hosting from old windows hosting on Godaddy. I have hosted multiple websites on this hosting account. The primary domain website [URL] is working fine after the upgrade but all other sites hosted in same account report some errors.

The structure is like this:

Root: inHouseRecipes.com
Root/s/Website1
Root/s/Website2

I have checked that the websites in subfolders are set up as an application in IIS 7. Also, the web.config of parent (root) website has the following

<location
path="."
inheritInChildApplications="false"
>

tag to stop other child web.config to inherit anything from parent.

I use asp.net to code my websites. Before 4G upgrade everything used to work like a charm.
Has anybody else also experiences the same issues? If yes, what are the changes that we need to make to support multiple web sites in same 4G hosting account?

View 5 Replies

Configuration :: How Many App Domain Created When Multiple Instance Of Multiple Application Is Running On Single

Jan 12, 2011

below written question :

1.) What is the name of the OS process in which App Domain resides.

2.)if suppose There are Three Windows application hosted on a same envoirment and two instance is working for each application at a Time, means now total instance are six .what will happen among the below written cases :

a.) There will be six different app domain in a single OS process

b.) There will three app domain(one for each application) in a single OS process and some Parallel thread will be executed in each app domain for another instance.

c.) There will be Three OS process corresponding to each application.

3.) If eveything will remain same except there are three web application in place of windows in point 2, will there be any change in functioning.

View 1 Replies

Data Controls :: Display Multiple Columns In Multiple Lines In Single Column In GridView

Aug 18, 2015

I have a question in gridview, I want to combine my two or more records into a single cell with two rowsfor Example i have a ID, Name, Year Start, and Year End for Column name in database and i want call it into my gridview that the Year Start and Year End will combine to Year like:

In Database

ID Name Year Start Year End

1 Yourname 2010 2015

In Gridview:

ID Name Year

1 Yourname 2010 2015

in a year column i want it to two row..

View 1 Replies

Data Controls :: Display Multiple Columns In Multiple Lines In Single TemplateField Column In GridView?

Aug 18, 2015

I want to bind three column with one row in gridview in asp.net with c#,

i want like this, 

Name | Info
----------------------
name | lastname

        | phone number

        | address

I get this by default

name | last name | phone number | address 

View 1 Replies

Configuration :: VS 2008 Multiple Websites Referencing The Same Files?

Nov 24, 2010

I would like to have several websites that use the same styles, scripts, and App_GlobalResources. What would be the best way to structure my websites (web applications) to use the same files? I also need to share user controls with code behind.

View 6 Replies

Security :: Mixed Mode Authentication Fails In Multiple IIS Websites

Jan 26, 2010

I created a mixed mode authentication mechanism based on a few of the articles that I have read on this topic. It's similar to something like this: [URL]

Basically, there are two web applications. One accepts the Windows Auth and one accepts Forms Auth. The Windows Auth then creates a forms auth ticket and passes control to the Forms auth application. This solution works fine when both applications are housed within the same IIS web site.

Now, order to control the security of this solution we set up multiple IIS web sites on the same machine. Web Site 1 serves external traffic (forms auth) and Web Site 2 serves internal traffic (windows auth).

So the design is that an internal user can hit the site using Windows auth via a internal name (myserver) while the external users use Forms Auth hitting [URL].

All that said, the solution works when the two applications are in the same site. Doesn't work when they are in different sites.

View 4 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

Visual Studio :: Reference JavaScript Library From Multiple Websites Without Copying It To Each Project Folder

May 13, 2010

I have several web sites, all of which use the same JavaScript library. How can I "reference" this library from each of my web sites? If I just import the library into my web site in Visual Studio, I get in trouble as soon as the library changes, because I then have to update it in all web sites manually. It would be much easier to place the library in an external folder and just reference it from my web sites. How can I do this with Visual Studio?

View 9 Replies

Multiple Single-result Sql Server Stored Procedures Or Single Multple-result Stored Procedure?

Aug 9, 2010

Background: I use stored procedures exclusively for an ASP.NET application. I am using a DataReader to load a dataset object.

View 4 Replies

Compiling Multiple Projects Into A Single Dll?

May 5, 2010

Is there a way to copmile a solution into a single dll?

Said solution may have several custom projects. I want all of them, and all the third party dll's they reference compiled into a single dll.

View 5 Replies

Single Repository Or Multiple Repositories?

May 1, 2010

In a typical business application, a session is started and persisted across several pages. It is commited only when the transaction is complete. A good example of this is a tax preparation application. Once the session is started, it is persisted through session, cookies, or both. Nothing is written to file, or database, until the entire profile is complete and the refund/return is calculated. In such an ennvironment, is makes a great deal of sense to work with the structure imposed by domain driven design, and using a single repository to simple commit the session. However, there are times when this doesn't translate correctly, even when domain driven design is used.

An example of this is my forum project. While the entities themselves are good targets for domain driven design, I am not sure about the repositories. The basic structure is that a Category has many Forums, a Forum has many Threads, and a Thread has many posts. There are other things in there, but that's enough to describe what I want to get across. If a user has navigated to /Thread/Edit/42, and they have rights to edit it, all I am concerned about is fetching that record and displaying it. On postback, all I want is to be able to save it..................

View 2 Replies

Multiple Button In A Single View

Sep 29, 2010

I have a web project which includes two button in a view.when i click a button some textboxes along with that second button have to be visible.After entering data in textboxes,when i am trying to click the second button, its not working.What should i do to make it work?

View 1 Replies

MVC :: Multiple Routes In A Single Request?

Jul 23, 2010

How can I have multiple routes in a single request at global.asax? Error "The incoming request does not match any route."

[code].....

View 2 Replies







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