Sql Server - Same Website On Multiple Subdomains But Different Databases?

Oct 10, 2010

Consider that I want to create 10 websites in IIS, each of them pointing to the same website on local hard drive, each one running the same code, but on different subdomain.subdomain1.domain.com, subdomain2.domain.com, ..., subdomain10.domain.comHow can I add multiple connection strings in my web.config file and bind each connection string to a different subdomain ?I want to do this because every website will have a different database with different data.

View 2 Replies


Similar Messages:

C# - URL Routing Across Multiple Subdomains?

Jul 14, 2010

I find myself in a difficult situation. We're working on an ASP.NET MVC 2 application which is comprised of multiple sections. It is a design goal to have these sections span across several subdomains. Each subdomain will have its own controller.

The challenge is that our hosting provider's control panel allows two forms of redirection for subdomains, and neither of them seem to fit the bill. The choices are:

Redirecting to URL. Choice is given whether to redirect to an exact destination or a destination relative to the request URL. Redirecting to a specific folder in my hosting space.

I'll try to illustrate the intended behaviour. Assuming the default route is {controller}/{action}/{id}, I'd like the URL http://subdomain.welcome.com/a/b be handled by the MVC Application like http://welcome.com/subdomain/a/b.

The URL redirection could solve this problem, except for the fact that the user sees a URL change occur in the browser. We don't want the client to see the redirection occur.

Redirecting to our MVC apps root folder doesn't work at all. The app doesn't pick up the request and a 4xx error gets passed back by IIS.

edit:

In the interest of finding an answer, I'll simplify this a bit. The "redirect to URL" doesn't do what I want so that leaves redirecting to a folder.

If I'm redirecting a subdomain to the root folder of my MVC App and IIS wont pick up the requests, is this a limitation of IIS or my provider?

View 2 Replies

C# - Add Static Subdomains To A Website?

May 16, 2010

I would like to create a few static subdomains like:

mycategory.mydomain.com

in a rather small website and would like it to point to the folder:

mydomain.com/mycategory

without showing such redirection in browser address bar.

What is an easiest way to achieve it? I can do it in either IIS settings, asp.net, C# code, etc

there are better ways then creating a few separate Sites in IIS - one for each subdomain.

View 2 Replies

Cache For Subdomains - Users See Their Subdomain Name In Different Subdomains?

Jan 31, 2011

There are subdomains: sub1.domain.ru, sub2.domain.ru, sub3.domain.ru, sub4.domain.ru. On default page there is a code:

