Configuration :: Subdomains Switching Db & Web.config?

Jan 14, 2011

I am running into a unique problem (not easily googleable). This is what I am trying to do:Will be using subdomains: x.abc.com, y.abc.com, z.abc.com, etc.There will be single website hosted at abc.comBased on the subdomain passed (x,y,z,etc.), I need to switch databases and web.configs (appsettings, authentication, authorization info)For ex: If a user goes to x.abc.com, the site will select appropriate db & config settings and forward user to abc.com with db & settings cached/saved for the user session.Is it possible to have one hosted site and multiple subdomains that select appropriate config settings? Reason I need to do this is because credit card processor needs static url for requests and responses.

View 1 Replies


Similar Messages:

Configuration :: Subdomains For Each Language?

May 6, 2010

I have a working website with multi language support. Now this multilanguage support its based on three flags (one for spanish, another for english and another for french) and cookies. I stablish a cookie with the current culture. Then I have resource files for each language (default.aspx.resx, default.aspx.en.aspx, default.aspx.fr.resx ...)All working ok.Now I want to change the language system to subdomains. I want es.mydomain.com, en.mydomain.com and fr.mydomain.com, because search engines dont index very well with cookie language system.

I have created three A ZONES (es, en, fr) in the DNS hosting provider. This A ZONES points to the same IP that the WWW ZONE. Even though www.mydomain.com takes the user to the default.aspx of the website, but the other zones not.en.mydomain.com, fr.mydomain.com and es.mydomain.com returns a webpage with the text: BAD REQUEST (INVALID HOSTNAME)I think I have to make some other change in my code (perhaps global.asax).I have done this in PHP web server, but I dont know how to do in a ASP.NET server.I have searched solutions, but I have a lot of confusing information, principally about DNS, but I think that this part its OK

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

Configuration :: Navigate Subdomains To Diretories On A Web Hosting.

Nov 13, 2010

Graphic:wap.mysite.com -----------> mysite.com/wap/index.wmljack.mysite.com ------------> mysite.com/jack/index.aspxob.mysite.com ------------> mysite.com/bob/index.aspxjack2006.mysite.com ------------> mystie.com/jack2006/index.aspx

View 4 Replies

Configuration :: Switching From Development Server To IIS -- No Default Document

Dec 5, 2010

I created the simplest MVC project with Visual Studio 10, and it works fine on the VS Development Server, but won't run using IIS on the same computer under IIS (Windows Server 2008 R2 with ASP.NET 4.0.30319).

My steps were:

File / New / Project ...Visual C# / Web / ASP.NET MVC 2 Web Application... and kept the default name: MvcApplication1

Clicked Debug to build and run ... the default page appears fine at http://localhost:49175 ...

Then I closed that browser and clicked on MvcApplication1 / Properties / Web and selected "Use Local IIS Web server"Clicked "Create" to create the virtual directory at http://localhost/MvcApplication1

Clicked Debug again... and got HTTP Error 403.14 (Web Server configured to not list directory)

It seems that IIS cannot find a Default document. If I add a document to the virtual directory (C:inetpubwwwrootMvcApplication1) with one of the default doc names, that document will display OK.

Why can ASP.NET find the default document (Views/Home/Index.aspx) when running from the VS Development Server, but not when running from IIS??

I have tried running "aspnet_regiis -i", but still find that C:inetpubwwwrootaspnet_clientsystem_web4_0_30319 is an empty folder. Should there be something here?I have tried giving all sorts of permissions to the virtual directory folder (C:inetpubwwwrootMvcApplication1) but without any success.

View 4 Replies

Configuration :: Deploy Web.config And App.config Connection String?

May 3, 2010

I have deploy my web site, it contains a project!

in MyWeb there are all the aspx page and some entites datamodel, in MyApp there are the class with function like "getter data from DB" and there is a entity data model.

afeter the deploy, I have only the web.config and the connection string for the entity datamodel....itīs run ok, read/write the data on the DB.

The problem is with MyApp.....after the deploy it is a dll file and I donīt have the app.config and the entity inside it donīt run, not read/write nothing on the DB.

There arenīt error or messager but not read/write the data in the MyApp project.

all run on the iis 7

now...the question is:

I lose the connection string (in app.config) after the deploy?

Can I put a entity in the MyWeb and read it in another project (myApp)?

ps: for connect to DB I use not the c# code:

var db=from x in AccessDB.Example select x;

View 1 Replies

Configuration :: How To Read Web.config File In App.Config In Web Application

Jan 5, 2011

I am developing web applicaiton. I want to read web.config in App.config file. I have appSettings and connectionStrings in web.config. How to read that?

