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


Similar Messages:

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

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

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

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

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

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

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

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

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

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

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

Architecture :: Two Different Base Classes Sharing Some Of The Same Code?

Mar 21, 2011

I got loads of website, that share one of two baseclasses. I need the two baseclasses to be able to share part of the same code. I dont want to have to duplicate the shared code per baseclass.

so.. I got a page.aspx that inherits the baseclass and that inhertis 'sub' baseclass that inherits the web.ui.page class. So far so good :-)

In my baseclass I got a Public (at the top of the class not in any method- not sure of the proper term) Varable that is constructed from a structure in the BO class.

it Public PageDetails AS CoreDomainSetupBO.GetStartUpDetails = {database method}

I need the pagedetails to be available in the sub baseclass but it cant be defined there as the page details value is defined differently in the different base classes.

I hope that makes sense, I need to sub base class to be able to use a property that is defined at baseclass level.

View 3 Replies

Iis - Deployed .NET Application Reverts To Old Code Base

Apr 28, 2010

We have an ASP.NET application running on a webfarm. When we release a new version and copy it to the production servers, occasionally it happens that after a few hours the application reverts to a an earlier code base.Have anyone else experienced something like this? Would sharing an application pool between two applications running different versions of the code make this happen?

Additional information:
3 x web servers running w2k3/iis6
ASP.NET 3.5

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

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

Call Always Base Class Method Like Base.OnInit()?

Jun 29, 2010

I am new in asp .net.I am not able to undestand why we call base class method when we
override methods/events.Like automatically visual studio will put base.OnInit() if you are overriding OnInit.

protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}

same is the case of Finalize. In derived we call base.Finalize() Is there any need of calling these base class methods ?

View 2 Replies

C# - How To Implement User Base Security Not Role Base

Apr 26, 2010

I have to implement User base security in my Web project using .Net3.5. Followings are some we need:

Roles can be Admin, Manage, Editor, Member etc User can have multiple roles Every roles has its own dynamic menus and restrictions/resources All menus and interface will populate dynamically from Database

I heard some where this kind of i.e user base security can be implemented using HashTable but I dont know how is it?

Today I came to know that for this kind of work Java people use Interceptor Design patterns. So, how could I do the same in asp.net C#?

View 2 Replies

C# - Extend Control (ASCX) And Access Base Markup File From Subclass Code?

Jan 29, 2010

I'm building form validation controls for our C# ASP application. The bulk of the work is handled by a BaseValidator control (subclassing System.Web.UI.UserControl), which also has the markup for the validation output. This is then extended by subcontrols like PasswordValidator, that provides the Validate method and any extra fields needed by that validator control.

(The end goal is to have controls like <uc1:PasswordValidator ControlId="txtPassword" /> which we can plop into any form with minimum duplication.)

However, PasswordValidator.ascx.cs cannot access the form elements defined in BaseValidator.ascx; the only way I've found to do so is to duplicate the markup in each subcontrol's *.ascx file. How can I extend BaseValidator.ascx.cs and access BaseValidator.ascx's markup in the subclass?

View 3 Replies

C# - Create Multiple Gridviews In Code Behind?

Nov 15, 2010

I want to have multiple gridviews in a panel. and the number of gridviews is not fixed..

So basically i think there should be no code in the .aspx page as i have to create the gridview in codebehind.

I have the code for 1 gridview in one panel.. where i define the grid view in the HTML page and populate it from the code behind.

Here is the code for that..

this is on the .aspx page

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
AllowSorting="True" CellSpacing="2" onsorting="GridView1_Sorting"
Width="100%" ForeColor="White" GridLines="None"
ondatabound="GridView1_DataBound1">
<Columns>.......

View 1 Replies







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