protected void Page_Load(object sender, EventArgs e)
{
string subdomain = Cache[key] as string;
if (subdomain != null)[code]...

Will users see their subdomain name in different subdomains(sub1.domain.ru, sub2.domain.ru, sub3.domain.ru, sub4.domain.ru) ?

View 1 Replies

How To Manage Multiple Applications On One Hosting With Subdomains

Oct 3, 2010

I want to deploy multiple asp.net applications on same hosting with subdomains. How it should be manged ?

I just created a subdomain and deploy application in its folder; when I tried to access application with subdomain it shows the following error:

An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

View 5 Replies

Security :: Single Sign On With Multiple Subdomains?

Apr 21, 2010

I have 2 subdomains:

www.mysite.com
store.mysite.com

I followed these instructions: http://www.codeproject.com/KB/web-security/aspnetsinglesignon.aspx

The only thing I don't understand is where to put the cookie code?

[Code]....

Does this go in the LoginControl_LoggedIn event? Application_AuthenticateRequest?

Also, what if I have 2 different domains?

View 2 Replies

Deployment - How To Manage Multiple Applications On One Hosting With Subdomains

Oct 3, 2010

I want to deploy multiple asp.net applications on same hosting with subdomains. How it should be manged ?

I just created a subdomain and deploy application in its folder; when I tried to access application with subdomain it shows the following error:

An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

View 1 Replies

State Management :: Authenticating Users In Multiple Subdomains?

Aug 31, 2010

I have a main website say www.main.com which is developed in asp.net. We have used forms authetications here.

Now the thing is I have a no of subdomains on the same server say domain1.main.com, domain2.main.com, domain3.main.com etc.

I had put some functionality there. What i want is when i redirect my users to the subdomains user has to log in again.

what are the method where i can preserve the users state in my subdomains also.

View 5 Replies

Databases :: Data Access Layer For Multiple Databases?

Jul 6, 2010

i want to develop a data access layer ,it can support multiple database like oracle ,Mssqlserver and Mysql using enterprise library and C#.net 3.5 based on database connection

View 1 Replies

Deploy Website From SVN To Multiple Server?

Sep 30, 2010

I need to deploy a website from the SVN to different servers all within our own network. The code is currently not complied but probably will be in the future.

First the site would need to be deployed to the development server for the developers to test.

Once the Developer signs off it would be deployed to the staging server for the testers.

Once final sign off was given it would be deployed to a server farm, two live servers.

Each server has a couple of settings in the web.config to that are different; expect the two live server of course. I would like to use templates, the way the Ruby on Rails world does, seems like an elegant solution to multiple web.config files.

I also need to create a list/report of the files that were changed and what the change was since the last deployment.

I thinking of writing a script that will do the following
1. Take args for server to deploy to, and revision
2. Export a copy of the source to a directory with svn export -r <deploy revision>
3. Delete the web.config file
4. Use ttree (a template tool [URL]) to create the correct web.config
5. Create a list of file changes with svn list -r <deploy revision>:<current server revision>
6. Stores the <current server revision> of the website for when the script is run next time

I prefer to use tools that are already available rather than re-invent the wheel. Unfortunately I don't think MSDeploy will do what I need, but I'm happy to use it, or anything else, if it will do what I need it to. Does anyone know of any tools that are up to the task or is the script my only option?

View 1 Replies

DataSource Controls :: How To Create Multiple Records In A Dataset From Multiple Databases

Mar 7, 2011

I am trying to design my logic to do this but I want to create a dataSet which will have records from several databases, The records all have the same layout.

I am reagin the connection string paths from a table in a database.

I am asking for your help in trying figure out my logic.

Should I use the connectionString builder in conjunction with a loop to Connect, read a record into a dataset Until therer are no more records to be read from my databse table with the database name/paths tables ?

Here is my beginning code which deals with one database:

[Code]....

View 2 Replies

WebMatrix :: Publishing Multiple SQL Server Databases From WebMatrix?

Jan 11, 2011

I struggle with publishing 2 databases from WebMatrix using WebDeploy. On Publish settings screen I specify 2 different connection strings, but on Publish Compatibility screen Database names in both destination connection strings are equal. When I return to settings screen, original value is replaced there as well.

How destination server connection strings are evaluated? Here are connection strings from the root web.config file, which are set by hidden parameters in my parameters.xml:

<connectionStrings>
<add connectionString="Server=(local);Database=xxx;Uid=xxx;Pwd=xxx" name="xxx" providerName="System.Data.SqlClient" />
<add connectionString="Server=(local);Database=xxx2;Uid=xxx;Pwd=xxx" name="xxx" providerName="System.Data.SqlClient" />
</connectionStrings>

View 1 Replies

Configuration :: How To Redirect Multiple Domain Name On One Website Hosted On IIS Server

Dec 24, 2010

how to redirect multiple domain name on the one website that is hosted on IIS server???

View 2 Replies

Databases :: Update Multiple Row With Different Value?

Feb 7, 2011

I have to update multiple row and two column of each row.

I have try to Update with case statement but after I perform that statement it blank out every other column that doesn't fall into the criteria of the update statement.

My table structure is like this;

table1
col1
row1 11
row2 22

I want to update row1 and row2 of their col1 in one single sql , how do i do that?

View 4 Replies

Multiple (Distinct) Databases With OpenSessionInView

Aug 11, 2010

In my web application, I have 2 totally different databases - one that's being used mostly by a CMS from which we'd like to get page information on non CMS pages on the same website, & one that contains totally different data. Is it possible to use Spring.NET's Open Session In View module with multiple session factories for both of those databases, so in this case I have 2 objects defined in spring.config of type Spring.Data.NHibernate.LocalSessionFactoryObject?

View 1 Replies

Databases :: Multiple Transactions In One Method?

Nov 10, 2010

I have an application which connect to oracle db.

I have two database hitting functions.

One is adding Userdetails(Fn Name : AddUserDtls) and another one adding address details(Fn name : AddAddresDtls) based on UserName which will get added after execution of first method ie AddUserDtls.

Problem I am facing is :

I have a single transaction and in that I have all the methods.

After the execution of first method,with out commiting i will go to second method.

and if any error occurs in second method.

I will rollback everything including the changes made by first method also.

Here one issue is there.

Since I am not committing the changes made by first method,

While I am executing the second method I am getting error that 'No user Name exists'

I understood that if we commit the transaction before the second method starts ,it will solve the issue.

But then it creates another problem.If some problem araise in the second method,then I cannot rollback the changes made by first method since it aleready commited.

View 1 Replies

Databases :: Bind Multiple Parameter By Name?

Dec 15, 2010

In following code I am binding two parameter by name. Program compile successfully but output isn't coming.

cmd = new OracleCommand("select * from books where book_id=:bid and title=:rat", conn);
OracleParameter op = new OracleParameter();

View 2 Replies

Databases :: Update Multiple Column Using Sub Query?

Apr 1, 2011

I want to update multiple column of a table using subquery ...My sample code is shown below

[Code]....

its throwing syntax error...I dont know where i commiting mistake.

View 1 Replies

Databases :: Multiple Select With Single Group By?

Jun 24, 2010

if we are trying to add the several columns in select statement and only one condition in group by.

how can we do that ?

Example:

[code].....

View 1 Replies

Sharing State Databases Between Multiple Apps

Apr 7, 2010

Is it better for a collection of ASP.NET web apps to share the same session database, or should each one have its own? If there is no significant difference, having a single database would be preferable due to easier maintenance. Background My team has an assortment of ASP.NET web apps, all written in either Monorail 1.1 or ASP.NET MVC 1.0. Each app currently uses a dedicated session state database. I'm working on adding a new site to that list, and am debating whether I should create another new session database, or just share an existing one with another app.

View 1 Replies

Architecture :: Web Application Connecting To Multiple Databases?

Sep 17, 2010

I am supposed to develop an enterprise-class ASP.NET Web Application that connects to multiple databases. For example when the web form loads, I should populate different ASP.NET controls (GridView, DataPager, TextBox, DropdownList etc) from multiple databases (SQL Server, Oracle, DB2, SAP Server etc) and also, edit the data in the controls and save the data to the respective databases on button submit.

Should I use Web Service or WCF for data integration, if so is there a limit on the size of the data?

What should be the architecture considering the application should be scalable and easy to maintain?

View 2 Replies

DataSource Controls :: How To Connect To Multiple Databases

Jun 8, 2010

i want to know how to connect to multiple databases in sql from our asp.net code??

View 4 Replies

Databases :: Best Way To Insert Data Into Multiple Tables?

Jan 22, 2010

I am using mysql as my database.From one of my web pages I want to insert data to 4 tables.All the data should be inserted to these different tables on a single button click from the web page.How can I achieve this?Which is most reliable way to insert data to multiple tables on a single click event?

Will the sql operation with 4 'insert' statements separated by semicolon work for me?

View 2 Replies

Databases :: How To Process Multiple Request At The Same Time

Feb 27, 2011

I have a doubt. For examples, Multiple users trying to update the same record usign asp.net application.

Can any one explain me indatil the situation how db process the request.?

View 1 Replies

Linq To Entities 3.5 Across Multiple Databases In Same Engine?

Sep 24, 2010

What do i need to do in order to be able to query across multiple databases which are in the same db engine?

I have added the .edmx file of 1 database, but i only need 1 view from another db.

View 1 Replies







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