View 10 Replies

Configuration :: Switching Between Development Server And Production Server?

Mar 22, 2010

I am wondering the best way to change my connection string based upon which server I am accessing.

Essentially, all of the development is done on our local machines - once we think it is working, we upload it to our development server. In these 2 instances, I want my application to go off of our "dev" connection string for the SQL database in the web.config.

However, once it is published to our production server (for an internal application), I would like the connection string to point to our live db.

I am using the N-Tier model by Imar Spaanjaars - and have it setup like he suggests - In my DAL I have a class called AppConfiguration -

In this class I have a public readonly property ConnectionString() which returns the connection string in the web.config.

This is in an individual class library. What I would like to do is something similar to:

If server is localhost OR devstring return devString else return productionstring

View 1 Replies

C# - Why Does The System.configuration Differentiate Between Web.config And App.config

Jan 15, 2010

While using a third party dll I was getting the following exception - "exePath must be specified when not running inside a stand alone exe" with following trace

System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath).

The reason I found was that it was looking for app.config and I had provided the details in web.config. My question is why does the system.configuration differentiate between web.config and app.config.

View 2 Replies

Configuration :: Upgrade From .NET 2.0 To 4.0; Now It Started Using App.config Instead Of Web.config?

Aug 10, 2010

I upgrade my application from .NET 2.0 to .NET 4.0. Everything went smooth, with very few errors. Now the code is compiling fine, but run time environment is loading the configuration parameters from app.config instead of web.config;Here is my setup:Objects project: has app.configUI project: has web.config, When I run this site, it is fetching the configuration parameters from app.config. Any idea if I need to make any changes to read it from web.config instead of app.config? It used to work fine in my previous environment.

View 8 Replies

Configuration :: Web.config Deploy Time Configuration Error Assemblies

Jun 4, 2010

I built my ASP.NET website using vs2008 professional.

Now I have purchased vs2010 professional edition.

I do format my computer and then installed vs2010.

Now I want to deploy my website in vs2010, but it is giving configuration error in <add assemblies...

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

View 2 Replies

Configuration :: How To Read Configuration Settings Of Web.config Using Javascript

Apr 30, 2010

Web.config is the main settings and configuration file for an ASP.NET web application. The file is an XML document that defines configuration information regarding the web application. The web.config file contains information that control module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as database connection strings

Example 1:

<!-- This is an example Web.config file -->

[Code]....

In this article, we will see how to read the configuration settings in the web.config using 'JavaScript'.

Step 1: Create a new ASP.NET website. Add a button control to the Default.aspx.

Step 2: Right click the project > Add New Item > Web Configuration File

Add the following sample entry to the appSettings section in the web.config between the <configuration> tag as shown in the example 1:

<add key="var1" value="SomeValue"/>

Step 3: To read these entries using JavaScript, add the following script in the <head> tag of your Default.aspx page as shown below:

<head runat="server">
<title></title>
<script type="text/javascript">
function ReadConfigSettings()
{
var v1 = '<%=ConfigurationManager.AppSettings["var1"].ToString() %>'
alert(v1);
}
</script>
</head>
Step 4: Call this function on a button click and display the values of the configuration settings

<input type="button" value="Get" onclick="ReadConfigSettings();" />
That's it. Run the application and click the button. The value of the key in the appSettings will be displayed in the alert window. I hope you liked this short article.

View 7 Replies

Configuration :: Report Viewer Configuration Error - Changes In Web Config

Jan 26, 2011

I keep getting the all-too-familiar Report Viewer Configuration error, even after double-checking changes in web.config.It worked fine yesterday morning. Then by late afternoon, after I uploaded some site changes, it reverted to throwing the error.Report Viewer Configuration Error
The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0

View 1 Replies

Configuration :: Configuration Error In Web.config [when Uploading To Hosting]?

Nov 2, 2010

when developing in my pc , all is fine , but when upload to hosting , it show error ~

[img]http://image.love9cube.net/images/sadsadcgc.jpg[/img]

View 2 Replies

Get Error "The Configuration For Physical Path C:Web.Config Cannot Be Opened" While Decrypting The Web.config

Mar 25, 2010

aspnet_regiis.exe -pdf "connectionStrings" c:web.config And this is the error I got. Error - "The configuration for physical path 'C:Web.Config' cannot be opened. And the permissions of that file is not read only.

View 2 Replies

Configuration :: How To Merge A Distribution Web.config File And An Existing Web.config File

Mar 30, 2010

I'm preparing to deploy a ASP.NET web application. The target server has already a previous version of my web application with parameters specified on the web.config file.

In the new version of this web application, the web.config file contains new sections I would like they appear into the target web.config file on the server.

However I can't find the way to merge the new web.config sections into the existing web.config file ?

Does I have to do it programmatically, or is there a tool to merge the both files during installation ? (I'm using Web Setup Project).

View 2 Replies

Configuration :: One Web.config, Two Type Of Configuration?

Mar 8, 2010

I would like to have a different connection string when I deploy the web application, without manage my web.config anytime.How can I do that?

View 2 Replies

Configuration :: Use More Than One Web.config?

May 4, 2010

I want to use two(or one if possible in my task) web.config file in my web site root , one in main root and another in a sub directory (such as : ~/Pages/) , and after that use two difference authentication tag in those , my main web.config is in Windows mode authentication , because my login page is there , and second is in forms mode because i dont want any user access pages in ~/Pages root except after login , how do i do that ? its possible to i dont any change in machine.config file and use location tag in first web.config and delete second? if its possible how ? or if not what do i do ?

View 7 Replies

Set Up Subdomains On IIS 7?

Nov 1, 2010

I have a website sitting on an IIS 7 server: WWW.SITE.COM

I would like to create several sub domains that looks like SUBDOMAIN1.SITE.COM

I created an IIS website and i set the bindings to be http, port 80, the ip address of my server, and SUBDOMAIN1.SITE.COM

and the pyshichal path to a folder under SITE.COM

I restarted my website and clicked on browse, the browser than opened with the address: http://SUBDOMAIN1.SITE.COM

but the website doesn't show.

Do i have to do something with the DNS?

View 1 Replies

Configuration :: Is It Possible To Use Web.Config Transformations With .Net 3.5 (MVC)

Apr 16, 2010

I've been searching around on a way to use the new features of web deployment in VS2010, namely the transformations for config files, but everything I reference just says "right-click on web.config and add config transforms".Is it possible to do config transforms (and get all of the other publish goodness) in a 3.5 ASP.Net MVC project in VS2010? Is it just an msbuild file?

View 7 Replies

Configuration :: How To Get ApplicationName In The Second Web.config

Mar 27, 2011

I want to separate the connection to the database in database.config So that I have web.config separate data with database.config.

View 1 Replies

Configuration :: Assemblies In Web.config

Mar 12, 2010

In the web.config of my site 'MySite.com' I have some assemblies such as

<add assembly="aspNetEmail, Version=3.5.2.0, Culture=neutral, PublicKeyToken=BC571E8DA1C1F543"/>

View 5 Replies

Configuration :: Using Transforms In Web.config

May 6, 2010

I am trying to utilize Transforms in my Web.Configs.It is working when I publish, however, if I run from Visual Studio they seem to have NO effect.

I am using VS2010 / .NET 3.5 project / Silverlight 3.

I used these two as my primary references. http://vimeo.com/10781314 / http://msdn.microsoft.com/en-us/library/dd465326.aspx

I've tried several ways..
1. Overriding my Connection Setting using Transform Replace, match on name
2. Just using Insert in the Release.Config with no setting in the Main Web.Config.

Both ways DO work on Publish, but neither work in VS. # 1 shows the original when I'm just trying to run from VS and # 2 Crashes on this line string scontest = ConfigurationManager.ConnectionStrings["DBTest"].ToString();

Here is my Main Web.config for try # 2

<connectionStrings>
<!--<add name="DBTest"connectionString="Server=MAINWEBCONIFGBox; Database=personal; User; password=P@ssw0rd" providerName="System.Data.SqlClient" />-->
</connectionStrings>

Web.Release.Config for try # 2

<connectionStrings>
<add name="DBTest"
connectionString="Server=RELBox; Database=personal; User Id=admin; password=StagingPersonalPassword"
providerName="System.Data.SqlClient" xdt:Transform="Insert" />
</connectionStrings>

View 5 Replies

Configuration :: HttpHandler Two Web.config

Apr 1, 2010

I have an website in IIS 6.0 (windows 2003). Inside that I had configured another application (As IIS Application).

Now, When I uncommend a "add verb" tag in main web.config file, the webservice inside the application throws "404 file not found exception" Is there anything which I need to update in child web.config?

View 1 Replies

Configuration :: How To Add Web.config File

Feb 14, 2011

i'm working in vs2010 and am just about ready to deploy a Web sitei've read elsewhere that i should be able to add a web.release.config file and should be able to select it for the release buildso i added a web.release.config file right below my web.config file but it doesn't show up in my Configuration Manager

View 1 Replies







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